tizen 2.4 release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20151029.025852 submit/tizen_2.4/20151028.065341 tizen_2.4_mobile_release
authorjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 08:24:23 +0000 (17:24 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 08:24:23 +0000 (17:24 +0900)
21 files changed:
.gitignore [new file with mode: 0644]
ChangeLog [deleted file]
INSTALL [deleted file]
Makefile.am
Xtrans.c
Xtrans.h
Xtransint.h
Xtranslcl.c
Xtranssock.c
Xtranstli.c [deleted file]
Xtransutil.c
autogen.sh [new file with mode: 0755]
configure.ac
doc/.gitignore [new file with mode: 0644]
doc/xtrans.xml
packaging/xorg-x11-xtrans-devel.spec
packaging/xtrans.changes [new file with mode: 0644]
packaging/xtrans.manifest [new file with mode: 0644]
transport.c
xtrans.m4
xtrans.pc.in

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..4010eee
--- /dev/null
@@ -0,0 +1,84 @@
+#
+#              X.Org module default exclusion patterns
+#              The next section if for module specific patterns
+#
+#      Do not edit the following section
+#      GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+#      Do not edit the following section
+#      Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+#              Add & Override patterns for libxtrans
+#
+#              Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+# 
+Xtrans.html
+Xtrans.pdf
+Xtrans.txt
+index.Xtrans.html.raw
+index.Xtrans.ps.raw
+index.Xtrans.txt.raw
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644 (file)
index 66b30c2..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,1803 +0,0 @@
-commit 8ce5ecd33b05becc054dbd07f87e385165b6c979
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Thu Mar 22 20:04:07 2012 -0700
-
-    xtrans 1.2.7
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit f8eea0bf256de59602790b6a7c7877b31520440f
-Author: Matt Dew <marcoz@osource.org>
-Date:   Wed Jan 11 22:23:32 2012 -0700
-
-    informaltable cleanup
-
-    On certain tables, add top and bottom borders to table
-    header and a bottom border to the table. This matches
-    what those tables in the old pdfs looked like.
-
-    the <?dbfo keep-together='always'> prevents tables from
-    splitting across pages. Useful for tiny tables.
-
-    Converting the colwidth to a floating point,
-    IE, 1* -> 1.0* cleans up these build errors:
-    WARNING: table-layout="fixed" and column-width unspecified
-    => falling back to proportional-column-width(1)
-
-    Signed-off-by: Matt Dew <marcoz@osource.org>
-
-commit 6086f6c1d0e0a1c9e590879acb2319dea0eb6e96
-Author: Robert Bragg <robert@linux.intel.com>
-Date:   Mon Dec 12 00:30:43 2011 +0000
-
-    Xtranssock.c: avoid buffer overrun in SocketReopen
-
-    This function was constructing an address from a port string allocating
-    a buffer according to the size of the string but then later copying
-    the address according to sizeof(struct sockaddr).
-
-    This patch ensures that we allocate a struct sockaddr buffer with enough
-    space for the port string to be copied into sa_data[] and uses that
-    combined length to determine how much should be copied at the end of the
-    function.
-
-    This fixes a crash when using xwayland which uses ListenOnOpenFD() that
-    will call _XSERVTransReopenCOTSServer() with a short port string like
-    ":1".
-
-    Signed-off-by: Robert Bragg <robert@linux.intel.com>
-    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit a04a45cb94f7f569e6dd77df93258fa167d0a4ea
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Wed Nov 30 18:40:46 2011 -0800
-
-    Remove unnecessary casts on malloc, calloc & free calls
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
-
-commit a0bfb4fefd20b396e3d88eff0c60602fc436dad5
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Wed Nov 30 18:11:15 2011 -0800
-
-    Replace malloc(strlen)+strcpy with strdup
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
-
-commit b89e1b45198c48996750b5da3d715c10f974243f
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Wed Nov 30 18:05:05 2011 -0800
-
-    Finish conversion to standard C allocation functions
-
-    Commit 4ac40cd5451 started this, by no longer special casing the
-    xserver to include it's former custom allocation functions, this
-    just takes the remaining #defines and pre-substitutes them into
-    the code.
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit ff992be7b05483f9a0586a27ee0edb6d99580b84
-Author: Alan Hourihane <alanh@fairlite.co.uk>
-Date:   Thu Dec 1 12:04:22 2011 +0000
-
-    Fix some resource & memory leaks in libxtrans.
-
-    Signed-off-by: Alan Hourihane <alanh@vmware.com>
-    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit 29c9e101f7ad72556aa6b3dbc17d66a1ace9b2b1
-Author: Matt Dew <marcoz@osource.org>
-Date:   Tue Oct 4 21:59:50 2011 -0600
-
-    Cleanup IDs and links in doc
-
-    1 - fix the capitalization of the ID attributes to match either the
-         <title> or <funcdef> string it goes with.
-    2 - fix any <linkend>'s that were affected by 1.
-    3 - any <function> in the docs that has an actual funcdef,
-    will become an olink.
-
-    Signed-off-by: Matt Dew <marcoz@osource.org>
-
-commit 0f942e5f015cb3270e6f2e17c308bee894cb5fe3
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sun Sep 25 11:39:13 2011 -0700
-
-    Convert a bunch of sprintf calls to snprintf
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit eb9a8904fbef61a57ff01c90627ead57055ed62b
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sun Sep 25 11:18:26 2011 -0700
-
-    Add const attributes to fix gcc -Wwrite-strings warnings
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit 4e610d4bbcf29cca9dc5dbad29ca820996aaa8c7
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sun Sep 25 10:59:45 2011 -0700
-
-    Fix warning: unused variable 'tmpport' with various configurations
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit a74c5d915c3095059356f83d1b845192e5c472c2
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sun Sep 25 10:57:00 2011 -0700
-
-    Add _X_UNUSED attributes to silence unused parameter warnings
-
-    Not all the transport variants use all the arguments to every function,
-    but as long as one transport type needs it, they all get the args passed.
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit 64f765de138cb9b757df315469b3136d32222ea2
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sat Sep 24 00:04:40 2011 -0700
-
-    Mark __xtransname strings for debug messages as const char *
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit ea921932dae7049b231bead7f8f3f088d7beaf9e
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Fri Sep 23 23:03:09 2011 -0700
-
-    Fix unused variable warnings
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit c1968d10f97d62ac05d698822c2688151f70a9eb
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Fri Sep 23 22:59:11 2011 -0700
-
-    Fix warning: ISO C90 forbids mixed declarations and code
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit 225c45b3accab56fab361104a3d14b80f6cec954
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Fri Sep 23 22:57:56 2011 -0700
-
-    Fix printf format string warnings
-
-    Now that prmsg lets arguments types actually be checked, fix
-    the warnings found.
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit b1b69ce8e8e4fe0f190c8bd85b537309e71055c8
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Fri Sep 23 22:35:03 2011 -0700
-
-    Convert PRMSG macro to prmsg inline function
-
-    Allows using varargs to have the correct number of arguments passed to
-    get rid of the many gcc warnings about variable printf format strings,
-    and to reduce the duplication from having 5 implementations of the
-    PRMSG macro depending on the debug options defined & output method used.
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit cbdb434033da1725a69014cc6e4d89c691a6fd95
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sat Sep 24 07:43:07 2011 -0700
-
-    Fix warnings about static functions declared but never defined
-
-    Add #define XTRANS_TRANSPORT_C to transport.c and check for it
-    before making static function declarations and other bits needed
-    only when compiling the Xtrans code itself, not from other sources
-    that include the Xtransint.h header for the struct definitions.
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit cf39d738086b0a7c668fb3720d64de8d711a1a97
-Author: Arvind Umrao <arvind.umrao@oracle.com>
-Date:   Tue Sep 20 22:56:52 2011 +0530
-
-    Removing SUN specific code, let solaris create .X11-pipe with sticky bit on
-
-    Alan told me, named pipe support was added around Solaris 2.6 when that was a much better performing transport than Unix sockets on the Solaris kernels of the time. By Solaris 10, Unix sockets had been reimplemented in the kernel to be faster, so they became the default again. In Solaris 11, we don't even have named pipe support in the libxcb library that implements X client connection code now, so the named pipes would only be accessed by code with a different libX11 or a statically linked libX11 from Solaris 2.6-9
-
-    Signed-off-by: Arvind Umrao <arvind.umrao@oracle.com>
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit a477713b89686480cf59a9c75c0aaeeba2386d0a
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Tue Sep 20 18:56:47 2011 -0400
-
-    specs: regroup <author> <editor> <othercredit> under authorgroup
-
-    Some elements are not displayed when outside authorgroup
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 1ad48fb9bc18d0c7a8fbec1d2cd232877e945047
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Tue Sep 20 15:47:09 2011 -0400
-
-    specs: refactor copyright legal text for multi licensing
-
-    we can use <copyright> markup for the first holder
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit bd93bf86fd914a9cc54e2bedec5b063e5a38b732
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Mon Sep 19 10:58:40 2011 -0400
-
-    doc: support multi licensed copyright notice and license text
-
-    For documentation having multiple licenses, the copyright and legalnotice
-    elements sequence cannot instantiated multiple times.
-    The copyright notice and license text are therefore coded inside a
-    legalnotice element. The role attribute on the paragraph is used to allow
-    styling of the copyright notice text which should not be italicized.
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit eb9ec458b7fb5332f7ae7b8faf59443a9075ec60
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Fri Sep 16 22:54:41 2011 -0700
-
-    Strip trailing whitespace
-
-    Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
-    git diff -w & git diff -b show no diffs from this change
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit 36174eb06e805fa51c9c2e9e914fdfad4a99f50f
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Wed Sep 14 15:29:19 2011 -0400
-
-    docs: fix authors affiliation
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 9b6c2473be2848ce0a4986ddaa59e5f5ef028bfc
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Mon Sep 12 16:37:24 2011 -0400
-
-    docs: use the &fullrelvers; entity to set X11 release information
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit b5754cdf64f3396a5853413eda1943cf75ff3cbd
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Sun Sep 11 19:49:54 2011 -0400
-
-    docs: remove <productnumber> which is not used by default
-
-    This element is not rendered by default on the title. A template
-    customization is required to display it.
-    X Window System does not have a product number.
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 20f338c548e5fcb16650a4e2c25c2008c1fdac36
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Thu Sep 8 20:00:00 2011 -0400
-
-    docbook.am: embed css styles inside the HTML HEAD element
-
-    Rather than referring to the external xorg.css stylesheet, embed the content
-    of the file in the html output produced. This is accomplished by using
-    version 1.10 of xorg-xhtml.xsl.
-
-    This makes the whole html docs tree much more relocatable.
-    In addition, it eliminates xorg.css as a runtime file which makes
-    xorg-sgml-doctools a build time only package.
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 8eb827af1b57ec52be183cddaf32257968c02878
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Wed Sep 7 10:31:04 2011 -0400
-
-    docbook.am: global maintenance update - entities, images and olinking
-
-    Adding support in libX11 for html chunking caused a reorg of docbook.am
-    as well as the xorg-sgml-doctools masterdb for olinking.
-    The parameter img.src.path is added for pdf images.
-    A searchpath to the root builddir is added for local entities, if present.
-
-    The docbook.am makefile hides all the details and is identical for
-    all 22 modules having DocBook documentation. It is included by a thin
-    Makefile.am which requires no docbook knowledge.
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit b710cdadc92fc212af361bee48f5af6333ec3e6d
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Sun Jun 12 18:39:46 2011 -0400
-
-    Install xml versions of specs even if HAVE_XMLTO is false
-
-    DocBook/XML input source is also a usefull output format that can be viewed
-    with an XML viewer or editor and by some O/S help system.
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 78d1f7d29145567e11b985042e917a435bef95f9
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Sun Jun 5 16:27:37 2011 -0400
-
-    Install target dbs alongside generated documents
-
-    This matches a change in xorg-sgml-docs whereby the masterdb will look for
-    the target dbs into the same location as the generated documents.
-
-    The target dbs are now installed alongside the generated documents.
-    Previously they are installed in $prefix/sgml/X11/dbs alongside masterdb which
-    has the potential of installing outside the package prefix and cause
-    distcheck to fail when user does not have write permission in this package.
-
-    Requires XORG_CHECK_SGML_DOCTOOLS(1.8) which was released 2011-06-11
-
-commit e05d7abbcf880099058b699ac52f65edcac95582
-Author: Jeremy Huddleston <jeremyhu@apple.com>
-Date:   Sun Apr 24 19:39:26 2011 -0700
-
-    Silence warnings when building with clang
-
-    /usr/X11/include/X11/Xtrans/Xtransint.h:349:12: error: unused function 'is_numeric' [-Werror,-Wunused-function]
-    static int is_numeric (
-              ^
-    /usr/X11/include/X11/Xtrans/Xtransint.h:354:12: error: unused function 'trans_mkdir' [-Werror,-Wunused-function]
-    static int trans_mkdir (
-              ^
-
-    In file included from /usr/X11/include/X11/Xtrans/transport.c:67:
-    ...
-    fatal error: too many errors emitted, stopping now [-ferror-limit=]
-
-    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-
-commit 27ae0ad1406a33919ea9f76034495bca7cccf051
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Sun Feb 27 15:06:18 2011 -0500
-
-    Documentation: add Docbook external references support
-
-    When writing technical documentation, it is often necessary to cross
-    reference to other information. When that other information is not in the
-    current document, additional support is needed, namely <olink>.
-
-    A new feature with version 1.7 of xorg-sgml-doctools adds references to
-    other documents within or outside this package.
-
-    This patch adds technical support for this feature but does not change
-    the content of the documentation as seen by the end user.
-
-    Each book or article must generate a database containing the href
-    of sections that can be referred to from another document. This database
-    is installed in DATAROOTDIR/sgml/X11/dbs. There is a requirement that
-    the value of DATAROOTDIR for xorg-sgml-doctools and for the package
-    documentation is the same. This forms a virtual document tree.
-
-    This database is consulted by other documents while they are being generated
-    in order to fulfill the missing information for linking.
-    Refer to the xorg-sgml-doctools for further technical information.
-
-    Co-authored-by: Matt Dew <marcoz@osource.org>
-
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit cc199c31465b258032bdb9083879699202db7ee9
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Mon Feb 21 12:44:06 2011 -0500
-
-    Remove a decnet leftover
-
-    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
-
-commit 91620213d2bd75fe322df06c5b6f55b85a10e55a
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Tue Mar 15 15:47:08 2011 -0400
-
-    Remove K&R token pasting macros
-
-    Reviewed-by: Julien Cristau <jcristau@debian.org>
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
-
-commit 4ac40cd5451983e6f62527700cdf9e2f8a29c013
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Tue Mar 15 15:45:56 2011 -0400
-
-    Don't special-case allocation for the X server
-
-    xserver uses malloc/free directly now, don't route through the Xalloc
-    wrappers.
-
-    Reviewed-by: Julien Cristau <jcristau@debian.org>
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
-
-commit 638caa2053330038c5ba5a5682ff02be6aa0faa6
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Wed Feb 2 11:43:46 2011 -0500
-
-    config: comment, minor upgrade, quote and layout configure.ac
-
-    Group statements per section as per Autoconf standard layout
-    Quote statements where appropriate.
-    Autoconf recommends not using dnl instead of # for comments
-
-    Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters.
-    Add AC_CONFIG_SRCDIR([Makefile.am])
-
-    This helps automated maintenance and release activities.
-    Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
-
-commit a26753b7b20cd5cadc1e7fa007cec063f39a49e8
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Thu Dec 16 23:59:20 2010 -0800
-
-    doc: Correct column count in transport configuration table
-
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit 59f57d1a19d4091fef115b9eafa139bf620332cb
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Mon Nov 8 16:33:45 2010 -0800
-
-    xtrans 1.2.6
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit 05cd71c899e83022147f27085ee652d26f5462cb
-Author: Jesse Adkins <jesserayadkins@gmail.com>
-Date:   Sat Nov 6 12:53:24 2010 -0700
-
-    Remove ISCFuncs, fix SCOFuncs inclusion (bug 23324)
-    
-    ISCFuncs was removed by commit 339ddc413559d4cb117a72f87b2a70dae6911c32.
-    SCOFuncs should be for SCO only, instead of !sun.
-    
-    Also, remove comments that suggest ISC support.
-    
-    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
-    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit 0e5a66c82535dd8e9beee9fc4c42c52f90d05f50
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sat Nov 6 13:22:59 2010 -0700
-
-    doc: Update for X11R7/modularization
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit 1858516e9f0f3e65cc3d1f6cedfe8bfa614c8082
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sat Nov 6 11:22:15 2010 -0700
-
-    doc: Markup & typo cleanups
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit 16bdc50ca85bbae065a32647e2410a5ca47b4924
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sat Nov 6 09:53:08 2010 -0700
-
-    doc: Correct legal notices
-    
-    Restore both copyright/license notices from troff version
-    Move implementation note out of legalnotice section
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit d01d081538d04ac60b9e14f6e2faa60fe6bed5ff
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sat Nov 6 09:23:26 2010 -0700
-
-    doc: Use installed css stylesheet instead of making another copy
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit ea6977f4a51612172ba51c3bd35aa150ad9ff158
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Sat Nov 6 12:41:48 2010 -0700
-
-    Xtransint.h: Add missing ' in comment
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit 862d2de24950d2658158ebc4cf8307e73f80bc8d
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Fri Oct 29 18:22:33 2010 -0700
-
-    Sun's copyrights now belong to Oracle
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit cbb59ebc916d0be18c322eec782b694f4dc2e685
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Sun Jun 27 20:27:39 2010 -0400
-
-    Update README to reflect docs converted from nroff to DocBook XML
-    
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 3441142714b2640d1e143fcb5d089a2a42bd5321
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Sun Jun 27 20:21:20 2010 -0400
-
-    doc: remove trailing spaces in xtrans.xml
-    
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 7761846c7fd97f15d7207e1b9fd9d42c9e58a0c4
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Sat Jun 26 13:06:22 2010 -0400
-
-    doc: replace groff input format with docbook xml format
-    
-    Initial version of xtrans docbook xml.
-    Requires util-macros 1.10
-    
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 4f557036253ac5750576c88e5b9a86759a49d247
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Fri Jun 18 21:47:52 2010 -0400
-
-    config: XORG_WITH_GROFF: use HAVE_GROFF_HTML conditional
-    
-    Groff uses grohtml to generate html output format. This program, in turn,
-    uses a number of pnm* commands from the netpbm package, psselect
-    from the psutils package and the ghostscript package.
-    
-    These are independently installed, so they could be missing.
-    Skip the HTML output format if one of the dependencies is missing.
-    The version 1.9 of the util-macros package is required.
-    
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 1e9b958a096682b1ec111d400bd25048e3f95ed4
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Fri May 21 18:54:20 2010 -0700
-
-    Update README to reflect docs moved here from xorg-docs module
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-commit d400e69526c1c331e8e23893e2ba8658979376e8
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Mon Mar 29 14:53:49 2010 -0400
-
-    config: remove the pkgconfig pc.in file from EXTRA_DIST
-    
-    Automake always includes it in the tarball.
-    
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 373922e1529b3d55513fbc0ec24527600f7b529c
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Tue Feb 16 18:18:06 2010 -0500
-
-    doc: use HAVE_GROFF_MM to skip doc when 'm.tmac' macros missing
-    
-    This conditional is defined in XORG_WITH_GROFF macro.
-    
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit b531ff3ed2ad841b716ba370fd43bbe8f06f1185
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Fri Jan 29 15:05:37 2010 -0500
-
-    doc: use new macros XORG_WITH_GROFF and PS2PDF
-    
-    These control the usage of doc tools
-    Also use XORG_ENABLE_DOCS to control generation of docs
-    
-    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-
-commit 5922556f408fbcd14e7ad23bbe46db2ae8dcdee6
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Jan 14 21:11:43 2010 -0800
-
-    Update Sun license notices to current X.Org standard form
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit dab2bcdaf60977643ec55d71a81e67c1e3a162a9
-Author: RĂ©mi Cardona <remi@gentoo.org>
-Date:   Thu Dec 17 08:31:20 2009 +0100
-
-    require autoconf 2.60 because of $(docdir) use
-    
-    Signed-off-by: RĂ©mi Cardona <remi@gentoo.org>
-    Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
-    Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
-    Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
-
-commit 197ec0dc83e775e42fce4966142ae3a641f2db69
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Fri Nov 27 20:56:05 2009 -0500
-
-    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
-    
-    Now that the INSTALL file is generated.
-    Allows running make maintainer-clean.
-
-commit 27a18fb2c9356cc44bdd892f87200c3ea230109b
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Wed Oct 28 14:09:11 2009 -0400
-
-    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
-    
-    Add missing INSTALL file. Use standard GNU file on building tarball
-    README may have been updated
-    Remove AUTHORS file as it is empty and no content available yet.
-    Remove NEWS file as it is empty and no content available yet.
-
-commit 92da89326d26e0924d4c6efe2ebd26ceb527f4f7
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Mon Oct 26 22:08:43 2009 -0400
-
-    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
-    
-    ChangeLog filename is known to Automake and requires no further
-    coding in the makefile.
-
-commit 9aeff40d0722b4fedc4ab9ccc1aaff75368020fe
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Thu Oct 22 12:34:20 2009 -0400
-
-    .gitignore: use common defaults with custom section # 24239
-    
-    Using common defaults will reduce errors and maintenance.
-    Only the very small or inexistent custom section need periodic maintenance
-    when the structure of the component changes. Do not edit defaults.
-
-commit f0f7c47055eecac35786ec616c7632604da204b5
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Wed Oct 21 12:47:27 2009 -0700
-
-    This is not a GNU project, so declare it foreign.
-    
-    On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
-    > On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
-    > > I noticed an INSTALL file in xlsclients and libXvMC today, and it
-    > > was quite annoying to work around since 'autoreconf -fvi' replaces
-    > > it and git wants to commit it.  Should these files even be in git?
-    > > Can I nuke them for the betterment of humanity and since they get
-    > > created by autoreconf anyways?
-    >
-    > See https://bugs.freedesktop.org/show_bug.cgi?id=24206
-    
-    As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
-    AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
-    of the INSTALL file. It is also part of the 24206 solution.
-    
-    Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
-
-commit 7d98b9b03c5fd5a82f9f4d215b10c0926edeab00
-Author: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
-Date:   Mon Oct 19 09:53:18 2009 -0700
-
-    Bug 24612: Memory & fd leaks in local transports
-    
-    X.Org bug #24612 <http://bugs.freedesktop.org/show_bug.cgi?id=24612>
-    Patch #30548 <http://bugs.freedesktop.org/attachment.cgi?id=30548>
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 1127b8ec766ed8c48cc49b0779647fb697a07ebd
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Sat Oct 17 13:14:03 2009 -0700
-
-    xtrans 1.2.5
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 628b125ff9c72ec93090005b06228690f0dd6004
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Sat Oct 17 13:06:26 2009 -0700
-
-    Move Xtrans interface docs from xorg-docs module
-    
-    Only built/installed if --enable-docs is requested, since few people should
-    be writing code using xtrans interfaces directly.
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 3b0fc7a5a6d4b4b6903a9ad6685e2441f9fe83a7
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Oct 15 17:07:10 2009 -0700
-
-    Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 69334376346a96beb3df120a3eeeb7935923c388
-Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-Date:   Thu Oct 15 15:25:58 2009 -0500
-
-    Silence root ownership warnings on Cygwin
-    
-    XWin need not be run as root, nor do Administrators have uid of 0.
-    
-    Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
-commit d009d995d85dc499dc3f1add34da551fdf703b60
-Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-Date:   Thu Oct 15 15:25:57 2009 -0500
-
-    Don't use -lws2_32 on Cygwin
-    
-    On Cygwin, both the (builtin) *NIX socket API and WinSock (via w32api) are
-    available, but they cannot be mixed.  We use *NIX APIs for everything else,
-    so we do not want to mix in WinSock here.
-    
-    Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
-commit 773478581913bafa5e98a7bff3260efb0c4f2ab6
-Author: Mikhail Gusarov <dottedmag@dottedmag.net>
-Date:   Sat Sep 26 04:39:20 2009 +0700
-
-    Move xtrans.pc to /usr/share/pkg-config
-    
-    This fixes configuration in cross-compilation mode:
-    pkg-config does not look for .pc in /usr/lib/pkg-config during
-    cross-compilation to avoid picking up wrong libraries.
-    
-    Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
-    Acked-by: Julien Cristau <jcristau@debian.org>
-
-commit 336d4cfb58c784a81beca74fe03a0af0abb224ba
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Fri Aug 7 16:58:58 2009 +0200
-
-    Xtranssock: assume that we have getaddrinfo if ipv6 is enabled
-    
-    If IPv6 is enabled at build time, assume that the C library will have
-    getaddrinfo at runtime.
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 4f82ca502d8ec33b0038700675d54539d85d723c
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Jul 31 17:24:25 2009 -0700
-
-    Version 1.2.4
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit e5f52f206916b7c5264b9371f9bd0113632a4a16
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Jul 30 16:07:39 2009 -0700
-
-    Fix ifdef checks for SVR4 to do the right thing on Solaris
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 6d1ad967b894a37f423fd52247df5fcc3bfab1a8
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Mon May 18 18:26:36 2009 -0700
-
-    xfs segfaults in _FontTransSocketReopen when cloning itself
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 1e32f79670a6dc0baae2c2622d2b562f41266ea5
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Apr 24 02:10:53 2009 -0700
-
-    Constify path argument to trans_mkdir()
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 732f3366c40c4bea258b11b96c4763f5948a4844
-Author: Benjamin Close <Benjamin.Close@clearchain.com>
-Date:   Mon Feb 9 16:34:00 2009 +1030
-
-    Update is_numeric base on the declaration change in 389e01fb51ba2d708015e27d8fc17c88a0e55802
-    
-    Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
-
-commit 300893171ca7ad684472e5961a7b2ba0eb291f6b
-Author: Benjamin Close <Benjamin.Close@clearchain.com>
-Date:   Mon Feb 9 16:33:59 2009 +1030
-
-    Revert "Fix "XXX declared 'static' but not defined""
-    
-    This reverts commit d192bac409fe5ef99fa9fb9b5a0d5f656f0f1412.
-    
-    When transport.c is directly include (as in the case of libICE:icetrans.c:32)
-    Xtranssock.c must be included before Xtransutil.c in order for the socket
-    structures to be included. Including Xtransutil.c after Xtranssock.c requires
-    is_number and trans_mkdir to be defined.
-    
-    This reintroduces the warning until a cleaner solution can be found
-    but fixes the build.
-    
-    Found by: Tinderbox
-    
-    Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
-
-commit 389e01fb51ba2d708015e27d8fc17c88a0e55802
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Feb 6 11:31:06 2009 -0800
-
-    Constify string argument to is_numeric
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit cca91ddaae2121f42b2d5c08867bb93df8f9de13
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Feb 6 11:27:02 2009 -0800
-
-    Fix libICE build after code motion in d192bac409...
-    
-    The #ifdef ICE_t case in Xtransutil.c depended on some #includes that
-    are done in files that transport.c previously included before Xtransutil.c
-    but are now after Xtransutil.c is included.
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit d192bac409fe5ef99fa9fb9b5a0d5f656f0f1412
-Author: Tomas Carnecky <tom@dbservice.com>
-Date:   Wed Feb 4 15:26:18 2009 +0100
-
-    Fix "XXX declared 'static' but not defined"
-    
-    The functions are declared static in Xtransint.h but are defined
-    in Xtransutil.c. So when someone (xserver/os/connection.c)
-    incuded Xtransint.h, gcc would throw the warning.
-    I removed the declarations from the header and rearranged includes
-    in transport.c so that Xtransutil.c is included just after
-    Xtransint.h. This way the functions are still defined for the
-    files that need them (Xtranssock.c, Xtranstli.c).
-    
-    Signed-off-by: Tomas Carnecky <tom@dbservice.com>
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 77784ae71b6af1ec270198cfdd5f2eab1fe4a0c0
-Author: Tomas Carnecky <tom@dbservice.com>
-Date:   Wed Feb 4 15:22:28 2009 +0100
-
-    Fix "warning: format not a string literal and no format arguments"
-    
-    Signed-off-by: Tomas Carnecky <tom@dbservice.com>
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit c893bc4aa7a674c6888aacc8249b3c4a8f6bf12a
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Fri Jan 30 18:47:32 2009 -0200
-
-    Janitor: Correct make distcheck and compiler warnings.
-    
-      Compiler warnings are spread on other packages, with a
-    warning in the format:
-    /usr/include/X11/Xtrans/Xtranssock.c:548: warning: 'ciptr' may be used uninitialized in this function
-    so the code was slightly changed so that the compiler
-    would not "think" it could be used without initialization.
-
-commit 1cf4a1a6716f2c0adf5ee4d0a194a1013be53105
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Sun Jan 11 10:54:52 2009 -0800
-
-    Version 1.2.3
-
-commit d0c5592142369afa93dcd58ca6f390dbd127a28a
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Sun Jan 11 10:51:49 2009 -0800
-
-    Add bugzilla, mailing list & git repo pointers to README
-
-commit 9f12a154437554938a4fa18b7d3948c7dff8d631
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Mon Dec 1 13:58:31 2008 -0800
-
-    Switch ChangeLog generation to use XORG_CHANGELOG from xorg-macros 1.2
-
-commit 8c313881a0c586179c09922a7e00a1f8d669a68a
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Mon Dec 1 08:37:42 2008 -0800
-
-    18748: xtrans.m4 causes configure --help to list --enable-ipv6 in wrong case.
-    
-    X.Org Bug #18748 <http://bugs.freedesktop.org/show_bug.cgi?id=18748>
-
-commit c626a4298e98f4988701dd587bc8355c62542ec4
-Author: Alan Hourihane <alanh@tungstengraphics.com>
-Date:   Wed Oct 15 11:19:41 2008 +0100
-
-    add winsock check for windows builds
-
-commit 005bd80a9eab736aea737869b8a1079c565e1cd6
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Tue Oct 7 09:56:49 2008 -0400
-
-    xtrans 1.2.2
-
-commit 1185dd2966521e1a19474dfd4206306cb383fc89
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Tue Oct 7 09:55:22 2008 -0400
-
-    Finish removing OS/2 support
-
-commit 51b2e85aeb172f4a058d8ceceec91021ffd0b2a5
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Tue Oct 7 09:51:27 2008 -0400
-
-    Remove DECNET support.
-    
-    This hasn't been consumed in the server or libs since 7.0.
-
-commit 892ec928da3a0653ae54c321e4c3b1aa06c4e678
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Thu Aug 7 10:32:11 2008 -0400
-
-    Drastically simplify TRANS_OPEN_MAX.
-    
-    If your OS doesn't have sysconf(3), then life is already hard for you.
-
-commit 339ddc413559d4cb117a72f87b2a70dae6911c32
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Thu Aug 7 10:23:19 2008 -0400
-
-    Massive ifdef cleanup, dropping a ton of unsupported platform code.
-
-commit a78b9819cbbbddccb4a6bf364b88ec4f27d25c1f
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Tue Aug 5 17:46:37 2008 -0700
-
-    Added a flag to enable "The OS already took care of securing this, please skip checking xauth" for use with Apple launchd sockets.
-
-commit 3db805979b476d233baa881e83950ef1d2731841
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Tue Jul 15 16:56:12 2008 -0700
-
-    Apple: Allow Xquartz to provide an additional fd to xtrans since the dynamic addition code in the server isn't bulletproof yet.
-
-commit 81d8bdced6b45ab2ab3d3a0bc164ddbf1659fea1
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Wed Jul 2 15:24:20 2008 -0400
-
-    xtrans 1.2.1
-
-commit 302af17c4d5f0293a9af4d6c1097ab57a57d3f0f
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Jun 24 15:45:38 2008 -0700
-
-    Clear some pointer type mismatch warnings
-
-commit 4d184e41d30a8fe27380e04beb24f775d4a40782
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Jun 24 15:45:18 2008 -0700
-
-    LocalClose() takes a ConnInfoPtr, not an fd
-
-commit 177c2fd41727bd0110b493933dcbdbf21878fe09
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Fri May 23 09:48:59 2008 -0700
-
-    Launchd: This functionality has been moved into xorg-server
-
-commit 02fcb08803dca5bb2df4f8be490a845659bd7ed3
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Mon May 12 17:49:41 2008 -0400
-
-    Connection failure for abstract socket is ECONNREFUSED, not ENOENT.
-    
-    Apropos of bug #15884.
-
-commit 906294025573d07c739894fa3b2eedc82813a379
-Author: Bill Nottingham <notting@redhat.com>
-Date:   Mon May 12 17:43:36 2008 -0400
-
-    Ignore mkdir() errors when creating the abstract socket.
-    
-    Red Hat bug #445303.
-
-commit 08134c2ce72bc43c172b6ae134d8a94a40b45c9b
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Sat May 10 07:02:09 2008 -0400
-
-    Remove extraneous execute bit from .c file
-
-commit e75b9dad0ae4bc0869af81652d8259675a3c5cac
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Thu May 8 16:27:29 2008 +0200
-
-    Bump to 1.2
-
-commit 962ad4d3f8096f5ffa14b32b3ee094f250790c77
-Author: Alan Hourihane <alanh@tungstengraphics.com>
-Date:   Mon Apr 28 23:46:05 2008 +0100
-
-    disable UNIXCONN on MINGW
-
-commit 9e8c0e3356bc6359368b7655d3a717d6c000387e
-Author: Alan Hourihane <alanh@tungstengraphics.com>
-Date:   Sat Apr 26 16:23:19 2008 +0100
-
-    fix build for MAKEWORD
-
-commit 568c5ea02ee1de437833ee0b53a7b3fd7ece084f
-Author: Colin Harrison <colin.harrison-at-virgin.net>
-Date:   Sat Apr 26 08:53:13 2008 +0100
-
-    Update to winsock2
-
-commit 960902584a3ef125946beb5ebe331b54d697e9d9
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Fri Apr 25 15:53:20 2008 -0400
-
-    Fix length calculation for the path for abstract unix domain sockets
-    
-    Since the struct has a fixed-lenght char[] its sizeof() contains
-    trailing NUL octets which results in corrupt abstract sockets.
-    
-    Instead, take the strlen(3) of the path, plus the single NUL octet
-    (which identifies the path as an abstract path rather than a file-
-    system path) plus the offset from the start of the struct to the
-    start of the char array.
-    
-    This fixes:
-    
-    https://bugs.freedesktop.org/show_bug.cgi?id=15677
-
-commit 3a2a5375b8aab85697b4f2644ab99c3ccf79e658
-Author: Colin Harrison <colin.harrison-at-virgin.net>
-Date:   Wed Apr 23 10:39:30 2008 +0100
-
-    Only call WSAGetLastError() if there has been an
-    error condition.
-
-commit ac13a1a34b61247a21da130f0ba9922f35d3dc3b
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Apr 15 12:32:35 2008 -0700
-
-    Sun bug #6688467: _X11TransConvertAddress: Unknown family type on 64-bit SPARC
-    
-    Check for socklen_t definition and if found use it instead of size_t or
-    int for the length argument to getpeername/getsockname/etc.
-    
-    <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6688467>
-
-commit 556a351de83fc6f401b02213dae95731553c216d
-Author: LoĂ¯c Minier <lool@dooz.org>
-Date:   Mon Mar 24 15:38:27 2008 -0400
-
-    Bug #10489: Don't retry unix socket connect()s on ENOENT.
-    
-    If the socket isn't there, it's not gonna magically appear.  Either it's
-    a server socket and you should have just waited for the SIGUSR1 from the
-    server, or it's a stale reference to an ICE socket.
-    
-    However, do retry once, so fallback from abstract to filesystem namespace
-    works.
-    
-    Originally Debian bug #385976.
-
-commit 3de3e666e0653d4e8ae23fc3e6e31864ddad4059
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Sun Mar 23 19:43:32 2008 +0100
-
-    BSD44SOCKETS is the wrong check for SOCK_MAXADDRLEN
-    
-    GNU/kFreeBSD defines BSD44SOCKETS, but doesn't have SOCK_MAXADDRLEN.
-    Check for the latter directly.
-
-commit 662994b9096181117cec4cae88f24bf6da806159
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Wed Mar 5 21:02:28 2008 -0500
-
-    xtrans 1.1
-
-commit 2afe206ec9569e0d62caa6d91c3fb057b0efa23d
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Wed Mar 5 20:48:59 2008 -0500
-
-    Add support for the abstract socket namespace under Linux.
-    
-    Unlike normal unix sockets, the abstract namespace is not bound to the
-    filesystem.  This has some notable advantages; /tmp need not exist, the
-    socket directory need not have magic permissions, etc.  xtrans servers
-    will listen on both the normal and abstract socket endpoints; clients
-    will attempt to connect to the abstract socket before connecting to the
-    corresponding filesystem socket.
-    
-    Based on a patch by Bill Crawford.
-
-commit c8ed67f16f71042ef134a4d2189c20dd200a0648
-Author: Jeremy Huddleston <jeremy@tifa.local>
-Date:   Sun Feb 10 19:04:40 2008 -0800
-
-    Fixed #ifdef checks that were using i386 to use __i386__
-    
-    """
-    
-    It's simply obsolete, sloppy, compiler namespace pollution.  The
-    compiler is not allowed to predefine symbols that might conflict with
-    ordinary identifiers.  For backwards compatibility gcc currently
-    predefines i386 when compiling for x86 32-bit (but not 64-bit), but that
-    will go away.  It is also not defined if you specify -ansi when invoking
-    the compiler, because then it is seriously standards compliant.  Other
-    compilers shouldn't define it either.  Correct code shouldn't rely on it
-    being defined.  However __i386__ is safe and proper.
-    
-    """
-
-commit 9970b5b6f8237685267b7972282319cf266661ea
-Author: Ben Byer <bbyer@bbyer.local>
-Date:   Sun Dec 2 07:36:51 2007 -0800
-
-    make launchd error messages less scary
-
-commit cd1da5cec49fb7fe6238a00d9ba550b3ed78fa08
-Author: Ben Byer <bbyer@bbyer.local>
-Date:   Wed Nov 14 03:57:57 2007 -0800
-
-    Fix for incorrect processing of recycled launchd socket on OS X
-
-commit 3da4d6c1dc05f9e1291b023a97535eb67f0830e2
-Author: Ben Byer <bbyer@bbyer.local>
-Date:   Wed Nov 14 03:55:42 2007 -0800
-
-    removed cvs tags
-
-commit 496cf2c46d2123c3bed3e6878f8f9a62e87ce559
-Author: Dodji Seketeli <dodji@seketeli.org>
-Date:   Tue Sep 11 12:52:44 2007 +0200
-
-    libxtrans: fixed a typo in my last commit
-    
-            * Xtranssock.c: (SocketReopen): oops fix a typo in my last commit.
-
-commit 88e141225113fcc4ebe5e8fe361e75673cdbf9ff
-Author: Dodji Seketeli <dodji@seketeli.org>
-Date:   Tue Sep 11 08:48:03 2007 +0200
-
-    libxtrans: fix linux compilation breakage
-    
-            * Xtranssock.c:
-              (SocketReopen): protect use of BSD4.4 socket with BSD44SOCKETS macro.
-              protect use of strlcnpy with HAVE_STRLCPY macro.
-              That one is defined (or not) by the xserver configure.
-
-commit 6217f34977bfa17b66b89df5d45420774abedcb3
-Author: Ben Byer <bbyer@bbyer.apple.com>
-Date:   Wed Sep 5 18:29:44 2007 -0700
-
-    changes to support launchd on OS X
-
-commit 4d0cfe491046df26027db291530b247b7f24df5b
-Author: Ben Byer <bbyer@bbyer.apple.com>
-Date:   Wed Sep 5 18:04:01 2007 -0700
-
-    suppress warning about socket directory ownership on OS X
-    
-    We don't need to warn the user about the fact that the socket
-    directory is not owned by root under OS X; on that platform,
-    it's never owned by root, as the X server runs as the normal user.
-
-commit de93d67f6d48c7c08f2554cb85515bcf7dfbffb2
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Aug 21 17:54:23 2007 -0700
-
-    Version bump: 1.0.4
-
-commit 5e16b0ebccb233f7aeaf3928a853ee966b7cbb39
-Author: Kean Johnston <kean@armory.com>
-Date:   Wed Jul 18 09:27:06 2007 -0700
-
-    Fix typo in Xtranslcl.c (sprintf with size argument should be snprintf)
-
-commit 1abc981349140260d6fb643d29cf2b851fc06ac9
-Author: Daniel Stone <daniel@fooishbar.org>
-Date:   Sat Dec 16 01:15:21 2006 +0200
-
-    bump to 1.0.3
-
-commit 8172528bb894856aa5b133f61444294dc5a347e6
-Author: Daniel Stone <daniel@fooishbar.org>
-Date:   Wed Dec 6 18:51:59 2006 +0200
-
-    Makefile.am: make ChangeLog hook safer
-    Make ChangeLog hook as safe as possible.
-
-commit 5ffb704b1df9ec44a448d53d4c20b9d4c5d825d4
-Author: Adam Jackson <ajax@benzedrine.nwnk.net>
-Date:   Fri Oct 13 17:01:59 2006 -0400
-
-    Bump to 1.0.2
-
-commit ae3b57953f5c1fa875d19fb42a2178d7e594ea44
-Author: Adam Jackson <ajax@benzedrine.nwnk.net>
-Date:   Thu Oct 12 20:36:52 2006 -0400
-
-    Fix the ChangeLog hook to distcheck.
-
-commit 4a2f176da3e2171f4feea2e6c8787e24fdf204f3
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Sep 15 14:59:15 2006 -0700
-
-    Remove GIT_DIR setting from git log command
-
-commit ec3abba0e351278876909bb5250d490b807d904a
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Sep 15 13:54:18 2006 -0700
-
-    Copy additional copyright/license statements from source to COPYING
-
-commit b4c6bd92b3a8bed746da641c59a9f040e1d83768
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Wed Sep 13 14:09:22 2006 -0700
-
-    Bug 728: RUI in _X11TransSocketINETGetAddr in file "Xtranssock.c"
-    
-    Bug #728: <https://bugs.freedesktop.org/show_bug.cgi?id=728>
-    Patch #3527: <https://bugs.freedesktop.org/attachment.cgi?id=3527>
-    bzero sockaddr structures before passing to kernel to convince memory
-    checkers that they are initialized before use
-
-commit 5d006baadf213e91f131ffedc53c88a973fb1cba
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Aug 24 17:40:24 2006 -0700
-
-    Use SUN_LEN if it is defined on non-BSD44SOCKETS systems
-
-commit 2495789d6c290e2037b2836f28b027786ea5b605
-Author: Petr Salinger <petr.salinger@t-systems.cz>
-Date:   Sun Apr 23 01:31:00 2006 -0700
-
-    Bug 4982: use offsetof for manipulating struct sockaddr_un
-    
-    X.Org Bugzilla #4982 <https://bugs.freedesktop.org/show_bug.cgi?id=4982>
-    Patch #5424 <https://bugs.freedesktop.org/attachment.cgi?id=5424>
-
-commit 2633eaf8824828433a0eb9c9f3c4263b50342473
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Aug 24 16:53:08 2006 -0700
-
-    Try to capture the insanity of xtrans in a short README document
-
-commit 02ffb657b023d9b2a2c6c1d2417da8dcb96aa4b2
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Aug 24 14:46:42 2006 -0700
-
-    More sprintf -> snprintf conversions
-
-commit 3d5e7dd18c8836065c4835740211c10747b18abd
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Wed Aug 23 19:14:35 2006 -0700
-
-    Replace static ChangeLog with dist-hook to generate from git-log
-
-commit 92807fe90aad2303cec4b54bec40ce6edf671654
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Wed Aug 23 16:59:33 2006 -0700
-
-    Add ResetListener for named pipe transport
-    
-    (more merging of Xtrans code from Solaris xtrans)
-
-commit e11b861fcf3a295e5cb390cbac3a44d8ce4fad4f
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Aug 22 11:29:46 2006 -0700
-
-    Merge more fixes from Solaris xtrans
-    
-    Convert sprintf -> snprintf
-    Don't use fake readv/writev on Solaris x86.
-
-commit 049932c0171855aa6d55222947f4d47495b6f173
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Mon Aug 21 19:08:19 2006 -0700
-
-    Merge Solaris named pipe transport support into LOCALCONN
-    
-    Also clean up #ifdefs in Xtranslcl for which transport types are supported
-    Add "pipe" alias for named pipe transport on Solaris to match Solaris Xlib.
-
-commit 11391a1ffe4c633507406d2a1ed5abe57c8698db
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Mon Aug 21 19:05:49 2006 -0700
-
-    Add --enable-local-transport and set it on by default on SVR4 OS'es
-
-commit c0ebfcde0dd3f82c0e5712764e4403b2837e09b5
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Mon Aug 21 19:04:54 2006 -0700
-
-    Add *~ to .gitignore to skip emacs droppings
-
-commit fe7054f2f5ce74ce9b8c1704899894bc1c9f32b7
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Jul 13 14:59:21 2006 -0700
-
-    renamed: .cvsignore -> .gitignore
-
-commit 0eea51ea11381ba07d5e6953c7bf6519a3ded829
-Author: Donnie Berkholz <spyderous@gentoo.org>
-Date:   Fri Jun 30 04:05:45 2006 +0000
-
-    Bump to 1.0.1.
-
-commit 8d37f63810fc12f113bfcf37065ac9da09702b46
-Author: Matthieu Herrb <matthieu.herrb@laas.fr>
-Date:   Tue Jun 20 19:11:16 2006 +0000
-
-    Check setuild() return value. Bugzilla #7116.
-
-commit f9a47b508a89c647829266aacb19a0fc2dbb6158
-Author: Jeremy C. Reed <reed@reedmedia.net>
-Date:   Thu May 25 20:20:54 2006 +0000
-
-    No code change. Just fix comment that said SOCKCONN to become TCPCONN.
-        (This dates back to 1994 or before.)
-
-commit 2b7124954f5bedc8625c2f144bbbab4bbba7701c
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Dec 15 00:24:36 2005 +0000
-
-    Update package version number for final X11R7 release candidate.
-
-commit 3d3228a24513ea75c73f6d58ba50097f32b297a1
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Nov 9 21:19:14 2005 +0000
-
-    Update package version number for X11R7 RC2 release.
-
-commit 2cac02b2fe1ceaec2a2f1cd601d9ab4afcf3cb66
-Author: Kean Johnson <kean@armory.com>
-Date:   Tue Nov 8 06:33:26 2005 +0000
-
-    See ChangeLog entry 2005-11-07 for details.
-
-commit 063a39b0e1e615387fd7baa570265ed71ca87c22
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Oct 19 02:48:13 2005 +0000
-
-    Update package version number for RC1 release.
-
-commit 21a498d25f567ada296d0321f65536dfc816482b
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Oct 3 17:45:28 2005 +0000
-
-    Bug #3813 <https://bugs.freedesktop.org/show_bug.cgi?id=3813> GNU/kFreeBSD
-        fix for xtrans (Robert Millan)
-
-commit e41835b4b2fe03d8a1997bd8e8eabab2a94bccd5
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sun Oct 2 21:01:35 2005 +0000
-
-    //bugs.freedesktop.org/show_bug.cgi?id=4256> Patch #3046
-        <https://bugs.freedesktop.org/attachment.cgi?id=3046> Define
-        MAXHOSTNAMELEN if platform doesn't (Michael Banck)
-
-commit 4683f28f0c9d1a1ee0338a32011219ed1fb3c565
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Aug 19 23:53:22 2005 +0000
-
-    Bugzilla #3957 <https://bugs.freedesktop.org/show_bug.cgi?id=3957> Patch
-        #2924 <https://bugs.freedesktop.org/attachment.cgi?id=2924> xtrans
-        changes for AIX (Dan McNichol, IBM)
-    Bugzilla #3957 <https://bugs.freedesktop.org/show_bug.cgi?id=3957> Patch
-        #2925 <https://bugs.freedesktop.org/attachment.cgi?id=2925> xtrans
-        changes for AIX (Dan McNichol, IBM)
-
-commit 79db37c65905823b66411533152ab54407f04004
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Wed Aug 17 19:10:49 2005 +0000
-
-    On FreeBSD, some of the symbols necessary for secure RPC support are in
-        librpcsvc, so check for their presence in rpcsvc so that the library
-        will be added.
-
-commit 5165ebdb8144cd5be706e49957f5c8b51b762821
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Aug 16 02:23:41 2005 +0000
-
-    Define BSD44SOCKETS if struct sockaddr_in has a sin_len member
-
-commit 4ce01dc794022e74b01aac7b902acbbfebc74ed1
-Author: Kevin E Martin <kem@kem.org>
-Date:   Fri Jul 29 21:22:54 2005 +0000
-
-    Various changes preparing packages for RC0:
-    - Verify and update package version numbers as needed
-    - Implement versioning scheme
-    - Change bug address to point to bugzilla bug entry form
-    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
-        reenable it)
-    - Fix makedepend to use pkgconfig and pass distcheck
-    - Update build script to build macros first
-    - Update modular Xorg version
-
-commit 4ddee2d488f8bdcee624be96fa52ca03a7e64b83
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Jul 26 18:59:11 2005 +0000
-
-    Use AC_TYPE_SIGNAL to replace Imake's SIGNAL_DEFINES (used in Xtransutil.c)
-
-commit 0a80fbc1eb80343eaff27c48f9531f5ba709b6ef
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Jul 26 18:55:41 2005 +0000
-
-    Add config.h includes for modularization Use RETSIGTYPE if defined by
-        autoconf in addition to Imake's SIGNALRETURNSINT. Use
-        HAVE_WORKING_VFORK if defined by autoconf in addition to Imake's
-        HAS_VFORK
-
-commit 9a44d60cb031f1779c228f13697fb17e17df10d5
-Author: Matthieu Herrb <matthieu.herrb@laas.fr>
-Date:   Sat Jul 23 19:52:56 2005 +0000
-
-    typo
-
-commit 65ca78f15fe7f1640f3610245957eac9bca0bf04
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sun Jul 17 02:01:55 2005 +0000
-
-    Move AC_MSG_RESULT so it shows up in the right place, not after other tests
-        are executed
-
-commit f1d56df5736087eafa3db255437c918f6b9075a1
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Thu Jul 14 22:44:31 2005 +0000
-
-    Split out TCP library/IPv6 support checks into XTRANS_TCP_FLAGS for sharing
-        with code like xdm that doesn't use Xtrans but accesses TCP sockets
-        directly. Clean up --enable flags and report settings in configure
-        output.
-
-commit 9552877bf0a7be02c781ef8fb2f271573a55e297
-Author: Keith Packard <keithp@keithp.com>
-Date:   Sat Jul 9 21:22:30 2005 +0000
-
-    Add .cvsignore files
-
-commit 586cc58eff6d3c68313e5c8aedb8ec2464069f2f
-Author: Daniel Stone <daniel@fooishbar.org>
-Date:   Sun Jul 3 23:51:24 2005 +0000
-
-    Change <X11/os.h> to "os.h".
-
-commit 926367f82972bd94a64ef76c8e036f27ca61fb14
-Author: Daniel Stone <daniel@fooishbar.org>
-Date:   Sun Jul 3 07:01:01 2005 +0000
-
-    Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
-    Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
-    Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
-        source files in the xserver/xorg tree, predicated on defines of
-        HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
-        <X11/fonts/foo.h>.
-
-commit 40b7e438e4b441204ff47e1e25755162921d7c3e
-Author: Daniel Stone <daniel@fooishbar.org>
-Date:   Sat Jul 2 18:00:50 2005 +0000
-
-    Make includedir=@includedir@ in xtrans.pc.in, not with /X11/Xtrans.
-
-commit b413f4c1dddc467014adf16bfe31627e65508c12
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Wed Jun 22 22:46:39 2005 +0000
-
-    Apply these patches from Theo van Klaveren:
-    lib-dmx.patch lib-FS.patch lib-X11.patch lib-XRes.patch
-        lib-XScrnSaver.patch lib-xtrans.patch
-    to make the libraries distcheck.
-
-commit 57aac0006e27624a41f04c5d0c458b9f0108a084
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Wed Jun 22 22:36:51 2005 +0000
-
-    Add the rest of my patch from bugzilla #1605 to define INADDR_NONE on
-        platforms that don't define it in the system headers.
-
-commit f5a6a188407cec6e567070d192aac2db72cacd92
-Author: Kristian Høgsberg <krh@redhat.com>
-Date:   Wed Jun 22 01:21:24 2005 +0000
-
-    Apply patch by Alan Coopersmith from #1605 to fix address resolution of
-        hostnames starting with a digit for 64 bit architechtures.
-
-commit 5bad61831b1c06888d80d92a0bf34acbeecda026
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat Jun 18 07:48:43 2005 +0000
-
-    Move Secure RPC flags from X11/configure.ac to xtrans/xtrans.m4 since
-        multiple modules will need them
-
-commit 62438b14130e0f8de6939767a108ef12558653a3
-Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
-Date:   Thu Jun 9 15:56:48 2005 +0000
-
-    Use $(includedir)/X11/Xtrans for Xtransincludedir
-
-commit 7c8e397ddcbd0ae998cc4f23868726022d1aa47b
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Wed Jun 8 06:24:53 2005 +0000
-
-    Install the xtrans.m4 to the directory returned by aclocal --print-ac-dir,
-        so that the aclocal calls in other modules will pick it up if this
-        prefix's aclocal dir is not in a default path for system aclocal.
-
-commit 58c7263ca5b64a21dc101bb4b24201ba67a8d068
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Wed May 25 21:47:56 2005 +0000
-
-    - Add FSlib to symlink.sh
-    - Change Xtrans includedir back to be X11/Xtrans, so that users of it can
-        continue to include <X11/*>
-    - Add build system for FSlib
-    - Conditionally include config.h in xc/lib/FS
-    - Remove redundant include of FSproto.h in xc/lib/FS
-    - Add check to proto/X11/configure.ac whether -D_XOPEN_SOURCE is needed.
-
-commit b2e662de63948928e4cbc7e3ba90631f150c5137
-Author: Josh Triplett <josh@speakeasy.net>
-Date:   Mon May 23 01:53:21 2005 +0000
-
-    Change xtransincludedir in pkg-config file to match change in Makefile.am.
-
-commit 83d29f6e0c1587c8ad008672e7ae5631942559eb
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat May 21 23:07:48 2005 +0000
-
-    xtrans:
-    Create autoconf macro XTRANS_CONNECTION_FLAGS to provide standard set of
-        --enable flags for which transports to support and common place to
-        update for required libraries for platforms that need certain libs for
-        certain transports
-    ICE:
-    Add ICE_t #define required by Xtrans headers. Replace static defines of
-        LOCALCONN & UNIXCONN with new XTRANS_CONNECTION_FLAGS macro.
-    X11:
-    Moved transport type checks to new macro XTRANS_CONNECTION_FLAGS in
-        xtrans.m4 in xtrans module so they can be shared by all modules using
-        xtrans.
-
-commit bd79d86fb50233e0cd41a57b553f12b6d490ac7e
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Thu May 19 00:22:33 2005 +0000
-
-    revert last change, didn't do right thing at all, sorry for the noise
-
-commit 10776fa562c060d74fdd4434a16408fe4bd34ab9
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Thu May 19 00:10:08 2005 +0000
-
-    Require automake 1.7 in AM_INIT_AUTOMAKE
-
-commit daa7168e9e0cdff5eb06b0c9a7155f8880681fff
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Fri May 13 22:53:43 2005 +0000
-
-    - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in
-        <X11/...>
-    - For Xcomposite and Xdamage, don't link the build system out of the xc
-        tree
-    - Link the public X11 headers into their own directory
-    - Add links to XKeysymDB and XErrorDB
-    - Add links to all the Xlib man pages
-    - Add links to the lcUniConv subdirectory
-    - Conditionally include config.h in Xlib source
-
-commit d11d95fa4faec21655625b7de27d8a71c08ffe2d
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Fri May 13 15:16:43 2005 +0000
-
-    Dummy changes to ChangeLog/configure.ac to see if that fixes group
-        permissions
-
-commit b8a8c31f63a543d1c1c6bb4ae26a4019b4400edc
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Fri May 13 15:04:52 2005 +0000
-
-    Re-adding ChangeLog and configure.ac files
-
-commit 798c08054ce5a8238f35fee3e69218ece74441fa
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Fri May 13 15:02:19 2005 +0000
-
-    Temporarily remove ChangeLog configure.ac
-
-commit b3da86ae588df14dde916674a4f6593edf1964f7
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Fri May 13 14:43:37 2005 +0000
-
-    Dummy commit to see if that fixes the group execute permissions
-
-commit ea04267da780c2c3f08a710d15468565897420c4
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Thu May 12 16:12:34 2005 +0000
-
-    Make xtrans install in $(includedir)/X11/Xtrans. Remove all references to
-        Xtransdef.
-    Add Xdmcp build files
-    Add Wrap.h to lib/dmcp part of symlink script.
-
-commit f25791629f3f443d2552bdb05bea1a960b530342
-Author: Daniel Stone <daniel@fooishbar.org>
-Date:   Thu May 12 02:49:16 2005 +0000
-
-    Add Xtransdef.h.in as an AM_CONFIG_HEADER.
-
-commit d628bf24f2bf0d017394b6961784d7ac5b33f46b
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Wed May 11 22:44:52 2005 +0000
-
-    lib/Xau:
-    - Update AUTHORS, COPYING from Keith's tree
-    - Don't use gcc specific "-include config.h"
-    - Add autogen.sh
-    lib/xtrans:
-    - Add AUTHORS, COPYING, ChangeLog, Makefile.am, NEWS, README, autogen.sh,
-        configure.ac, xtrans.pc.in
-    xc/lib/Xau:
-    - Add conditionalized #include <config.h>
-    util/modular/symlink.sh
-    - Add functions symlink_lib_xau() and symlink_lib_xtrans()
-    util/modular/addconfig.h
-    - New script that adds #include <config.h> to files
-
-commit c814f30e9a5dc48a24c20517334cf5f9c37e066a
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Wed Mar 2 11:20:29 2005 +0000
-
-    xc/config/cf/DragonFly.cf
-    xc/config/cf/Imake.cf
-    xc/config/cf/Imakefile
-    xc/config/imake/imake.c
-    xc/config/imake/imakemdep.h
-    xc/extras/drm/shared/drm.h
-    xc/include/Xos_r.h
-    xc/lib/xtrans/Xtranssock.c
-    xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h
-    xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
-    xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c
-    //bugs.freedesktop.org/show_bug.cgi?id=1712) attachment #2004
-        (https://bugs.freedesktop.org/attachment.cgi?id=2004): Add support for
-        DragonFly/BSD platform. Patch by Jeroen Ruigrok <asmodai@tendra.org>
-        and Mike Verona <firedragonfly@gmail.com>.
-
-commit 92e80a5a67273fc60623b17a5f34c239f1ed6947
-Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
-Date:   Mon Nov 15 15:06:56 2004 +0000
-
-    Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added
-        mingw (Win32) port
-
-commit d92a9d31416a8366cd065886d7ff352fefce646d
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Aug 27 22:47:45 2004 +0000
-
-    Set the define XtransFailSoft to restore the old behavior to fail softly
-        when socket directory cannot chowned/chmod to correct user/group. This
-        should be added on a per OS basis which hasn't been done.
-
-commit 48ffd91cff9a07c68194f6d0b380dd2acd46a8ca
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Jul 30 21:00:20 2004 +0000
-
-    fail hard if socket directories cannot be chowned to root or chmod'ed to
-        the requested mode if 'sticky' bit is requested for this directory
-        instead of just print a warning that will remain unnoticed most of the
-        times.
-
-commit c3e50fa69ea7a2d08a298866e8a63c0f07c8248d
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Jul 30 18:40:36 2004 +0000
-
-    Fixed typo in a comment.
-    Deleted bogus comment.
-    Added debugging support.
-
-commit 79d38d618406ecc5228730a57ad406b280a5a189
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat Jul 17 01:13:31 2004 +0000
-
-    Fix typo in debug message in MakeAllCLTSServerListeners
-    Add $(GETPEER_DEFINES) to DEPEND_DEFINES for makedepend
-    Add "localuser" and "localgroup" access types to server-interpreted
-        authentication scheme.
-
-commit 8d0820e2058545e27f95d9fdc581262822799193
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Apr 23 18:44:27 2004 +0000
-
-    Merging XORG-CURRENT into trunk
-
-commit c594d3393cd355f52545b05bcc27ee8a2c533caa
-Author: Egbert Eich <eich@suse.de>
-Date:   Sun Mar 14 08:32:40 2004 +0000
-
-    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
-
-commit 2d51220fae172d2b8d28b971a853605b41038533
-Author: Egbert Eich <eich@suse.de>
-Date:   Wed Mar 3 12:11:46 2004 +0000
-
-    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
-
-commit 6e2cb92d192171961165c8e5a24b00f35f56aaeb
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 13:35:36 2004 +0000
-
-    readding XFree86's cvs IDs
-
-commit 93f13d69958cb9c9adfe1244e478521269f9258b
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 09:22:54 2004 +0000
-
-    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
-
-commit 7a10db6531003055886e0e994c2ef8e46a010eb2
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Mon Feb 23 20:34:44 2004 +0000
-
-    Import most of XFree86 4.4RC3. This import excludes files which have the
-        new license. If we want to, later we can import 4.4RC3 again and pick
-        up the files that have the new license, but for now the vendor branch
-        is "pure."
-
-commit 871b8c33f2ab8c98b95aa3324bb70055f5207c61
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Jan 29 08:08:15 2004 +0000
-
-    Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004
-
-commit 352e5de72e125d7d474907f354462cc1442e0989
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Dec 19 20:54:45 2003 +0000
-
-    XFree86 4.3.99.902 (RC 2)
-
-commit d223c1bb16c503e58f07dfef14b8e79fe7c358ff
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Thu Dec 4 22:03:05 2003 +0000
-
-    XFree86 4.3.99.901 (RC 1)
-
-commit 6c36ea2d54ea6b6f0cbece06d867d0b884783d0c
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Tue Nov 25 19:28:21 2003 +0000
-
-    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
-
-commit 3b0d3a905e39624abe9ddd1ce20542097601e4c2
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Tue Nov 25 19:28:21 2003 +0000
-
-    Initial revision
-
-commit 3bd236a07c0ebaabb7337dd5d56bc57a028a9c0e
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:48:50 2003 +0000
-
-    XFree86 4.3.0.1
-
-commit 26781c4f009a4b448dca3ab4912cbf01182e3d92
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 15:54:40 2003 +0000
-
-    R6.6 is the Xorg base-line
diff --git a/INSTALL b/INSTALL
deleted file mode 100644 (file)
index c9fd2c0..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,290 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
-
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.
-
-     Running `configure' might take a while.  While running, it prints
-     some messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
-   On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
-this:
-
-     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CPP="gcc -E" CXXCPP="g++ -E"
-
-   This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
-   By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Particular systems
-==================
-
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
-     ./configure CC="cc -Ae"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
-   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
-
-     ./configure CC="cc"
-
-and if that doesn't work, try
-
-     ./configure CC="cc -nodtk"
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-   Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug.  Until the bug is fixed you can use this workaround:
-
-     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
-     Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
-     Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *Note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
-
-`--no-create'
-`-n'
-     Run the configure checks, but stop before creating any output
-     files.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
index 9ff1723..38c34c3 100644 (file)
@@ -7,7 +7,6 @@ Xtransinclude_HEADERS = \
        Xtransint.h \
        Xtranslcl.c \
        Xtranssock.c \
-       Xtranstli.c \
        Xtransutil.c \
        transport.c
 
index 54e3bdc..ae8ffad 100644 (file)
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -48,6 +48,11 @@ from The Open Group.
  */
 
 #include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_SYSTEMD_DAEMON
+#include <systemd/sd-daemon.h>
+#endif
 
 /*
  * The transport table contains a definition for every transport (protocol)
@@ -80,11 +85,6 @@ from The Open Group.
 
 static
 Xtransport_table Xtransports[] = {
-#if defined(STREAMSCONN)
-    { &TRANS(TLITCPFuncs),     TRANS_TLI_TCP_INDEX },
-    { &TRANS(TLIINETFuncs),    TRANS_TLI_INET_INDEX },
-    { &TRANS(TLITLIFuncs),     TRANS_TLI_TLI_INDEX },
-#endif /* STREAMSCONN */
 #if defined(TCPCONN)
     { &TRANS(SocketTCPFuncs),  TRANS_SOCKET_TCP_INDEX },
 #if defined(IPv6) && defined(AF_INET6)
@@ -167,8 +167,8 @@ TRANS(SelectTransport) (const char *protocol)
     protobuf[PROTOBUFSIZE-1] = '\0';
 
     for (i = 0; i < PROTOBUFSIZE && protobuf[i] != '\0'; i++)
-       if (isupper (protobuf[i]))
-           protobuf[i] = tolower (protobuf[i]);
+       if (isupper ((unsigned char)protobuf[i]))
+           protobuf[i] = tolower ((unsigned char)protobuf[i]);
 
     /* Look at all of the configured protocols */
 
@@ -749,6 +749,34 @@ TRANS(CreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags)
 }
 
 int
+TRANS(Received) (const char * protocol)
+
+{
+   Xtransport *trans;
+   int i = 0, ret = 0;
+
+   prmsg (5, "Received(%s)\n", protocol);
+
+   if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
+   {
+       prmsg (1,"Received: unable to find transport: %s\n",
+              protocol);
+
+       return -1;
+   }
+   if (trans->flags & TRANS_ALIAS) {
+       if (trans->nolisten)
+          while (trans->nolisten[i]) {
+              ret |= TRANS(Received)(trans->nolisten[i]);
+              i++;
+       }
+   }
+
+   trans->flags |= TRANS_RECEIVED;
+   return ret;
+}
+
+int
 TRANS(NoListen) (const char * protocol)
 
 {
@@ -775,6 +803,22 @@ TRANS(NoListen) (const char * protocol)
 }
 
 int
+TRANS(IsListening) (const char * protocol)
+{
+   Xtransport *trans;
+
+   if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
+   {
+       prmsg (1,"TransIsListening: unable to find transport: %s\n",
+              protocol);
+
+       return 0;
+   }
+
+   return !(trans->flags & TRANS_NOLISTEN);
+}
+
+int
 TRANS(ResetListener) (XtransConnInfo ciptr)
 
 {
@@ -884,6 +928,20 @@ TRANS(Writev) (XtransConnInfo ciptr, struct iovec *buf, int size)
     return ciptr->transptr->Writev (ciptr, buf, size);
 }
 
+#if XTRANS_SEND_FDS
+int
+TRANS(SendFd) (XtransConnInfo ciptr, int fd, int do_close)
+{
+    return ciptr->transptr->SendFd(ciptr, fd, do_close);
+}
+
+int
+TRANS(RecvFd) (XtransConnInfo ciptr)
+{
+    return ciptr->transptr->RecvFd(ciptr);
+}
+#endif
+
 int
 TRANS(Disconnect) (XtransConnInfo ciptr)
 
@@ -1014,6 +1072,79 @@ complete_network_count (void)
 }
 
 
+static int
+receive_listening_fds(char* port, XtransConnInfo* temp_ciptrs, int* count_ret)
+
+{
+#ifdef HAVE_SYSTEMD_DAEMON
+    XtransConnInfo ciptr;
+    int i, systemd_listen_fds;
+
+    systemd_listen_fds = sd_listen_fds(1);
+    if (systemd_listen_fds < 0)
+    {
+        prmsg (1, "receive_listening_fds: sd_listen_fds error: %s\n",
+               strerror(-systemd_listen_fds));
+        return -1;
+    }
+
+    for (i = 0; i < systemd_listen_fds && *count_ret < NUMTRANS; i++)
+    {
+        struct sockaddr_storage a;
+        int ti;
+        const char* tn;
+        socklen_t al;
+
+        al = sizeof(a);
+        if (getsockname(i + SD_LISTEN_FDS_START, (struct sockaddr*)&a, &al) < 0) {
+            prmsg (1, "receive_listening_fds: getsockname error: %s\n",
+                   strerror(errno));
+            return -1;
+        }
+
+        switch (a.ss_family)
+        {
+        case AF_UNIX:
+            ti = TRANS_SOCKET_UNIX_INDEX;
+            if (*((struct sockaddr_un*)&a)->sun_path == '\0' &&
+                al > sizeof(sa_family_t))
+                tn = "local";
+            else
+                tn = "unix";
+            break;
+        case AF_INET:
+            ti = TRANS_SOCKET_INET_INDEX;
+            tn = "inet";
+            break;
+#if defined(IPv6) && defined(AF_INET6)
+        case AF_INET6:
+            ti = TRANS_SOCKET_INET6_INDEX;
+            tn = "inet6";
+            break;
+#endif /* IPv6 */
+        default:
+            prmsg (1, "receive_listening_fds:"
+                   "Got unknown socket address family\n");
+            return -1;
+        }
+
+        ciptr = TRANS(ReopenCOTSServer)(ti, i + SD_LISTEN_FDS_START, port);
+        if (!ciptr)
+        {
+            prmsg (1, "receive_listening_fds:"
+                   "Got NULL while trying to reopen socket received from systemd.\n");
+            return -1;
+        }
+
+        prmsg (5, "receive_listening_fds: received listener for %s, %d\n",
+               tn, ciptr->fd);
+        temp_ciptrs[(*count_ret)++] = ciptr;
+        TRANS(Received)(tn);
+    }
+#endif /* HAVE_SYSTEMD_DAEMON */
+    return 0;
+}
+
 #ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
 extern int xquartz_launchd_fd;
 #endif
@@ -1046,12 +1177,16 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
     }
 #endif
 
+    if (receive_listening_fds(port, temp_ciptrs, count_ret) < 0)
+       return -1;
+
     for (i = 0; i < NUMTRANS; i++)
     {
        Xtransport *trans = Xtransports[i].transport;
        unsigned int flags = 0;
 
-       if (trans->flags&TRANS_ALIAS || trans->flags&TRANS_NOLISTEN)
+       if (trans->flags&TRANS_ALIAS || trans->flags&TRANS_NOLISTEN ||
+           trans->flags&TRANS_RECEIVED)
            continue;
 
        snprintf(buffer, sizeof(buffer), "%s/:%s",
index 2945b2a..5807b67 100644 (file)
--- a/Xtrans.h
+++ b/Xtrans.h
@@ -303,10 +303,18 @@ int TRANS(CreateListener)(
     unsigned int       /* flags */
 );
 
+int TRANS(Received) (
+    const char*         /* protocol*/
+);
+
 int TRANS(NoListen) (
     const char*         /* protocol*/
 );
 
+int TRANS(IsListening) (
+    const char*         /* protocol*/
+);
+
 int TRANS(ResetListener)(
     XtransConnInfo     /* ciptr */
 );
@@ -356,6 +364,10 @@ int TRANS(Writev)(
     int                        /* size */
 );
 
+int TRANS(SendFd) (XtransConnInfo ciptr, int fd, int do_close);
+
+int TRANS(RecvFd) (XtransConnInfo ciptr);
+
 int TRANS(Disconnect)(
     XtransConnInfo     /* ciptr */
 );
index 3bce8dc..4c670b8 100644 (file)
@@ -123,6 +123,16 @@ from The Open Group.
 #define X_TCP_PORT     6000
 #endif
 
+#if XTRANS_SEND_FDS
+
+struct _XtransConnFd {
+    struct _XtransConnFd   *next;
+    int                    fd;
+    int                    do_close;
+};
+
+#endif
+
 struct _XtransConnInfo {
     struct _Xtransport     *transptr;
     int                index;
@@ -135,6 +145,8 @@ struct _XtransConnInfo {
     int                addrlen;
     char       *peeraddr;
     int                peeraddrlen;
+    struct _XtransConnFd        *recv_fds;
+    struct _XtransConnFd        *send_fds;
 };
 
 #define XTRANS_OPEN_COTS_CLIENT       1
@@ -275,6 +287,18 @@ typedef struct _Xtransport {
        int                     /* size */
     );
 
+#if XTRANS_SEND_FDS
+    int (*SendFd)(
+       XtransConnInfo,         /* connection */
+        int,                    /* fd */
+        int                     /* do_close */
+    );
+
+    int (*RecvFd)(
+       XtransConnInfo          /* connection */
+    );
+#endif
+
     int        (*Disconnect)(
        XtransConnInfo          /* connection */
     );
@@ -307,6 +331,7 @@ typedef struct _Xtransport_table {
 #define TRANS_NOUNLINK (1<<4)  /* Don't unlink transport endpoints */
 #define TRANS_ABSTRACT (1<<5)  /* Use abstract sockets if available */
 #define TRANS_NOXAUTH  (1<<6)  /* Don't verify authentication (because it's secure some other way at the OS layer) */
+#define TRANS_RECEIVED (1<<7)  /* The fd for this has already been opened by someone else. */
 
 /* Flags to preserve when setting others */
 #define TRANS_KEEPFLAGS        (TRANS_NOUNLINK|TRANS_ABSTRACT)
index 5beef7c..4deb86c 100644 (file)
@@ -140,6 +140,21 @@ TRANS(ReopenFail)(XtransConnInfo ciptr _X_UNUSED, int fd _X_UNUSED, char *port _
 
 #endif /* TRANS_REOPEN */
 
+#if XTRANS_SEND_FDS
+static int
+TRANS(LocalRecvFdInvalid)(XtransConnInfo ciptr)
+{
+    errno = EINVAL;
+    return -1;
+}
+
+static int
+TRANS(LocalSendFdInvalid)(XtransConnInfo ciptr, int fd, int do_close)
+{
+    errno = EINVAL;
+    return -1;
+}
+#endif
 
 \f
 static int
@@ -2368,6 +2383,10 @@ Xtransport       TRANS(LocalFuncs) = {
        TRANS(LocalWrite),
        TRANS(LocalReadv),
        TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+       TRANS(LocalSendFdInvalid),
+       TRANS(LocalRecvFdInvalid),
+#endif
        TRANS(LocalDisconnect),
        TRANS(LocalClose),
        TRANS(LocalCloseForCloning),
@@ -2410,6 +2429,10 @@ Xtransport       TRANS(PTSFuncs) = {
        TRANS(LocalWrite),
        TRANS(LocalReadv),
        TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+       TRANS(LocalSendFdInvalid),
+       TRANS(LocalRecvFdInvalid),
+#endif
        TRANS(LocalDisconnect),
        TRANS(LocalClose),
        TRANS(LocalCloseForCloning),
@@ -2454,6 +2477,10 @@ Xtransport       TRANS(NAMEDFuncs) = {
        TRANS(LocalWrite),
        TRANS(LocalReadv),
        TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+       TRANS(LocalSendFdInvalid),
+       TRANS(LocalRecvFdInvalid),
+#endif
        TRANS(LocalDisconnect),
        TRANS(LocalClose),
        TRANS(LocalCloseForCloning),
@@ -2495,6 +2522,10 @@ Xtransport       TRANS(PIPEFuncs) = {
        TRANS(LocalWrite),
        TRANS(LocalReadv),
        TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+       TRANS(LocalSendFdInvalid),
+       TRANS(LocalRecvFdInvalid),
+#endif
        TRANS(LocalDisconnect),
        TRANS(LocalClose),
        TRANS(LocalCloseForCloning),
@@ -2539,6 +2570,10 @@ Xtransport       TRANS(SCOFuncs) = {
        TRANS(LocalWrite),
        TRANS(LocalReadv),
        TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+       TRANS(LocalSendFdInvalid),
+       TRANS(LocalRecvFdInvalid),
+#endif
        TRANS(LocalDisconnect),
        TRANS(LocalClose),
        TRANS(LocalCloseForCloning),
index dfa41cf..6cde146 100644 (file)
@@ -445,6 +445,27 @@ TRANS(SocketOpen) (int i, int type)
     }
 #endif
 
+    /*
+     * Some systems provide a really small default buffer size for
+     * UNIX sockets.  Bump it up a bit such that large transfers don't
+     * proceed at glacial speed.
+     */
+#ifdef SO_SNDBUF
+    if (Sockettrans2devtab[i].family == AF_UNIX)
+    {
+       SOCKLEN_T len = sizeof (int);
+       int val;
+
+       if (getsockopt (ciptr->fd, SOL_SOCKET, SO_SNDBUF,
+           (char *) &val, &len) == 0 && val < 64 * 1024)
+       {
+           val = 64 * 1024;
+           setsockopt (ciptr->fd, SOL_SOCKET, SO_SNDBUF,
+               (char *) &val, sizeof (int));
+       }
+    }
+#endif
+
     return ciptr;
 }
 
@@ -2097,54 +2118,205 @@ TRANS(SocketBytesReadable) (XtransConnInfo ciptr, BytesReadable_t *pend)
 #endif /* WIN32 */
 }
 
+#if XTRANS_SEND_FDS
+
+static void
+appendFd(struct _XtransConnFd **prev, int fd, int do_close)
+{
+    struct _XtransConnFd *cf, *new;
+
+    new = malloc (sizeof (struct _XtransConnFd));
+    if (!new) {
+        /* XXX mark connection as broken */
+        close(fd);
+        return;
+    }
+    new->next = 0;
+    new->fd = fd;
+    new->do_close = do_close;
+    /* search to end of list */
+    for (; (cf = *prev); prev = &(cf->next));
+    *prev = new;
+}
 
 static int
-TRANS(SocketRead) (XtransConnInfo ciptr, char *buf, int size)
+removeFd(struct _XtransConnFd **prev)
+{
+    struct _XtransConnFd *cf;
+    int fd;
+
+    if ((cf = *prev)) {
+        *prev = cf->next;
+        fd = cf->fd;
+        free(cf);
+    } else
+        fd = -1;
+    return fd;
+}
 
+static void
+discardFd(struct _XtransConnFd **prev, struct _XtransConnFd *upto, int do_close)
 {
-    prmsg (2,"SocketRead(%d,%p,%d)\n", ciptr->fd, buf, size);
+    struct _XtransConnFd *cf, *next;
 
-#if defined(WIN32)
-    {
-       int ret = recv ((SOCKET)ciptr->fd, buf, size, 0);
-#ifdef WIN32
-       if (ret == SOCKET_ERROR) errno = WSAGetLastError();
-#endif
-       return ret;
+    for (cf = *prev; cf != upto; cf = next) {
+        next = cf->next;
+        if (do_close || cf->do_close)
+            close(cf->fd);
+        free(cf);
     }
-#else
-    return read (ciptr->fd, buf, size);
-#endif /* WIN32 */
+    *prev = upto;
 }
 
+static void
+cleanupFds(XtransConnInfo ciptr)
+{
+    /* Clean up the send list but don't close the fds */
+    discardFd(&ciptr->send_fds, NULL, 0);
+    /* Clean up the recv list and *do* close the fds */
+    discardFd(&ciptr->recv_fds, NULL, 1);
+}
 
 static int
-TRANS(SocketWrite) (XtransConnInfo ciptr, char *buf, int size)
+nFd(struct _XtransConnFd **prev)
+{
+    struct _XtransConnFd *cf;
+    int n = 0;
+
+    for (cf = *prev; cf; cf = cf->next)
+        n++;
+    return n;
+}
 
+static int
+TRANS(SocketRecvFd) (XtransConnInfo ciptr)
 {
-    prmsg (2,"SocketWrite(%d,%p,%d)\n", ciptr->fd, buf, size);
+    prmsg (2, "SocketRecvFd(%d)\n", ciptr->fd);
+    return removeFd(&ciptr->recv_fds);
+}
+
+static int
+TRANS(SocketSendFd) (XtransConnInfo ciptr, int fd, int do_close)
+{
+    appendFd(&ciptr->send_fds, fd, do_close);
+    return 0;
+}
+
+static int
+TRANS(SocketRecvFdInvalid)(XtransConnInfo ciptr)
+{
+    errno = EINVAL;
+    return -1;
+}
+
+static int
+TRANS(SocketSendFdInvalid)(XtransConnInfo ciptr, int fd, int do_close)
+{
+    errno = EINVAL;
+    return -1;
+}
+
+#define MAX_FDS                128
+
+union fd_pass {
+       struct cmsghdr  cmsghdr;
+       char            buf[CMSG_SPACE(MAX_FDS * sizeof(int))];
+};
+
+#endif /* XTRANS_SEND_FDS */
+
+static int
+TRANS(SocketRead) (XtransConnInfo ciptr, char *buf, int size)
+
+{
+    prmsg (2,"SocketRead(%d,%p,%d)\n", ciptr->fd, buf, size);
 
 #if defined(WIN32)
     {
-       int ret = send ((SOCKET)ciptr->fd, buf, size, 0);
+       int ret = recv ((SOCKET)ciptr->fd, buf, size, 0);
 #ifdef WIN32
        if (ret == SOCKET_ERROR) errno = WSAGetLastError();
 #endif
        return ret;
     }
 #else
-    return write (ciptr->fd, buf, size);
+#if XTRANS_SEND_FDS
+    {
+        struct iovec    iov = {
+            .iov_base = buf,
+            .iov_len = size
+        };
+        union fd_pass   cmsgbuf;
+        struct msghdr   msg = {
+            .msg_name = NULL,
+            .msg_namelen = 0,
+            .msg_iov = &iov,
+            .msg_iovlen = 1,
+            .msg_control = cmsgbuf.buf,
+            .msg_controllen = CMSG_LEN(MAX_FDS * sizeof(int))
+        };
+
+        size = recvmsg(ciptr->fd, &msg, 0);
+        if (size >= 0) {
+            struct cmsghdr *hdr;
+
+            for (hdr = CMSG_FIRSTHDR(&msg); hdr; hdr = CMSG_NXTHDR(&msg, hdr)) {
+                if (hdr->cmsg_level == SOL_SOCKET && hdr->cmsg_type == SCM_RIGHTS) {
+                    int nfd = (hdr->cmsg_len - CMSG_LEN(0)) / sizeof (int);
+                    int i;
+                    int *fd = (int *) CMSG_DATA(hdr);
+
+                    for (i = 0; i < nfd; i++)
+                        appendFd(&ciptr->recv_fds, fd[i], 0);
+                }
+            }
+        }
+        return size;
+    }
+#else
+    return read(ciptr->fd, buf, size);
+#endif /* XTRANS_SEND_FDS */
 #endif /* WIN32 */
 }
 
-
 static int
 TRANS(SocketReadv) (XtransConnInfo ciptr, struct iovec *buf, int size)
 
 {
     prmsg (2,"SocketReadv(%d,%p,%d)\n", ciptr->fd, buf, size);
 
+#if XTRANS_SEND_FDS
+    {
+        union fd_pass   cmsgbuf;
+        struct msghdr   msg = {
+            .msg_name = NULL,
+            .msg_namelen = 0,
+            .msg_iov = buf,
+            .msg_iovlen = size,
+            .msg_control = cmsgbuf.buf,
+            .msg_controllen = CMSG_LEN(MAX_FDS * sizeof(int))
+        };
+
+        size = recvmsg(ciptr->fd, &msg, 0);
+        if (size >= 0) {
+            struct cmsghdr *hdr;
+
+            for (hdr = CMSG_FIRSTHDR(&msg); hdr; hdr = CMSG_NXTHDR(&msg, hdr)) {
+                if (hdr->cmsg_level == SOL_SOCKET && hdr->cmsg_type == SCM_RIGHTS) {
+                    int nfd = (hdr->cmsg_len - CMSG_LEN(0)) / sizeof (int);
+                    int i;
+                    int *fd = (int *) CMSG_DATA(hdr);
+
+                    for (i = 0; i < nfd; i++)
+                        appendFd(&ciptr->recv_fds, fd[i], 0);
+                }
+            }
+        }
+        return size;
+    }
+#else
     return READV (ciptr, buf, size);
+#endif
 }
 
 
@@ -2154,11 +2326,75 @@ TRANS(SocketWritev) (XtransConnInfo ciptr, struct iovec *buf, int size)
 {
     prmsg (2,"SocketWritev(%d,%p,%d)\n", ciptr->fd, buf, size);
 
+#if XTRANS_SEND_FDS
+    if (ciptr->send_fds)
+    {
+        union fd_pass           cmsgbuf;
+        int                     nfd = nFd(&ciptr->send_fds);
+        struct _XtransConnFd    *cf = ciptr->send_fds;
+        struct msghdr           msg = {
+            .msg_name = NULL,
+            .msg_namelen = 0,
+            .msg_iov = buf,
+            .msg_iovlen = size,
+            .msg_control = cmsgbuf.buf,
+            .msg_controllen = CMSG_LEN(nfd * sizeof(int))
+        };
+        struct cmsghdr          *hdr = CMSG_FIRSTHDR(&msg);
+        int                     i;
+        int                     *fds;
+
+        hdr->cmsg_len = msg.msg_controllen;
+        hdr->cmsg_level = SOL_SOCKET;
+        hdr->cmsg_type = SCM_RIGHTS;
+
+        fds = (int *) CMSG_DATA(hdr);
+        /* Set up fds */
+        for (i = 0; i < nfd; i++) {
+            fds[i] = cf->fd;
+            cf = cf->next;
+        }
+
+        i = sendmsg(ciptr->fd, &msg, 0);
+        if (i > 0)
+            discardFd(&ciptr->send_fds, cf, 0);
+        return i;
+    }
+#endif
     return WRITEV (ciptr, buf, size);
 }
 
 
 static int
+TRANS(SocketWrite) (XtransConnInfo ciptr, char *buf, int size)
+
+{
+    prmsg (2,"SocketWrite(%d,%p,%d)\n", ciptr->fd, buf, size);
+
+#if defined(WIN32)
+    {
+       int ret = send ((SOCKET)ciptr->fd, buf, size, 0);
+#ifdef WIN32
+       if (ret == SOCKET_ERROR) errno = WSAGetLastError();
+#endif
+       return ret;
+    }
+#else
+#if XTRANS_SEND_FDS
+    if (ciptr->send_fds)
+    {
+        struct iovec            iov;
+
+        iov.iov_base = buf;
+        iov.iov_len = size;
+        return TRANS(SocketWritev)(ciptr, &iov, 1);
+    }
+#endif /* XTRANS_SEND_FDS */
+    return write (ciptr->fd, buf, size);
+#endif /* WIN32 */
+}
+
+static int
 TRANS(SocketDisconnect) (XtransConnInfo ciptr)
 
 {
@@ -2211,6 +2447,9 @@ TRANS(SocketUNIXClose) (XtransConnInfo ciptr)
 
     prmsg (2,"SocketUNIXClose(%p,%d)\n", ciptr, ciptr->fd);
 
+#if XTRANS_SEND_FDS
+    cleanupFds(ciptr);
+#endif
     ret = close(ciptr->fd);
 
     if (ciptr->flags
@@ -2239,6 +2478,9 @@ TRANS(SocketUNIXCloseForCloning) (XtransConnInfo ciptr)
     prmsg (2,"SocketUNIXCloseForCloning(%p,%d)\n",
        ciptr, ciptr->fd);
 
+#if XTRANS_SEND_FDS
+    cleanupFds(ciptr);
+#endif
     ret = close(ciptr->fd);
 
     return ret;
@@ -2293,6 +2535,10 @@ Xtransport       TRANS(SocketTCPFuncs) = {
        TRANS(SocketWrite),
        TRANS(SocketReadv),
        TRANS(SocketWritev),
+#if XTRANS_SEND_FDS
+        TRANS(SocketSendFdInvalid),
+        TRANS(SocketRecvFdInvalid),
+#endif
        TRANS(SocketDisconnect),
        TRANS(SocketINETClose),
        TRANS(SocketINETClose),
@@ -2333,6 +2579,10 @@ Xtransport       TRANS(SocketINETFuncs) = {
        TRANS(SocketWrite),
        TRANS(SocketReadv),
        TRANS(SocketWritev),
+#if XTRANS_SEND_FDS
+        TRANS(SocketSendFdInvalid),
+        TRANS(SocketRecvFdInvalid),
+#endif
        TRANS(SocketDisconnect),
        TRANS(SocketINETClose),
        TRANS(SocketINETClose),
@@ -2374,6 +2624,10 @@ Xtransport     TRANS(SocketINET6Funcs) = {
        TRANS(SocketWrite),
        TRANS(SocketReadv),
        TRANS(SocketWritev),
+#if XTRANS_SEND_FDS
+        TRANS(SocketSendFdInvalid),
+        TRANS(SocketRecvFdInvalid),
+#endif
        TRANS(SocketDisconnect),
        TRANS(SocketINETClose),
        TRANS(SocketINETClose),
@@ -2422,6 +2676,10 @@ Xtransport       TRANS(SocketLocalFuncs) = {
        TRANS(SocketWrite),
        TRANS(SocketReadv),
        TRANS(SocketWritev),
+#if XTRANS_SEND_FDS
+        TRANS(SocketSendFd),
+        TRANS(SocketRecvFd),
+#endif
        TRANS(SocketDisconnect),
        TRANS(SocketUNIXClose),
        TRANS(SocketUNIXCloseForCloning),
@@ -2429,7 +2687,7 @@ Xtransport        TRANS(SocketLocalFuncs) = {
 #endif /* !LOCALCONN */
 # ifdef TRANS_SERVER
 #  if !defined(LOCALCONN)
-static char* unix_nolisten[] = { "local" , NULL };
+static const char* unix_nolisten[] = { "local" , NULL };
 #  endif
 # endif
 
@@ -2476,6 +2734,10 @@ Xtransport       TRANS(SocketUNIXFuncs) = {
        TRANS(SocketWrite),
        TRANS(SocketReadv),
        TRANS(SocketWritev),
+#if XTRANS_SEND_FDS
+        TRANS(SocketSendFd),
+        TRANS(SocketRecvFd),
+#endif
        TRANS(SocketDisconnect),
        TRANS(SocketUNIXClose),
        TRANS(SocketUNIXCloseForCloning),
diff --git a/Xtranstli.c b/Xtranstli.c
deleted file mode 100644 (file)
index 397c946..0000000
+++ /dev/null
@@ -1,1407 +0,0 @@
-/*
-
-Copyright 1993, 1994, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
- * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
- *
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name NCR not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.  NCR makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * NCR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
- * NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <sys/un.h>
-#include <stropts.h>
-#include <poll.h>
-#include <tiuser.h>
-
-#include <netdir.h>
-#include <netconfig.h>
-
-
-/*
- * This is the TLI implementation of the X Transport service layer
- */
-
-typedef struct _TLItrans2dev {
-    char       *transname;
-    char       *protofamily;
-    char       *devcotsname;
-    char       *devcltsname;
-    int        family;
-} TLItrans2dev;
-
-static TLItrans2dev TLItrans2devtab[] = {
-       {"inet","inet","/dev/tcp","/dev/udp",AF_INET},
-       {"tcp","inet","/dev/tcp","/dev/udp",AF_INET},
-       {"tli","loopback","/dev/ticots","/dev/ticlts",AF_UNIX},
-};
-
-#define NUMTLIFAMILIES (sizeof(TLItrans2devtab)/sizeof(TLItrans2dev))
-
-/*
- * The local TLI connection, is a form of a local connection, so use a
- * sockaddr_un for the address so that it will be treated just like the other
- * local transports such as UNIX domain sockets, pts, and named.
- */
-
-#if defined(X11_t)
-#define TLINODENAME    "TLI:xserver"
-#endif
-
-#if defined(XIM_t)
-#define TLINODENAME    "TLI:xim"
-#endif
-
-#if defined(FS_t) || defined(FONT_t)
-#define TLINODENAME    "TLI:fontserver"
-#endif
-
-#if defined(ICE_t)
-#define TLINODENAME    "TLI:ICE"
-#endif
-
-#if defined(TEST_t)
-#define TLINODENAME    "TLI:test"
-#endif
-
-#ifndef PORTBUFSIZE
-#ifdef TRANS_SERVER
-#define PORTBUFSIZE    64
-#else
-#ifdef TRANS_CLIENT
-#define PORTBUFSIZE    64
-#endif
-#endif
-#endif
-
-
-/*
- * These are some utility function used by the real interface function below.
- */
-
-static int
-TRANS(TLISelectFamily)(char *family)
-
-{
-    int     i;
-
-    prmsg(3,"TLISelectFamily(%s)\n", family);
-
-    for(i=0;i<NUMTLIFAMILIES;i++)
-    {
-       if( !strcmp(family,TLItrans2devtab[i].transname) )
-           return i;
-    }
-    return -1;
-}
-
-
-/*
- * This function gets the local address of the transport and stores it in the
- * XtransConnInfo structure for the connection.
- */
-
-static int
-TRANS(TLIGetAddr)(XtransConnInfo ciptr)
-
-{
-    Xtransaddr         sockname;
-    struct netbuf      netbuf;
-
-    prmsg(3,"TLIGetAddr(%x)\n", ciptr);
-
-    netbuf.buf=(char *)&sockname;
-    netbuf.len=sizeof(sockname);
-    netbuf.maxlen=sizeof(sockname);
-
-    if( t_getname(ciptr->fd,&netbuf,LOCALNAME) < 0 )
-    {
-       prmsg(1,"TLIGetAddr: t_getname(LOCALNAME) failed: %d\n",
-             errno);
-       return -1;
-    }
-
-    prmsg(4,"TLIGetAddr: got family %d len %d\n",
-         ((struct sockaddr *) &sockname)->sa_family ,netbuf.len);
-
-    /*
-     * Everything looks good: fill in the XtransConnInfo structure.
-     */
-
-    if( ciptr->addr )
-       free(ciptr->addr);
-
-    if( (ciptr->addr = malloc(netbuf.len)) == NULL )
-    {
-       prmsg(1, "TLIGetAddr: Can't allocate space for the addr\n");
-       return -1;
-    }
-
-    ciptr->family=((struct sockaddr *) &sockname)->sa_family;
-    ciptr->addrlen=netbuf.len;
-    memcpy(ciptr->addr,&sockname,ciptr->addrlen);
-
-    return 0;
-}
-
-
-/*
- * This function gets the remote address of the socket and stores it in the
- * XtransConnInfo structure for the connection.
- */
-
-static int
-TRANS(TLIGetPeerAddr)(XtransConnInfo ciptr)
-
-{
-    Xtransaddr         sockname;
-    struct netbuf      netbuf;
-
-    prmsg(3,"TLIGetPeerAddr(%x)\n", ciptr);
-
-    netbuf.buf=(char *)&sockname;
-    netbuf.len=sizeof(sockname);
-    netbuf.maxlen=sizeof(sockname);
-
-    if( t_getname(ciptr->fd,&netbuf,REMOTENAME) < 0 )
-    {
-       prmsg(1,"TLIGetPeerAddr: t_getname(REMOTENAME) failed: %d\n",
-             errno);
-       return -1;
-    }
-
-    prmsg(4,"TLIGetPeerAddr: got family %d len %d\n",
-         ((struct sockaddr *) &sockname)->sa_family ,netbuf.len);
-
-    /*
-     * Everything looks good: fill in the XtransConnInfo structure.
-     */
-
-    if( ciptr->peeraddr )
-       free(ciptr->peeraddr);
-
-    if( (ciptr->peeraddr = malloc(netbuf.len)) == NULL )
-    {
-       prmsg(1,
-             "TLIGetPeerAddr: Can't allocate space for the addr\n");
-       return -1;
-    }
-
-    ciptr->peeraddrlen=netbuf.len;
-    memcpy(ciptr->peeraddr,&sockname,ciptr->peeraddrlen);
-
-    return 0;
-}
-
-
-/*
- * This function will establish a local name for the transport. This function
- * do extra work for the local tli connection. It must create a sockaddr_un
- * format address so that it will look like an AF_UNIX connection to the
- * higher layer.
- *
- * This function will only be called by the OPENC?TSClient() functions since
- * the local address is set up in the CreateListner() for the server ends.
- */
-
-static int
-TRANS(TLITLIBindLocal)(int fd, int family, char *port)
-
-{
-    struct sockaddr_un *sunaddr=NULL;
-    struct t_bind      *req=NULL;
-
-    prmsg(2, "TLITLIBindLocal(%d,%d,%s)\n", fd, family, port);
-
-    if( family == AF_UNIX )
-    {
-       if( (req=(struct t_bind *)t_alloc(fd,T_BIND,0)) == NULL )
-       {
-           prmsg(1,
-                 "TLITLIBindLocal() failed to allocate a t_bind\n");
-           return -1;
-       }
-
-       if( (sunaddr=(struct sockaddr_un *)
-            malloc(sizeof(struct sockaddr_un))) == NULL )
-       {
-           prmsg(1,
-                 "TLITLIBindLocal: failed to allocate a sockaddr_un\n");
-           t_free((char *)req,T_BIND);
-           return -1;
-       }
-
-       sunaddr->sun_family=AF_UNIX;
-
-#ifdef nuke
-       if( *port == '/' ) { /* A full pathname */
-           (void) strcpy(sunaddr->sun_path, port);
-       } else {
-           (void) sprintf(sunaddr->sun_path,"%s%s", TLINODENAME, port );
-       }
-#endif /*NUKE*/
-
-       (void) sprintf(sunaddr->sun_path,"%s%d",
-                      TLINODENAME, getpid()^time(NULL) );
-
-       prmsg(4, "TLITLIBindLocal: binding to %s\n",
-             sunaddr->sun_path);
-
-       req->addr.buf=(char *)sunaddr;
-       req->addr.len=sizeof(*sunaddr);
-       req->addr.maxlen=sizeof(*sunaddr);
-    }
-
-    if( t_bind(fd, req, NULL) < 0 )
-    {
-       prmsg(1,
-             "TLIBindLocal: Unable to bind TLI device to %s\n",
-             port);
-       if (sunaddr)
-           free((char *) sunaddr);
-       if (req)
-           t_free((char *)req,T_BIND);
-       return -1;
-    }
-    return 0;
-}
-
-static XtransConnInfo
-TRANS(TLIOpen)(char *device)
-
-{
-    XtransConnInfo     ciptr;
-
-    prmsg(3,"TLIOpen(%s)\n", device);
-
-    if( (ciptr = calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
-    {
-       prmsg(1, "TLIOpen: calloc failed\n");
-       return NULL;
-    }
-
-    if( (ciptr->fd=t_open( device, O_RDWR, NULL )) < 0 )
-    {
-       prmsg(1, "TLIOpen: t_open failed for %s\n", device);
-       free(ciptr);
-       return NULL;
-    }
-
-    return ciptr;
-}
-
-
-#ifdef TRANS_REOPEN
-
-static XtransConnInfo
-TRANS(TLIReopen)(char *device, int fd, char *port)
-
-{
-    XtransConnInfo     ciptr;
-
-    prmsg(3,"TLIReopen(%s,%d, %s)\n", device, fd, port );
-
-    if (t_sync (fd) < 0)
-    {
-       prmsg(1, "TLIReopen: t_sync failed\n");
-       return NULL;
-    }
-
-    if( (ciptr = calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
-    {
-       prmsg(1, "TLIReopen: calloc failed\n");
-       return NULL;
-    }
-
-    ciptr->fd = fd;
-
-    return ciptr;
-}
-
-#endif /* TRANS_REOPEN */
-
-
-static int
-TRANS(TLIAddrToNetbuf)(int tlifamily, char *host, char *port,
-                      struct netbuf *netbufp)
-
-{
-    struct netconfig *netconfigp;
-    struct nd_hostserv nd_hostserv;
-    struct nd_addrlist *nd_addrlistp = NULL;
-    void *handlep;
-    long lport;
-
-    prmsg(3,"TLIAddrToNetbuf(%d,%s,%s)\n", tlifamily, host, port );
-
-    if( (handlep=setnetconfig()) == NULL )
-       return -1;
-
-    lport = strtol (port, (char**)NULL, 10);
-    if (lport < 1024 || lport > USHRT_MAX)
-       return -1;
-
-    nd_hostserv.h_host = host;
-    if( port && *port ) {
-       nd_hostserv.h_serv = port;
-    } else {
-       nd_hostserv.h_serv = NULL;
-    }
-
-    while( (netconfigp=getnetconfig(handlep)) != NULL )
-    {
-       if( strcmp(netconfigp->nc_protofmly,
-                  TLItrans2devtab[tlifamily].protofamily) != 0 )
-           continue;
-       prmsg(5,"TLIAddrToNetbuf: Trying to resolve %s.%s for %s\n",
-             host, port, TLItrans2devtab[tlifamily].protofamily );
-       if( netdir_getbyname(netconfigp,&nd_hostserv, &nd_addrlistp) == 0 )
-       {
-           /* we have at least one address to use */
-
-           prmsg(5, "TLIAddrToNetbuf: found address for %s.%s\n", host, port);
-           prmsg(5, "TLIAddrToNetbuf: %s\n",taddr2uaddr(netconfigp,nd_addrlistp->n_addrs));
-
-           memcpy(netbufp->buf,nd_addrlistp->n_addrs->buf,
-                  nd_addrlistp->n_addrs->len);
-           netbufp->len=nd_addrlistp->n_addrs->len;
-           endnetconfig(handlep);
-           return 0;
-       }
-    }
-    endnetconfig(handlep);
-
-    return -1;
-}
-
-/*
- * These functions are the interface supplied in the Xtransport structure
- */
-
-#ifdef TRANS_CLIENT
-
-static XtransConnInfo
-TRANS(TLIOpenCOTSClient)(Xtransport *thistrans, char *protocol,
-                        char *host, char *port)
-
-{
-    XtransConnInfo     ciptr;
-    int                i;
-
-    prmsg(2,"TLIOpenCOTSClient(%s,%s,%s)\n", protocol, host, port );
-
-    if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
-    {
-       prmsg(1,"TLIOpenCOTSClient: Unable to determine device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    if( (ciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcotsname)) == NULL )
-    {
-       prmsg(1,"TLIOpenCOTSClient: Unable to open device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    if( TRANS(TLITLIBindLocal)(ciptr->fd,TLItrans2devtab[i].family,port) < 0 )
-    {
-       prmsg(1,
-             "TLIOpenCOTSClient: ...TLITLIBindLocal() failed: %d\n",
-             errno);
-       t_close(ciptr->fd);
-       free(ciptr);
-       return NULL;
-    }
-
-    if( TRANS(TLIGetAddr)(ciptr) < 0 )
-    {
-       prmsg(1,
-             "TLIOpenCOTSClient: ...TLIGetAddr() failed: %d\n",
-             errno);
-       t_close(ciptr->fd);
-       free(ciptr);
-       return NULL;
-    }
-
-    /* Save the TLIFamily for later use in TLIAddrToNetbuf() lookups */
-    ciptr->index = i;
-
-    return ciptr;
-}
-
-#endif /* TRANS_CLIENT */
-
-
-#ifdef TRANS_SERVER
-
-static XtransConnInfo
-TRANS(TLIOpenCOTSServer)(Xtransport *thistrans, char *protocol,
-                        char *host, char *port)
-
-{
-    XtransConnInfo     ciptr;
-    int                i;
-
-    prmsg(2,"TLIOpenCOTSServer(%s,%s,%s)\n", protocol, host, port );
-
-    if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
-    {
-       prmsg(1,
-             "TLIOpenCOTSServer: Unable to determine device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    if( (ciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcotsname)) == NULL )
-    {
-       prmsg(1,
-             "TLIOpenCOTSServer: Unable to open device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    /* Set the family type */
-
-    ciptr->family = TLItrans2devtab[i].family;
-
-
-    /* Save the TLIFamily for later use in TLIAddrToNetbuf() lookups */
-
-    ciptr->index = i;
-
-    return ciptr;
-}
-
-#endif /* TRANS_SERVER */
-
-
-#ifdef TRANS_CLIENT
-
-static XtransConnInfo
-TRANS(TLIOpenCLTSClient)(Xtransport *thistrans, char *protocol,
-                        char *host, char *port)
-
-{
-    XtransConnInfo     ciptr;
-    int                i;
-
-    prmsg(2,"TLIOpenCLTSClient(%s,%s,%s)\n", protocol, host, port );
-
-    if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
-    {
-       prmsg(1,
-             "TLIOpenCLTSClient: Unable to determine device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    if( (ciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcltsname)) == NULL )
-    {
-       prmsg(1,
-             "TLIOpenCLTSClient: Unable to open device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    if( TRANS(TLITLIBindLocal)(ciptr->fd,TLItrans2devtab[i].family,port) < 0 )
-    {
-       prmsg(1,
-             "TLIOpenCLTSClient: ...TLITLIBindLocal() failed: %d\n",
-             errno);
-       t_close(ciptr->fd);
-       free(ciptr);
-       return NULL;
-    }
-
-    if( TRANS(TLIGetAddr)(ciptr) < 0 )
-    {
-       prmsg(1,
-             "TLIOpenCLTSClient: ...TLIGetPeerAddr() failed: %d\n",
-             errno);
-       t_close(ciptr->fd);
-       free(ciptr);
-       return NULL;
-    }
-
-    return ciptr;
-}
-
-#endif /* TRANS_CLIENT */
-
-
-#ifdef TRANS_SERVER
-
-static XtransConnInfo
-TRANS(TLIOpenCLTSServer)(Xtransport *thistrans, char *protocol,
-                        char *host, char *port)
-
-{
-    XtransConnInfo     ciptr;
-    int                i;
-
-    prmsg(2,"TLIOpenCLTSServer(%s,%s,%s)\n", protocol, host, port );
-
-    if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
-    {
-       prmsg(1,
-             "TLIOpenCLTSServer: Unable to determine device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    if( (ciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcltsname)) == NULL )
-    {
-       prmsg(1,
-             "TLIOpenCLTSServer: Unable to open device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    return ciptr;
-}
-
-#endif /* TRANS_SERVER */
-
-
-#ifdef TRANS_REOPEN
-
-static XtransConnInfo
-TRANS(TLIReopenCOTSServer)(Xtransport *thistrans, int fd, char *port)
-
-{
-    XtransConnInfo     ciptr;
-    int                        i;
-
-    prmsg(2,"TLIReopenCOTSServer(%d, %s)\n", fd, port);
-
-    if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
-    {
-       prmsg(1,
-             "TLIReopenCOTSServer: Unable to determine device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    if( (ciptr=TRANS(TLIReopen)(
-       TLItrans2devtab[i].devcotsname, fd, port)) == NULL )
-    {
-       prmsg(1,
-             "TLIReopenCOTSServer: Unable to open device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    /* Save the TLIFamily for later use in TLIAddrToNetbuf() lookups */
-
-    ciptr->index = i;
-
-    return ciptr;
-}
-
-
-static XtransConnInfo
-TRANS(TLIReopenCLTSServer)(Xtransport *thistrans, int fd, char *port)
-
-{
-    XtransConnInfo     ciptr;
-    int                i;
-
-    prmsg(2,"TLIReopenCLTSServer(%d, %s)\n", fd, port);
-
-    if( (i=TRANS(TLISelectFamily)(thistrans->TransName)) < 0 )
-    {
-       prmsg(1,
-             "TLIReopenCLTSServer: Unable to determine device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    if( (ciptr=TRANS(TLIReopen)(
-       TLItrans2devtab[i].devcltsname, fd, port)) == NULL )
-    {
-       prmsg(1,
-             "TLIReopenCLTSServer: Unable to open device for %s\n",
-             thistrans->TransName);
-       return NULL;
-    }
-
-    ciptr->index = i;
-
-    return ciptr;
-}
-
-#endif /* TRANS_REOPEN */
-
-
-static int
-TRANS(TLISetOption)(XtransConnInfo ciptr, int option, int arg)
-
-{
-    prmsg(2,"TLISetOption(%d,%d,%d)\n", ciptr->fd, option, arg );
-
-    return -1;
-}
-
-
-#ifdef TRANS_SERVER
-
-static int
-TRANS(TLICreateListener)(XtransConnInfo ciptr, struct t_bind *req)
-
-{
-    struct t_bind      *ret;
-
-    prmsg(2,"TLICreateListener(%x->%d,%x)\n", ciptr, ciptr->fd, req );
-
-    if( (ret=(struct t_bind *)t_alloc(ciptr->fd,T_BIND,T_ALL)) == NULL )
-    {
-       prmsg(1, "TLICreateListener: failed to allocate a t_bind\n");
-       t_free((char *)req,T_BIND);
-       return TRANS_CREATE_LISTENER_FAILED;
-    }
-
-    if( t_bind(ciptr->fd, req, ret) < 0 )
-    {
-       prmsg(1, "TLICreateListener: t_bind failed\n");
-       t_free((char *)req,T_BIND);
-       t_free((char *)ret,T_BIND);
-       return TRANS_CREATE_LISTENER_FAILED;
-    }
-
-    if( memcmp(req->addr.buf,ret->addr.buf,req->addr.len) != 0 )
-    {
-       prmsg(1, "TLICreateListener: unable to bind to %x\n",
-             req);
-       t_free((char *)req,T_BIND);
-       t_free((char *)ret,T_BIND);
-       return TRANS_ADDR_IN_USE;
-    }
-
-    /*
-     * Everything looks good: fill in the XtransConnInfo structure.
-     */
-
-    if( (ciptr->addr = malloc(ret->addr.len)) == NULL )
-    {
-       prmsg(1,
-             "TLICreateListener: Unable to allocate space for the address\n");
-       t_free((char *)req,T_BIND);
-       t_free((char *)ret, T_BIND);
-       return TRANS_CREATE_LISTENER_FAILED;
-    }
-
-    ciptr->addrlen=ret->addr.len;
-    memcpy(ciptr->addr,ret->addr.buf,ret->addr.len);
-
-    t_free((char *)req,T_BIND);
-    t_free((char *)ret, T_BIND);
-
-    return 0;
-}
-
-
-static int
-TRANS(TLIINETCreateListener)(XtransConnInfo ciptr, char *port, unsigned int flags)
-
-{
-    char    portbuf[PORTBUFSIZE];
-    struct t_bind      *req;
-    struct sockaddr_in *sinaddr;
-    long               tmpport;
-
-    prmsg(2,"TLIINETCreateListener(%x->%d,%s)\n", ciptr,
-       ciptr->fd, port ? port : "NULL" );
-
-#ifdef X11_t
-    /*
-     * X has a well known port, that is transport dependent. It is easier
-     * to handle it here, than try and come up with a transport independent
-     * representation that can be passed in and resolved the usual way.
-     *
-     * The port that is passed here is really a string containing the idisplay
-     * from ConnectDisplay().
-     */
-
-    if (is_numeric (port))
-    {
-       tmpport = X_TCP_PORT + strtol (port, (char**)NULL, 10);
-       sprintf(portbuf,"%u", tmpport);
-       port = portbuf;
-    }
-#endif
-
-    if( (req=(struct t_bind *)t_alloc(ciptr->fd,T_BIND,T_ALL)) == NULL )
-    {
-       prmsg(1,
-           "TLIINETCreateListener: failed to allocate a t_bind\n");
-       return TRANS_CREATE_LISTENER_FAILED;
-    }
-
-    if( port && *port ) {
-       if(TRANS(TLIAddrToNetbuf)(ciptr->index,HOST_SELF,port,&(req->addr)) < 0)
-       {
-           prmsg(1,
-                 "TLIINETCreateListener: can't resolve name:HOST_SELF.%s\n",
-                 port);
-           t_free((char *)req,T_BIND);
-           return TRANS_CREATE_LISTENER_FAILED;
-       }
-    } else {
-       sinaddr=(struct sockaddr_in *) req->addr.buf;
-       sinaddr->sin_family=AF_INET;
-       sinaddr->sin_port=htons(0);
-       sinaddr->sin_addr.s_addr=0;
-    }
-
-    /* Set the qlen */
-
-    req->qlen=1;
-
-    return TRANS(TLICreateListener)(ciptr, req);
-}
-
-
-static int
-TRANS(TLITLICreateListener)(XtransConnInfo ciptr, char *port, unsigned int flags)
-
-{
-    struct t_bind      *req;
-    struct sockaddr_un *sunaddr;
-    int                ret_value;
-
-    prmsg(2,"TLITLICreateListener(%x->%d,%s)\n", ciptr, ciptr->fd,
-       port ? port : "NULL");
-
-    if( (req=(struct t_bind *)t_alloc(ciptr->fd,T_BIND,0)) == NULL )
-    {
-       prmsg(1,
-             "TLITLICreateListener: failed to allocate a t_bind\n");
-       return TRANS_CREATE_LISTENER_FAILED;
-    }
-
-    if( (sunaddr=(struct sockaddr_un *)
-        malloc(sizeof(struct sockaddr_un))) == NULL )
-    {
-       prmsg(1,
-             "TLITLICreateListener: failed to allocate a sockaddr_un\n");
-       t_free((char *)req,T_BIND);
-       return TRANS_CREATE_LISTENER_FAILED;
-    }
-
-    sunaddr->sun_family=AF_UNIX;
-    if( port && *port ) {
-       if( *port == '/' ) { /* A full pathname */
-           (void) strcpy(sunaddr->sun_path, port);
-       } else {
-           (void) sprintf(sunaddr->sun_path,"%s%s", TLINODENAME, port );
-       }
-    } else {
-       (void) sprintf(sunaddr->sun_path,"%s%d", TLINODENAME, getpid());
-    }
-
-    req->addr.buf=(char *)sunaddr;
-    req->addr.len=sizeof(*sunaddr);
-    req->addr.maxlen=sizeof(*sunaddr);
-
-    /* Set the qlen */
-
-    req->qlen=1;
-
-    ret_value = TRANS(TLICreateListener)(ciptr, req);
-
-    free((char *) sunaddr);
-
-    return ret_value;
-}
-
-
-static XtransConnInfo
-TRANS(TLIAccept)(XtransConnInfo ciptr, int *status)
-
-{
-    struct t_call      *call;
-    XtransConnInfo     newciptr;
-    int        i;
-
-    prmsg(2,"TLIAccept(%x->%d)\n", ciptr, ciptr->fd);
-
-    if( (call=(struct t_call *)t_alloc(ciptr->fd,T_CALL,T_ALL)) == NULL )
-    {
-       prmsg(1, "TLIAccept() failed to allocate a t_call\n");
-       *status = TRANS_ACCEPT_BAD_MALLOC;
-       return NULL;
-    }
-
-    if( t_listen(ciptr->fd,call) < 0 )
-    {
-       extern char *t_errlist[];
-       extern int t_errno;
-       prmsg(1, "TLIAccept() t_listen() failed\n");
-       prmsg(1, "TLIAccept: %s\n", t_errlist[t_errno]);
-       t_free((char *)call,T_CALL);
-       *status = TRANS_ACCEPT_MISC_ERROR;
-       return NULL;
-    }
-
-    /*
-     * Now we need to set up the new endpoint for the incoming connection.
-     */
-
-    i=ciptr->index; /* Makes the next line more readable */
-
-    if( (newciptr=TRANS(TLIOpen)(TLItrans2devtab[i].devcotsname)) == NULL )
-    {
-       prmsg(1, "TLIAccept() failed to open a new endpoint\n");
-       t_free((char *)call,T_CALL);
-       *status = TRANS_ACCEPT_MISC_ERROR;
-       return NULL;
-    }
-
-    if( TRANS(TLITLIBindLocal)(newciptr->fd,TLItrans2devtab[i].family,"") < 0 )
-    {
-       prmsg(1,
-             "TLIAccept: TRANS(TLITLIBindLocal)() failed: %d\n",
-             errno);
-       t_free((char *)call,T_CALL);
-       t_close(newciptr->fd);
-       free(newciptr);
-       *status = TRANS_ACCEPT_MISC_ERROR;
-       return NULL;
-    }
-
-
-    if( t_accept(ciptr->fd,newciptr->fd,call) < 0 )
-    {
-       extern char *t_errlist[];
-       extern int t_errno;
-       prmsg(1, "TLIAccept() t_accept() failed\n");
-       prmsg(1, "TLIAccept: %s\n", t_errlist[t_errno]);
-       if( t_errno == TLOOK )
-       {
-           int evtype = t_look(ciptr->fd);
-           prmsg(1, "TLIAccept() t_look() returned %d\n", evtype);
-           switch( evtype )
-           {
-               case T_DISCONNECT:
-                   if( t_rcvdis(ciptr->fd, NULL) < 0 )
-                   {
-                       prmsg(1, "TLIAccept() t_rcvdis() failed\n");
-                       prmsg(1, "TLIAccept: %s\n", t_errlist[t_errno]);
-                   }
-                   break;
-               default:
-                   break;
-           }
-       }
-       t_free((char *)call,T_CALL);
-       t_close(newciptr->fd);
-       free(newciptr);
-       *status = TRANS_ACCEPT_FAILED;
-       return NULL;
-    }
-
-    t_free((char *)call,T_CALL);
-
-    if( TRANS(TLIGetAddr)(newciptr) < 0 )
-    {
-       prmsg(1,
-             "TLIAccept: TRANS(TLIGetPeerAddr)() failed: %d\n",
-             errno);
-       t_close(newciptr->fd);
-       free(newciptr);
-       *status = TRANS_ACCEPT_MISC_ERROR;
-       return NULL;
-    }
-
-    if( TRANS(TLIGetPeerAddr)(newciptr) < 0 )
-    {
-       prmsg(1,
-             "TLIAccept: TRANS(TLIGetPeerAddr)() failed: %d\n",
-             errno);
-       t_close(newciptr->fd);
-       free(newciptr->addr);
-       free(newciptr);
-       *status = TRANS_ACCEPT_MISC_ERROR;
-       return NULL;
-    }
-
-    if( ioctl(newciptr->fd, I_POP,"timod") < 0 )
-    {
-       prmsg(1, "TLIAccept() ioctl(I_POP, \"timod\") failed %d\n",
-             errno);
-       t_close(newciptr->fd);
-       free(newciptr->addr);
-       free(newciptr);
-       *status = TRANS_ACCEPT_MISC_ERROR;
-       return NULL;
-    }
-
-    if( ioctl(newciptr->fd, I_PUSH,"tirdwr") < 0 )
-    {
-       prmsg(1, "TLIAccept() ioctl(I_PUSH,\"tirdwr\") failed %d\n",
-             errno);
-       t_close(newciptr->fd);
-       free(newciptr->addr);
-       free(newciptr);
-       *status = TRANS_ACCEPT_MISC_ERROR;
-       return NULL;
-    }
-
-    *status = 0;
-
-    return newciptr;
-}
-
-#endif /* TRANS_SERVER */
-
-
-#ifdef TRANS_CLIENT
-
-static int
-TRANS(TLIConnect)(XtransConnInfo ciptr, struct t_call *sndcall )
-
-{
-    prmsg(2, "TLIConnect(%x->%d,%x)\n", ciptr, ciptr->fd, sndcall);
-
-    if( t_connect(ciptr->fd,sndcall,NULL) < 0 )
-    {
-       extern char *t_errlist[];
-       extern int t_errno;
-       prmsg(1, "TLIConnect() t_connect() failed\n");
-       prmsg(1, "TLIConnect: %s\n", t_errlist[t_errno]);
-       t_free((char *)sndcall,T_CALL);
-       if (t_errno == TLOOK && t_look(ciptr->fd) == T_DISCONNECT)
-       {
-           t_rcvdis(ciptr->fd,NULL);
-           return TRANS_TRY_CONNECT_AGAIN;
-       }
-       else
-           return TRANS_CONNECT_FAILED;
-    }
-
-    t_free((char *)sndcall,T_CALL);
-
-    /*
-     * Sync up the address fields of ciptr.
-     */
-
-    if( TRANS(TLIGetAddr)(ciptr) < 0 )
-    {
-       prmsg(1,
-             "TLIConnect: ...TLIGetAddr() failed: %d\n",
-             errno);
-       return TRANS_CONNECT_FAILED;
-    }
-
-    if( TRANS(TLIGetPeerAddr)(ciptr) < 0 )
-    {
-       prmsg(1,
-             "TLIConnect: ...TLIGetPeerAddr() failed: %d\n",
-             errno);
-       return TRANS_CONNECT_FAILED;
-    }
-
-    if( ioctl(ciptr->fd, I_POP,"timod") < 0 )
-    {
-       prmsg(1, "TLIConnect() ioctl(I_POP,\"timod\") failed %d\n",
-             errno);
-       return TRANS_CONNECT_FAILED;
-    }
-
-    if( ioctl(ciptr->fd, I_PUSH,"tirdwr") < 0 )
-    {
-       prmsg(1, "TLIConnect() ioctl(I_PUSH,\"tirdwr\") failed %d\n",
-             errno);
-       return TRANS_CONNECT_FAILED;
-    }
-
-    return 0;
-}
-
-
-static int
-TRANS(TLIINETConnect)(XtransConnInfo ciptr, char *host, char *port)
-
-{
-    char       portbuf[PORTBUFSIZE];
-    struct     t_call  *sndcall;
-    long       tmpport;
-
-    prmsg(2, "TLIINETConnect(%s,%s)\n", host, port);
-
-#ifdef X11_t
-    /*
-     * X has a well known port, that is transport dependant. It is easier
-     * to handle it here, than try and come up with a transport independent
-     * representation that can be passed in and resolved the usual way.
-     *
-     * The port that is passed here is really a string containing the idisplay
-     * from ConnectDisplay().
-     */
-
-    if (is_numeric (port))
-    {
-       tmpport = X_TCP_PORT + strtol (port, (char**)NULL, 10);
-       sprintf(portbuf,"%u", tmpport );
-       port = portbuf;
-    }
-#endif
-
-    if( (sndcall=(struct t_call *)t_alloc(ciptr->fd,T_CALL,T_ALL)) == NULL )
-    {
-       prmsg(1, "TLIINETConnect() failed to allocate a t_call\n");
-       return TRANS_CONNECT_FAILED;
-    }
-
-    if( TRANS(TLIAddrToNetbuf)(ciptr->index, host, port, &(sndcall->addr) ) < 0 )
-    {
-       prmsg(1, "TLIINETConnect() unable to resolve name:%s.%s\n",
-             host, port);
-       t_free((char *)sndcall,T_CALL);
-       return TRANS_CONNECT_FAILED;
-    }
-
-    return TRANS(TLIConnect)(ciptr, sndcall );
-}
-
-
-static int
-TRANS(TLITLIConnect)(XtransConnInfo ciptr, char *host, char *port)
-
-{
-    struct t_call      *sndcall;
-    struct sockaddr_un *sunaddr;
-    int                        ret_value;
-
-    prmsg(2, "TLITLIConnect(%s,%s)\n", host, port);
-
-    if( (sndcall=(struct t_call *)t_alloc(ciptr->fd,T_CALL,T_OPT|T_UDATA)) == NULL )
-    {
-       prmsg(1, "TLITLIConnect() failed to allocate a t_call\n");
-       return TRANS_CONNECT_FAILED;
-    }
-
-    if( (sunaddr=(struct sockaddr_un *)
-        malloc(sizeof(struct sockaddr_un))) == NULL )
-    {
-       prmsg(1,
-             "TLITLIConnect: failed to allocate a sockaddr_un\n");
-       t_free((char *)sndcall,T_CALL);
-       return TRANS_CONNECT_FAILED;
-    }
-
-    sunaddr->sun_family=AF_UNIX;
-    if( *port == '/' ||
-       strncmp (port, TLINODENAME, strlen (TLINODENAME)) == 0) {
-       /* Use the port as is */
-       (void) strcpy(sunaddr->sun_path, port);
-    } else {
-       (void) sprintf(sunaddr->sun_path,"%s%s", TLINODENAME, port );
-    }
-
-    sndcall->addr.buf=(char *)sunaddr;
-    sndcall->addr.len=sizeof(*sunaddr);
-    sndcall->addr.maxlen=sizeof(*sunaddr);
-
-    ret_value = TRANS(TLIConnect)(ciptr, sndcall );
-
-    free((char *) sunaddr);
-
-    return ret_value;
-}
-
-#endif /* TRANS_CLIENT */
-
-
-static int
-TRANS(TLIBytesReadable)(XtransConnInfo ciptr, BytesReadable_t *pend)
-
-{
-    int ret;
-    struct pollfd filedes;
-
-    prmsg(2, "TLIByteReadable(%x->%d,%x)\n", ciptr, ciptr->fd, pend );
-
-    /*
-     * This function should detect hangup conditions. Use poll to check
-     * if no data is present. On SVR4, the M_HANGUP message sits on the
-     * streams head, and ioctl(N_READ) keeps returning 0 because there is
-     * no data available. The hangup goes undetected, and the client hangs.
-     */
-
-    ret=ioctl(ciptr->fd, I_NREAD, (char *)pend);
-
-    if( ret != 0 )
-       return ret; /* Data present or error */
-
-
-    /* Zero data, or POLLHUP message */
-
-    filedes.fd=ciptr->fd;
-    filedes.events=POLLIN;
-
-    ret=poll(&filedes, 1, 0);
-
-    if( ret == 0 ) {
-       *pend=0;
-       return 0; /* Really, no data */
-       }
-
-    if( ret < 0 )
-       return -1; /* just pass back the error */
-
-    if( filedes.revents & (POLLHUP|POLLERR) ) /* check for hangup */
-       return -1;
-
-    /* Should only get here if data arrived after the first ioctl() */
-    return ioctl(ciptr->fd, I_NREAD, (char *)pend);
-}
-
-
-static int
-TRANS(TLIRead)(XtransConnInfo ciptr, char *buf, int size)
-
-{
-    prmsg(2, "TLIRead(%d,%x,%d)\n", ciptr->fd, buf, size );
-
-    return read(ciptr->fd,buf,size);
-}
-
-
-static int
-TRANS(TLIWrite)(XtransConnInfo ciptr, char *buf, int size)
-
-{
-    prmsg(2, "TLIWrite(%d,%x,%d)\n", ciptr->fd, buf, size );
-
-    return write(ciptr->fd,buf,size);
-}
-
-
-static int
-TRANS(TLIReadv)(XtransConnInfo ciptr, struct iovec *buf, int size)
-
-{
-    prmsg(2, "TLIReadv(%d,%x,%d)\n", ciptr->fd, buf, size );
-
-    return READV(ciptr,buf,size);
-}
-
-
-static int
-TRANS(TLIWritev)(XtransConnInfo ciptr, struct iovec *buf, int size)
-
-{
-    prmsg(2, "TLIWritev(%d,%x,%d)\n", ciptr->fd, buf, size );
-
-    return WRITEV(ciptr,buf,size);
-}
-
-
-static int
-TRANS(TLIDisconnect)(XtransConnInfo ciptr)
-
-{
-    prmsg(2, "TLIDisconnect(%x->%d)\n", ciptr, ciptr->fd);
-
-    /*
-     * Restore the TLI modules so that the connection can be properly shutdown.
-     * This avoids the situation where a connection goes into the TIME_WAIT
-     * state, and the address remains unavailable for a while.
-     */
-    ioctl(ciptr->fd, I_POP,"tirdwr");
-    ioctl(ciptr->fd, I_PUSH,"timod");
-
-    t_snddis(ciptr->fd,NULL);
-
-    return 0;
-}
-
-
-static int
-TRANS(TLIClose)(XtransConnInfo ciptr)
-
-{
-    prmsg(2, "TLIClose(%x->%d)\n", ciptr, ciptr->fd);
-
-    t_unbind(ciptr->fd);
-
-    return (t_close(ciptr->fd));
-}
-
-
-static int
-TRANS(TLICloseForCloning)(XtransConnInfo ciptr)
-
-{
-    /*
-     * Don't unbind.
-     */
-
-    prmsg(2, "TLICloseForCloning(%x->%d)\n", ciptr, ciptr->fd);
-
-    return (t_close(ciptr->fd));
-}
-
-
-Xtransport     TRANS(TLITCPFuncs) = {
-       /* TLI Interface */
-       "tcp",
-       0,
-#ifdef TRANS_CLIENT
-       TRANS(TLIOpenCOTSClient),
-#endif /* TRANS_CLIENT */
-#ifdef TRANS_SERVER
-       NULL,
-       TRANS(TLIOpenCOTSServer),
-#endif /* TRANS_SERVER */
-#ifdef TRANS_CLIENT
-       TRANS(TLIOpenCLTSClient),
-#endif /* TRANS_CLIENT */
-#ifdef TRANS_SERVER
-       TRANS(TLIOpenCLTSServer),
-#endif /* TRANS_SERVER */
-#ifdef TRANS_REOPEN
-       TRANS(TLIReopenCOTSServer),
-       TRANS(TLIReopenCLTSServer),
-#endif
-       TRANS(TLISetOption),
-#ifdef TRANS_SERVER
-       TRANS(TLIINETCreateListener),
-       NULL,                                   /* ResetListener */
-       TRANS(TLIAccept),
-#endif /* TRANS_SERVER */
-#ifdef TRANS_CLIENT
-       TRANS(TLIINETConnect),
-#endif /* TRANS_CLIENT */
-       TRANS(TLIBytesReadable),
-       TRANS(TLIRead),
-       TRANS(TLIWrite),
-       TRANS(TLIReadv),
-       TRANS(TLIWritev),
-       TRANS(TLIDisconnect),
-       TRANS(TLIClose),
-       TRANS(TLICloseForCloning),
-};
-
-#ifdef TRANS_SERVER
-static char * inet_aliases[] = { "tcp", NULL };
-#endif
-Xtransport     TRANS(TLIINETFuncs) = {
-       /* TLI Interface */
-       "inet",
-       TRANS_ALIAS,
-#ifdef TRANS_CLIENT
-       TRANS(TLIOpenCOTSClient),
-#endif /* TRANS_CLIENT */
-#ifdef TRANS_SERVER
-       inet_aliases,
-       TRANS(TLIOpenCOTSServer),
-#endif /* TRANS_SERVER */
-#ifdef TRANS_CLIENT
-       TRANS(TLIOpenCLTSClient),
-#endif /* TRANS_CLIENT */
-#ifdef TRANS_SERVER
-       TRANS(TLIOpenCLTSServer),
-#endif /* TRANS_SERVER */
-#ifdef TRANS_REOPEN
-       TRANS(TLIReopenCOTSServer),
-       TRANS(TLIReopenCLTSServer),
-#endif
-       TRANS(TLISetOption),
-#ifdef TRANS_SERVER
-       TRANS(TLIINETCreateListener),
-       NULL,                                   /* ResetListener */
-       TRANS(TLIAccept),
-#endif /* TRANS_SERVER */
-#ifdef TRANS_CLIENT
-       TRANS(TLIINETConnect),
-#endif /* TRANS_CLIENT */
-       TRANS(TLIBytesReadable),
-       TRANS(TLIRead),
-       TRANS(TLIWrite),
-       TRANS(TLIReadv),
-       TRANS(TLIWritev),
-       TRANS(TLIDisconnect),
-       TRANS(TLIClose),
-       TRANS(TLICloseForCloning),
-};
-
-Xtransport     TRANS(TLITLIFuncs) = {
-       /* TLI Interface */
-       "tli",
-       0,
-#ifdef TRANS_CLIENT
-       TRANS(TLIOpenCOTSClient),
-#endif /* TRANS_CLIENT */
-#ifdef TRANS_SERVER
-       NULL,
-       TRANS(TLIOpenCOTSServer),
-#endif /* TRANS_SERVER */
-#ifdef TRANS_CLIENT
-       TRANS(TLIOpenCLTSClient),
-#endif /* TRANS_CLIENT */
-#ifdef TRANS_SERVER
-       TRANS(TLIOpenCLTSServer),
-#endif /* TRANS_SERVER */
-#ifdef TRANS_REOPEN
-       TRANS(TLIReopenCOTSServer),
-       TRANS(TLIReopenCLTSServer),
-#endif
-       TRANS(TLISetOption),
-#ifdef TRANS_SERVER
-       TRANS(TLITLICreateListener),
-       NULL,                                   /* ResetListener */
-       TRANS(TLIAccept),
-#endif /* TRANS_SERVER */
-#ifdef TRANS_CLIENT
-       TRANS(TLITLIConnect),
-#endif /* TRANS_CLIENT */
-       TRANS(TLIBytesReadable),
-       TRANS(TLIRead),
-       TRANS(TLIWrite),
-       TRANS(TLIReadv),
-       TRANS(TLIWritev),
-       TRANS(TLIDisconnect),
-       TRANS(TLIClose),
-       TRANS(TLICloseForCloning),
-};
index 52c937b..63f0fc3 100644 (file)
@@ -95,7 +95,7 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
 
     switch( *familyp )
     {
-#if defined(TCPCONN) || defined(STREAMSCONN)
+#if defined(TCPCONN)
     case AF_INET:
     {
        /*
@@ -158,7 +158,7 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
        break;
     }
 #endif /* IPv6 */
-#endif /* defined(TCPCONN) || defined(STREAMSCONN) */
+#endif /* defined(TCPCONN) */
 
 
 #if defined(UNIXCONN) || defined(LOCALCONN)
@@ -251,7 +251,7 @@ TRANS(GetMyNetworkId) (XtransConnInfo ciptr)
 
     switch (family)
     {
-#if defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN)
+#if defined(UNIXCONN) || defined(LOCALCONN)
     case AF_UNIX:
     {
        struct sockaddr_un *saddr = (struct sockaddr_un *) addr;
@@ -261,9 +261,9 @@ TRANS(GetMyNetworkId) (XtransConnInfo ciptr)
            hostnamebuf, saddr->sun_path);
        break;
     }
-#endif /* defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) */
+#endif /* defined(UNIXCONN) || defined(LOCALCONN) */
 
-#if defined(TCPCONN) || defined(STREAMSCONN)
+#if defined(TCPCONN)
     case AF_INET:
 #if defined(IPv6) && defined(AF_INET6)
     case AF_INET6:
@@ -290,7 +290,7 @@ TRANS(GetMyNetworkId) (XtransConnInfo ciptr)
        sprintf (networkId, "%s/%s:%s", transName, hostnamebuf, portnumbuf);
        break;
     }
-#endif /* defined(TCPCONN) || defined(STREAMSCONN) */
+#endif /* defined(TCPCONN) */
 
 
     default:
@@ -306,24 +306,12 @@ static jmp_buf env;
 #ifdef SIGALRM
 static volatile int nameserver_timedout = 0;
 
-static
-#ifdef RETSIGTYPE /* set by autoconf AC_TYPE_SIGNAL */
-RETSIGTYPE
-#else /* Imake */
-#ifdef SIGNALRETURNSINT
-int
-#else
-void
-#endif
-#endif
+static void
 nameserver_lost(int sig _X_UNUSED)
 {
   nameserver_timedout = 1;
   longjmp (env, -1);
   /* NOTREACHED */
-#ifdef SIGNALRETURNSINT
-  return -1;                           /* for picky compilers */
-#endif
 }
 #endif /* SIGALARM */
 
@@ -341,16 +329,16 @@ TRANS(GetPeerNetworkId) (XtransConnInfo ciptr)
     switch (family)
     {
     case AF_UNSPEC:
-#if defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN)
+#if defined(UNIXCONN) || defined(LOCALCONN)
     case AF_UNIX:
     {
        if (gethostname (addrbuf, sizeof (addrbuf)) == 0)
            addr = addrbuf;
        break;
     }
-#endif /* defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) */
+#endif /* defined(UNIXCONN) || defined(LOCALCONN) */
 
-#if defined(TCPCONN) || defined(STREAMSCONN)
+#if defined(TCPCONN)
     case AF_INET:
 #if defined(IPv6) && defined(AF_INET6)
     case AF_INET6:
@@ -410,7 +398,7 @@ TRANS(GetPeerNetworkId) (XtransConnInfo ciptr)
        break;
     }
 
-#endif /* defined(TCPCONN) || defined(STREAMSCONN) */
+#endif /* defined(TCPCONN) */
 
 
     default:
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..fc34bd5
--- /dev/null
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+if test -z "$NOCONFIGURE"; then
+    $srcdir/configure "$@"
+fi
index 3d11c34..bb8a34c 100644 (file)
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([xtrans], [1.2.7],
+AC_INIT([xtrans], [1.3.4],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xtrans])
 AC_CONFIG_SRCDIR([Makefile.am])
 
 # Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
 
 # Require xorg-macros minimum of 1.12 for DocBook external references
 m4_ifndef([XORG_MACROS_VERSION],
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644 (file)
index 0000000..6b38d4b
--- /dev/null
@@ -0,0 +1,6 @@
+#              Add & Override for this directory and it's subdirectories
+*.html
+*.ps
+*.pdf
+*.txt
+*.db
index 12dbe3c..59daa3f 100644 (file)
@@ -24,7 +24,7 @@
      </othercredit>
    </authorgroup>
    <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
-   <releaseinfo>Version 0.7</releaseinfo>
+   <releaseinfo>Version 1.2</releaseinfo>
    <copyright><year>1993</year><year>1994</year>
      <holder>NCR Corporation - Dayton, Ohio, USA</holder>
    </copyright>
@@ -378,7 +378,8 @@ provide a more familiar interface that can be used to port existing code.
 <para>
 A macro is defined in Xtrans.h for TRANS(func) that creates a unique function
 name depending on where the code is compiled. For example, when built for
-Xlib, TRANS(OpenCOTSClient) becomes <function>_X11TransOpenCOTSClient</function>.
+Xlib, <function>TRANS(OpenCOTSClient)</function> becomes
+<function>_X11TransOpenCOTSClient</function>.
 </para>
 <para>
 All failures are considered fatal, and the connection should be closed
@@ -389,64 +390,85 @@ errno will be available for debugging purposes.
 <title>Core Interface API</title>
 <itemizedlist mark='bullet'>
   <listitem>
-    <para>
-XtransConnInfo TRANS(OpenCOTSClient)(char *address)
-    </para>
+    <funcsynopsis id='TRANSOpenCOTSClient'>
+      <funcprototype>
+        <funcdef>XtransConnInfo <function>TRANS(OpenCOTSClient)</function></funcdef>
+        <paramdef>char *<parameter>address</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a Connection-Oriented Transport that is
 suitable for use by a client. The parameter <parameter>address</parameter>
-contains the full address of the server to which this endpoint will be connected.  This
-functions returns an opaque transport connection object on success, or
-NULL on failure.
+contains the full address of the server to which this endpoint will be
+connected.  This function returns an opaque transport connection object on
+success, or <constant>NULL</constant> on failure.
     </para>
   </listitem>
   <listitem>
-    <para>
-XtransConnInfo TRANS(OpenCOTSServer)(char *address)
-    </para>
+    <funcsynopsis id='TRANSOpenCOTSServer'>
+      <funcprototype>
+        <funcdef>XtransConnInfo <function>TRANS(OpenCOTSServer)</function></funcdef>
+        <paramdef>char *<parameter>address</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a Connection-Oriented Transport that is suitable
 for use by a server. The parameter <parameter>address</parameter> contains the
-full address to which this server will be bound. This functions returns an opaque
-transport connection object on success, or NULL on failure.
+full address to which this server will be bound. This function returns an
+opaque transport connection object on success, or <constant>NULL</constant>
+on failure.
     </para>
   </listitem>
   <listitem>
-    <para>
-XtransConnInfo TRANS(OpenCLTSClient)(char *address)
-    </para>
+    <funcsynopsis id='TRANSOpenCLTSClient'>
+      <funcprototype>
+        <funcdef>XtransConnInfo <function>TRANS(OpenCLTSClient)</function></funcdef>
+        <paramdef>char *<parameter>address</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a Connection-Less Transport that is suitable for
 use by a client. The parameter <parameter>address</parameter> contains the
-full address of the server to which this endpoint will be connected. This functions
-returns an opaque transport connection object on success, or NULL on failure.
+full address of the server to which this endpoint will be connected. This
+function returns an opaque transport connection object on success, or
+<constant>NULL</constant> on failure.
     </para>
   </listitem>
   <listitem>
-    <para>
-XtransConnInfo TRANS(OpenCLTSServer)(char *address)
-    </para>
+    <funcsynopsis id='TRANSOpenCLTSServer'>
+      <funcprototype>
+        <funcdef>XtransConnInfo <function>TRANS(OpenCLTSServer)</function></funcdef>
+        <paramdef>char *<parameter>address</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a Connection-Less Transport that is suitable for
 use by a server. The parameter <parameter>address</parameter> contains the
-full address to which this server will be bound. This functions returns an opaque
-transport connection object on success, or NULL on failure.
+full address to which this server will be bound. This function returns an
+opaque transport connection object on success, or <constant>NULL</constant>
+on failure.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(SetOption)(XtransConnInfo connection, int option, int arg)
-    </para>
+    <funcsynopsis id='TRANSSetOption'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(SetOption)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>int <parameter>option</parameter></paramdef>
+        <paramdef>int <parameter>arg</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function sets transport options, similar to the way
 <function>setsockopt()</function> and <function>ioctl()</function> work.
 The parameter <parameter>connection</parameter> is an endpoint
-that was obtained from _XTransOpen*() functions. The parameter
-<parameter>option</parameter> contains the option that will be set. The actual
-values for option are defined in a later section. The parameter
-<parameter>arg</parameter> can be used to pass in an additional value that may
-be required by some options. This function return 0 on
-success and -1 on failure.
+that was obtained from <function>_XTransOpen*()</function> functions.
+The parameter <parameter>option</parameter> contains the option that will
+be set. The actual values for <parameter>option</parameter> are defined in a
+<link linkend='Transport_Option_Definition'>later section</link>.
+The parameter <parameter>arg</parameter> can be used to pass
+in an additional value that may be required by some options.
+This function returns 0 on success and -1 on failure.
     </para>
     <note><para>
 Based on current usage, the complimentary function
@@ -454,16 +476,21 @@ Based on current usage, the complimentary function
     </para></note>
   </listitem>
   <listitem>
-    <para>
-int TRANS(CreateListener)(XtransConnInfo connection, char *port, int flags)
-    </para>
+    <funcsynopsis id='TRANSCreateListener'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(CreateListener)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>int <parameter>flags</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function sets up the server endpoint for listening. The parameter
 <parameter>connection</parameter> is an endpoint that was obtained from
 <function>TRANS(OpenCOTSServer)()</function> or
 <function>TRANS(OpenCLTSServer)()</function>. The parameter
-<parameter>port</parameter> specifies the
-port to which this endpoint should be bound for listening. If port is NULL,
+<parameter>port</parameter> specifies the port to which this endpoint
+should be bound for listening. If port is <constant>NULL</constant>,
 then the transport may attempt to allocate any available TSAP for this
 connection. If the transport cannot support this, then this function will
 return a failure. The <parameter>flags</parameter> parameter can be set
@@ -474,9 +501,12 @@ function itself to fail. This function return 0 on success and -1 on failure.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(ResetListener)(XtransConnInfo connection)
-    </para>
+    <funcsynopsis id='TRANSResetListener'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(ResetListener)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 When a server is restarted, certain listen ports may need to be reset.
 For example, unix domain needs to check that the file used for
@@ -491,44 +521,61 @@ This function will return one of the following values:
     </para>
   </listitem>
   <listitem>
-    <para>
-XtransConnInfo TRANS(Accept)(XtransConnInfo connection)
-    </para>
+    <funcsynopsis id='TRANSAccept'>
+      <funcprototype>
+        <funcdef>XtransConnInfo <function>TRANS(Accept)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 Once a connection indication is received, this function can be called to
 accept the connection. The parameter <parameter>connection</parameter> is
 an opened and bound endpoint that was obtained from
 <function>TRANS(OpenCOTSServer)()</function> and passed to
 <function>TRANS(CreateListener)()</function>. This function will return a
-new opaque transport connection object upon success, NULL otherwise.
+new opaque transport connection object upon success,
+<constant>NULL</constant> otherwise.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(Connect)(XtransConnInfo connection, char *address)
-    </para>
+    <funcsynopsis id='TRANSConnect'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(Connect)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>char *<parameter>address</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a connection to a server. The parameter
 <parameter>connection</parameter> is an endpoint that was obtained
 from <function>TRANS(OpenCOTSClient)()</function>. The parameter
 <parameter>address</parameter> specifies the TSAP to which this endpoint
-should connect. If the
-protocol is included in the address, it will be ignored. This function
-return 0 on success and -1 on failure.
+should connect. If the protocol is included in the address, it will be
+ignored. This function returns 0 on success and -1 on failure.
     </para>
   </listitem>
   <listitem>
+    <funcsynopsis id='TRANSBytesReadable'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(BytesReadable)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>BytesReadable_t *<parameter>pend</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
-int TRANS(BytesReadable)(XtransConnInfo connection, BytesReadable_t *pend);
-    </para>
-    <para>
-This function provides the same functionality as the BytesReadable macro.
+This function provides the same functionality as the
+<function>BytesReadable</function> macro.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(Read)(XtransConnInfo connection, char *buf, int size)
-    </para>
+    <funcsynopsis id='TRANSRead'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(Read)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>char *<parameter>buf</parameter></paramdef>
+        <paramdef>int <parameter>size</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function will return the number of bytes requested on a COTS
 connection, and will return the minimum of the number bytes requested or
@@ -536,34 +583,52 @@ the size of the incoming packet on a CLTS connection.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(Write)(XtransConnInfo connection, char *buf, int size)
-    </para>
+    <funcsynopsis id='TRANSWrite'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(Write)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>char *<parameter>buf</parameter></paramdef>
+        <paramdef>int <parameter>size</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function will write the requested number of bytes on a COTS
 connection, and will send a packet of the requested size on a CLTS connection.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(Readv)(XtransConnInfo connection, struct iovec *buf, int size)
-    </para>
+    <funcsynopsis id='TRANSReadv'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(Readv)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>struct iovec *<parameter>buf</parameter></paramdef>
+        <paramdef>int <parameter>size</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 Similar to <function>TRANS(Read)()</function>.
     </para>
   </listitem>
   <listitem>
-    <para>
-  int TRANS(Writev)(XtransConnInfo connection, struct iovec *buf, int size)
-    </para>
+    <funcsynopsis id='TRANSWritev'>
+      <funcprototype>
+        <funcdef>  int <function>TRANS(Writev)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>struct iovec *<parameter>buf</parameter></paramdef>
+        <paramdef>int <parameter>size</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 Similar to <function>TRANS(Write)()</function>.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(Disconnect)(XtransConnInfo connection)
-    </para>
+    <funcsynopsis id='TRANSDisconnect'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(Disconnect)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function is used when an orderly disconnect is desired. This function
 breaks the connection on the transport. It is similar to the socket function
@@ -571,9 +636,12 @@ breaks the connection on the transport. It is similar to the socket function
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(Close)(XtransConnInfo connection)
-    </para>
+    <funcsynopsis id='TRANSClose'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(Close)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function closes the transport, unbinds it, and frees all resources that
 was associated with the transport. If a <function>TRANS(Disconnect)</function>
@@ -581,58 +649,75 @@ call was not made on the connection, a disorderly disconnect may occur.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(IsLocal)(XtransConnInfo connection)
-    </para>
+    <funcsynopsis id='TRANSIsLocal'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(IsLocal)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 Returns TRUE if it is a local transport.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(GetMyAddr)(XtransConnInfo connection, int *familyp, int *addrlenp,
-Xtransaddr **addrp)
-    </para>
-    <para>
-This function is similar to
-<function>getsockname()</function>.
+    <funcsynopsis id='TRANSGetMyAddr'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(GetMyAddr)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>int *<parameter>familyp</parameter></paramdef>
+        <paramdef>int *<parameter>addrlenp</parameter></paramdef>
+        <paramdef>Xtransaddr **<parameter>addrp</parameter></paramdef>
+       </funcprototype>
+    </funcsynopsis>
+    <para>
+This function is similar to <function>getsockname()</function>.
 This function will allocate space for the address, so it must be freed by
 the caller. Not all transports will have a valid address until a connection
 is established.  This function should not be used until the connection is
-established with
-<function>Connect()</function> or
+established with <function>Connect()</function> or
 <function>Accept()</function>.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(GetPeerAddr)(XtransConnInfo connection, int *familyp, int *addrlenp,
-Xtransaddr **addrp)
-    </para>
-    <para>
-This function is similar to
-<function>getpeername()</function>.
+    <funcsynopsis id='TRANSGetPeerAddr'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(GetPeerAddr)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+        <paramdef>int *<parameter>familyp</parameter></paramdef>
+        <paramdef>int *<parameter>addrlenp</parameter></paramdef>
+        <paramdef>Xtransaddr **<parameter>addrp</parameter></paramdef>
+       </funcprototype>
+    </funcsynopsis>
+    <para>
+This function is similar to <function>getpeername()</function>.
 This function will allocate space for the address, so it must be freed by
 the caller. Not all transports will have a valid address until a connection
 is established.  This function should not be used until the connection is
-established with
-<function>Connect()</function> or
+established with <function>Connect()</function> or
 <function>Accept()</function>.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(GetConnectionNumber)(XtransConnInfo connection)
-    </para>
+    <funcsynopsis id='TRANSGetConnectionNumber'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(GetConnectionNumber)</function></funcdef>
+        <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 Returns the file descriptor associated with this transport.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(MakeAllCOTSServerListeners)(char *port, int *partial_ret,
-int *count_ret, XtransConnInfo **connections_ret)
-    </para>
+    <funcsynopsis id='TRANSMakeAllCOTSServerListeners'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(MakeAllCOTSServerListeners)</function></funcdef>
+        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>int *<parameter>partial_ret</parameter></paramdef>
+        <paramdef>int *<parameter>count_ret</parameter></paramdef>
+        <paramdef>XtransConnInfo **<parameter>connections_ret</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function should be used by most servers. It will try to establish
 a COTS server endpoint for each transport listed in the transport table.
@@ -643,10 +728,15 @@ is the list of transports.
     </para>
   </listitem>
   <listitem>
-    <para>
-int TRANS(MakeAllCLTSServerListeners)( char *port, int *partial_ret,
-int *count_ret, XtransConnInfo **connections_ret)
-    </para>
+    <funcsynopsis id='TRANSMakeAllCLTSServerListeners'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(MakeAllCLTSServerListeners)</function></funcdef>
+        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>int *<parameter>partial_ret</parameter></paramdef>
+        <paramdef>int *<parameter>count_ret</parameter></paramdef>
+        <paramdef>XtransConnInfo **<parameter>connections_ret</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function should be used by most servers. It will try to establish a
 CLTS server endpoint for each transport listed in the transport table.
@@ -668,13 +758,19 @@ convenience.
 </para>
 <itemizedlist mark='bullet'>
   <listitem>
-    <para>
-int TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr *addrp)
-    </para>
+    <funcsynopsis id='TRANSConvertAddress'>
+      <funcprototype>
+        <funcdef>int <function>TRANS(ConvertAddress)</function></funcdef>
+        <paramdef>int *<parameter>familyp</parameter></paramdef>
+        <paramdef>int *<parameter>addrlenp</parameter></paramdef>
+        <paramdef>Xtransaddr *<parameter>addrp</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function converts a sockaddr based address to an X authorization based
-address (ie AF_INET, AF_UNIX to the X protocol definition (ie FamilyInternet,
-FamilyLocal)).
+address (ie <symbol>AF_INET</symbol>, <symbol>AF_UNIX</symbol> to the X
+protocol definition (ie <symbol>FamilyInternet</symbol>,
+<symbol>FamilyLocal</symbol>)).
     </para>
   </listitem>
 </itemizedlist>
@@ -685,8 +781,8 @@ FamilyLocal)).
 <title>Transport Option Definition</title>
 <para>
 The following options are defined for the
-<function>TRANS(SetOption)()</function>
- function. If an OS or transport does not support any of these options,
+<link linkend='TRANSSetOption'><function>TRANS(SetOption)()</function></link>
+function. If an OS or transport does not support any of these options,
 then it will silently ignore the option.
 </para>
 
@@ -726,18 +822,22 @@ the <code>#ifdef SUNSYSV</code> should be handled inside these functions.
 
 <itemizedlist mark='bullet'>
   <listitem>
-    <para>
-XtransConnInfo *OpenCOTSClient (
-struct _Xtransport *thistrans, char *protocol, char *host, char *port)
-    </para>
+    <funcsynopsis id='OpenCOTSClient'>
+      <funcprototype>
+        <funcdef>XtransConnInfo *<function>OpenCOTSClient</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>char *<parameter>protocol</parameter></paramdef>
+        <paramdef>char *<parameter>host</parameter></paramdef>
+        <paramdef>char *<parameter>port</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a Connection-Oriented Transport. The parameter
-<parameter>thistrans</parameter>
-points to an Xtransport entry in the transport table. The parameters
-<parameter>protocol</parameter>,
-<parameter>host</parameter>,  and
-<parameter>port</parameter>, point to strings containing the corresponding
-parts of the address that was passed into <function>TRANS(OpenCOTSClient)()</function>.
+<parameter>thistrans</parameter> points to an Xtransport entry in the
+transport table. The parameters <parameter>protocol</parameter>,
+<parameter>host</parameter>, and <parameter>port</parameter>, point to
+strings containing the corresponding parts of the address that was passed into
+<link linkend='TRANSOpenCOTSClient'><function>TRANS(OpenCOTSClient)()</function></link>.
 This function must allocate and initialize the contents of the XtransConnInfo
 structure that is returned by this function. This function will open the
 transport, and bind it into the transport namespace if applicable. The local
@@ -746,39 +846,44 @@ this function.
     </para>
   </listitem>
   <listitem>
-    <para>
-XtransConnInfo *OpenCOTSServer (
-struct _Xtransport *thistrans, char *protocol, char *host, char *port)
-    </para>
+    <funcsynopsis id='OpenCOTSServer'>
+      <funcprototype>
+        <funcdef>XtransConnInfo *<function>OpenCOTSServer</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>char *<parameter>protocol</parameter></paramdef>
+        <paramdef>char *<parameter>host</parameter></paramdef>
+        <paramdef>char *<parameter>port</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a Connection-Oriented Transport. The parameter
-<parameter>thistrans</parameter>
-points to an Xtransport entry in the transport table. The
-parameters
-<parameter>protocol</parameter>,
-<parameter>host</parameter>, and
-<parameter>port</parameter> point to strings containing the
-corresponding parts of the address that was passed into
-<function>TRANS(OpenCOTSClient)()</function>.
+<parameter>thistrans</parameter> points to an Xtransport entry in the
+transport table. The parameters <parameter>protocol</parameter>,
+<parameter>host</parameter>, and <parameter>port</parameter> point to
+strings containing the corresponding parts of the address that was passed into
+<link linkend='TRANSOpenCOTSServer'><function>TRANS(OpenCOTSServer)()</function></link>.
 This function must allocate and initialize the contents of the
 XtransConnInfo structure that is returned by this function. This function
 will open the transport.
     </para>
   </listitem>
   <listitem>
-    <para>
-XtransConnInfo *OpenCLTSClient (
-struct _Xtransport *thistrans, char *protocol, char *host, char *port)
-    </para>
+    <funcsynopsis id='OpenCLTSClient'>
+      <funcprototype>
+        <funcdef>XtransConnInfo *<function>OpenCLTSClient</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>char *<parameter>protocol</parameter></paramdef>
+        <paramdef>char *<parameter>host</parameter></paramdef>
+        <paramdef>char *<parameter>port</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a Connection-Less Transport. The parameter
-<parameter>thistrans</parameter>
-points to an Xtransport entry in the transport table. The parameters
-<parameter>protocol</parameter>,
-<parameter>host</parameter>, and
-<parameter>port</parameter> point to strings containing the
-corresponding parts of the address that was passed into
-<function>TRANS(OpenCOTSClient)()</function>.
+<parameter>thistrans</parameter> points to an Xtransport entry in the
+transport table. The parameters <parameter>protocol</parameter>,
+<parameter>host</parameter>, and <parameter>port</parameter> point to strings
+containing the corresponding parts of the address that was passed into
+<link linkend='TRANSOpenCLTSClient'><function>TRANS(OpenCLTSClient)()</function></link>.
 This function must allocate and initialize the contents of the XtransConnInfo
 structure that is returned by this function. This function will open the
 transport, and bind it into the transport namespace if applicable. The
@@ -787,28 +892,36 @@ in by this function.
     </para>
   </listitem>
   <listitem>
-    <para>
-XtransConnInfo *OpenCLTSServer (
-struct _Xtransport *thistrans, char *protocol, char *host, char *port)
-    </para>
+    <funcsynopsis id='OpenCLTSServer'>
+      <funcprototype>
+        <funcdef>XtransConnInfo *<function>OpenCLTSServer</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>char *<parameter>protocol</parameter></paramdef>
+        <paramdef>char *<parameter>host</parameter></paramdef>
+        <paramdef>char *<parameter>port</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a Connection-Less Transport. The parameter
-<parameter>thistrans</parameter>
-points to an Xtransport entry in the transport table. The  parameters
-<parameter>protocol</parameter>,
-<parameter>host</parameter>, and
-<parameter>port</parameter> point to strings containing the
-corresponding parts of the address that was passed into
-<function>TRANS(OpenCOTSClient)()</function>.
+<parameter>thistrans</parameter> points to an Xtransport entry in the
+transport table. The parameters <parameter>protocol</parameter>,
+<parameter>host</parameter>, and <parameter>port</parameter> point to strings
+containing the corresponding parts of the address that was passed into
+<link linkend='TRANSOpenCLTSServer'><function>TRANS(OpenCLTSServer)()</function></link>.
 This function must allocate and initialize the contents of the
 XtransConnInfo structure that is returned by this function. This
 function will open the transport.
     </para>
   </listitem>
   <listitem>
-    <para>
-int SetOption (struct _Xtransport *thistrans, int option, int arg)
-    </para>
+    <funcsynopsis id='SetOption'>
+      <funcprototype>
+        <funcdef>int <function>SetOption</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>int <parameter>option</parameter></paramdef>
+        <paramdef>int <parameter>arg</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function provides a transport dependent way of implementing the
 options defined by the X Transport Interface. In the current prototype,
@@ -818,9 +931,14 @@ different transport type is added, or a transport dependent option is defined.
     </para>
   </listitem>
   <listitem>
-    <para>
-int CreateListener (struct _Xtransport *thistrans, char *port, int flags )
-    </para>
+    <funcsynopsis id='CreateListener'>
+      <funcprototype>
+        <funcdef>int <function>CreateListener</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>char <parameter>*port</parameter></paramdef>
+        <paramdef>int <parameter>flags</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function takes a transport endpoint opened for a server, and sets it
 up to listen for incoming connection requests. The parameter
@@ -838,17 +956,23 @@ listen for incoming connection requests.
     </para>
   </listitem>
   <listitem>
-    <para>
-int ResetListener (struct _Xtransport *thistrans)
-    </para>
+    <funcsynopsis id='ResetListener'>
+      <funcprototype>
+        <funcdef>int <function>ResetListener</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function resets the transport for listening.
     </para>
   </listitem>
   <listitem>
-    <para>
- XtransConnInfo Accept(struct _Xtransport *thistrans)
-    </para>
+    <funcsynopsis id='Accept'>
+      <funcprototype>
+        <funcdef> XtransConnInfo <function>Accept</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function creates a new transport endpoint as a result of an
 incoming connection request. The parameter
@@ -859,13 +983,17 @@ structure describing the new endpoint is returned from this function
     </para>
   </listitem>
   <listitem>
-    <para>
-int Connect(struct _Xtransport *thistrans, char *host, char *port )
-    </para>
+    <funcsynopsis id='Connect'>
+      <funcprototype>
+        <funcdef>int <function>Connect</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>char *<parameter>host</parameter></paramdef>
+        <paramdef>char *<parameter>port</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function establishes a connection to a server. The parameters
-<parameter>host</parameter>  and
-<parameter>port</parameter>
+<parameter>host</parameter> and <parameter>port</parameter>
 describe the server to which the connection should be
 established. The connection will be established so that
 <function>Read()</function> and
@@ -873,52 +1001,80 @@ established. The connection will be established so that
     </para>
   </listitem>
   <listitem>
-    <para>
-int BytesReadable(struct _Xtransport *thistrans, BytesReadable_t *pend )
-    </para>
-    <para>
-This function replaces the
-<function>BytesReadable()</function>
-macro. This allows each transport to have it’s own mechanism for determining
+    <funcsynopsis id='BytesReadable'>
+      <funcprototype>
+        <funcdef>int <function>BytesReadable</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>BytesReadable_t *<parameter>pend</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+    <para>
+This function replaces the <function>BytesReadable()</function>
+macro. This allows each transport to have its own mechanism for determining
 how much data is ready to be read.
     </para>
   </listitem>
   <listitem>
-    <para>
-int Read(struct _Xtransport *thistrans, char *buf, int size )
-    </para>
-    <para>
-This function reads size bytes into buf from the connection.
+    <funcsynopsis id='Read'>
+      <funcprototype>
+        <funcdef>int <function>Read</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>char *<parameter>buf</parameter></paramdef>
+        <paramdef>int <parameter>size</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+    <para>
+This function reads <parameter>size</parameter> bytes into
+<parameter>buf</parameter> from the connection.
     </para>
   </listitem>
   <listitem>
-    <para>
-int Write(struct _Xtransport *thistrans, char *buf, int size )
-    </para>
-    <para>
-This function writes size bytes from buf to the connection.
+    <funcsynopsis id='Write'>
+      <funcprototype>
+        <funcdef>int <function>Write</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>char *<parameter>buf</parameter></paramdef>
+        <paramdef>int <parameter>size</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+    <para>
+This function writes <parameter>size</parameter> bytes from
+<parameter>buf</parameter> to the connection.
     </para>
   </listitem>
   <listitem>
-    <para>
-int Readv(struct _Xtransport *thistrans, struct iovec *buf, int size )
-    </para>
+    <funcsynopsis id='Readv'>
+      <funcprototype>
+        <funcdef>int <function>Readv</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>struct iovec *<parameter>buf</parameter></paramdef>
+        <paramdef>int <parameter>size</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function performs a <function>readv()</function> on the connection.
     </para>
   </listitem>
   <listitem>
-    <para>
-int Writev(struct _Xtransport *thistrans, struct iovec *buf, int size )
-    </para>
+    <funcsynopsis id='Writev'>
+      <funcprototype>
+        <funcdef>int <function>Writev</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+        <paramdef>struct iovec *<parameter>buf</parameter></paramdef>
+        <paramdef>int <parameter>size</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function performs a <function>writev()</function> on the connection.
     </para>
   </listitem>
   <listitem>
-    <para>
-int Disconnect(struct _Xtransport *thistrans)
-    </para>
+    <funcsynopsis id='Disconnect'>
+      <funcprototype>
+        <funcdef>int <function>Disconnect</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function initiates an orderly shutdown of a connection. If a
 transport does not distinguish between orderly and disorderly
@@ -926,9 +1082,12 @@ disconnects, then a call to this function will have no affect.
     </para>
   </listitem>
   <listitem>
-    <para>
-int Close(struct _Xtransport *thistrans)
-    </para>
+    <funcsynopsis id='Close'>
+      <funcprototype>
+        <funcdef>int <function>Close</function></funcdef>
+        <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
     <para>
 This function will break the connection, and close the endpoint.
     </para>
@@ -1100,11 +1259,7 @@ All functions names in the source are of the format
 <function>TRANS()</function>
 macro is defined as
 <programlisting language="C">
-#if (__STDC__ &amp;&amp; !defined(UNIXCPP)) || defined(ANSICPP)
 #define TRANS(func) _PROTOCOLTrans##func
-#else
-#define TRANS(func) _PROTOCOLTrans/**/func
-#endif
 </programlisting>
 </para>
 
index bcd1a2e..68a1acb 100644 (file)
@@ -5,8 +5,8 @@
 
 Summary: X.Org X11 developmental X transport library
 Name: xorg-x11-xtrans-devel
-Version: 1.2.7
-Release: 2
+Version: 1.3.4
+Release: 0
 License: MIT
 Group: System Environment/Libraries
 URL: http://www.x.org
@@ -38,7 +38,7 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
 
 %files
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING README
+%doc AUTHORS COPYING README
 %dir %{_includedir}/X11
 %dir %{_includedir}/X11/Xtrans
 %{_includedir}/X11/Xtrans/Xtrans.c
@@ -46,10 +46,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
 %{_includedir}/X11/Xtrans/Xtransint.h
 %{_includedir}/X11/Xtrans/Xtranslcl.c
 %{_includedir}/X11/Xtrans/Xtranssock.c
-%{_includedir}/X11/Xtrans/Xtranstli.c
 %{_includedir}/X11/Xtrans/Xtransutil.c
 %{_includedir}/X11/Xtrans/transport.c
 %{_datadir}/aclocal/xtrans.m4
 %{_datadir}/pkgconfig/xtrans.pc
 #%dir %{_docdir}/%{name}-%{version}-%{release}
-#%{_docdir}/%{name}-%{version}-%{release}/xtrans.xml
+#%{_docdir}/%{name}-%{version}-%{release}/xtrans.xml
\ No newline at end of file
diff --git a/packaging/xtrans.changes b/packaging/xtrans.changes
new file mode 100644 (file)
index 0000000..a5b8faf
--- /dev/null
@@ -0,0 +1,3 @@
+* Sat May 11 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130509.185359@0e37c12
+- Set license using %license
+
diff --git a/packaging/xtrans.manifest b/packaging/xtrans.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
index 2cb8882..b62fc7b 100644 (file)
@@ -66,9 +66,6 @@ from The Open Group.
 #if defined(TCPCONN) || defined(UNIXCONN)
 #include "Xtranssock.c"
 #endif
-#ifdef STREAMSCONN
-#include "Xtranstli.c"
-#endif
 #include "Xtrans.c"
 #include "Xtransutil.c"
 
index 91c6f9d..fe128b4 100644 (file)
--- a/xtrans.m4
+++ b/xtrans.m4
@@ -29,12 +29,12 @@ AC_DEFUN([XTRANS_TCP_FLAGS],[
  AC_SEARCH_LIBS(socket, [socket])
  AC_SEARCH_LIBS(gethostbyname, [nsl])
  if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
-   AC_HAVE_LIBRARY([ws2_32])
+   AC_CHECK_LIB([ws2_32],[main])
  fi
 
  # Needs to come after above checks for libsocket & libnsl for SVR4 systems
  AC_ARG_ENABLE(ipv6,
-       AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
+       AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
        [IPV6CONN=$enableval],
        [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
  AC_MSG_CHECKING([if IPv6 support should be built])
@@ -57,6 +57,41 @@ AC_DEFUN([XTRANS_TCP_FLAGS],[
 AC_INCLUDES_DEFAULT
 #include <sys/socket.h>])
 
+ # XPG4v2/UNIX95 added msg_control - check to see if we need to define
+ # _XOPEN_SOURCE to get it (such as on Solaris)
+ AC_CHECK_MEMBER([struct msghdr.msg_control], [], [],
+                 [
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+                 ])
+ # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
+ if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
+     unset ac_cv_member_struct_msghdr_msg_control
+     AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600])
+     AC_CHECK_MEMBER([struct msghdr.msg_control],
+                     [AC_DEFINE([_XOPEN_SOURCE], [600],
+                       [Defined if needed to expose struct msghdr.msg_control])
+                     ], [], [
+#define _XOPEN_SOURCE 600
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+                     ])
+ fi
+ # If that didn't work, fall back to XPG5/UNIX98 with C89
+ if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
+     unset ac_cv_member_struct_msghdr_msg_control
+     AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500])
+     AC_CHECK_MEMBER([struct msghdr.msg_control],
+                     [AC_DEFINE([_XOPEN_SOURCE], [500],
+                       [Defined if needed to expose struct msghdr.msg_control])
+                     ], [], [
+#define _XOPEN_SOURCE 500
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+                     ])
+ fi
+
+
 ]) # XTRANS_TCP_FLAGS
 
 # XTRANS_CONNECTION_FLAGS()
@@ -65,13 +100,12 @@ AC_INCLUDES_DEFAULT
 # that use Xtrans functions
 AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
  AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_TYPE_SIGNAL])
  [case $host_os in
        mingw*) unixdef="no"   ;;
        *)      unixdef="yes"  ;;
  esac]
  AC_ARG_ENABLE(unix-transport,
-       AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
+       AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
        [UNIXCONN=$enableval], [UNIXCONN=$unixdef])
  AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
  if test "$UNIXCONN" = "yes"; then
@@ -79,7 +113,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
  fi
  AC_MSG_RESULT($UNIXCONN)
  AC_ARG_ENABLE(tcp-transport,
-       AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
+       AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
        [TCPCONN=$enableval], [TCPCONN=yes])
  AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
  AC_MSG_RESULT($TCPCONN)
@@ -92,7 +126,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
        *)                      localdef="no"  ;;
  esac]
  AC_ARG_ENABLE(local-transport,
-       AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
+       AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
        [LOCALCONN=$enableval], [LOCALCONN=$localdef])
  AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
  AC_MSG_RESULT($LOCALCONN)
@@ -110,7 +144,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
 AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
 [AC_REQUIRE([XTRANS_TCP_FLAGS])
  AC_ARG_ENABLE(secure-rpc,
-       AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
+       AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
         [SECURE_RPC=$enableval], [SECURE_RPC="try"])
 
  if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
index 90d19b1..b8d135b 100644 (file)
@@ -6,4 +6,4 @@ includedir=@includedir@
 Name: XTrans
 Description: Abstract network code for X
 Version: @PACKAGE_VERSION@
-Cflags: -I${includedir} -D_BSD_SOURCE @fchown_define@ @sticky_bit_define@
+Cflags: -I${includedir} -D_DEFAULT_SOURCE -D_BSD_SOURCE @fchown_define@ @sticky_bit_define@