summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* xtrans 1.3.3xtrans-1.3.3Hans de Goede2014-01-271-1/+1
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Add TransIsListening()Jon TURNEY2014-01-272-0/+20
| | | | | | | | | | | | | | | | | | | | | | libxtrans provides TransNoListen() to set the 'don't listen' flag for a particular transport, but there is no interface to query the state of that flag This is a bit of a problem for the XWin server, as it wants to start some helper clients (for clipboard integration and integrated window management), so needs to know what transports the server is listening on to construct appropriate display names for those clients. Add TransIsListening() to discover if TransNoListen() has been called for a particular protocol or not HdG: -Invert the final check so that TransIsListening returns True when TRANS_NOLISTEN is not set, as one would expect of it. -Make the protocol argument a const char * as similar functions do -Fix "warning: too many arguments for format" warning Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Enable systemd socket activationŁukasz Stelmach2014-01-131-1/+82
| | | | | | | | | | | | | | | | | Receive file descriptors of open sockets from systemd instead of creating them. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Piort Bereza <p.bereza@samsung.com> Cc: Karol Lewandowski <k.lewandowsk@samsung.com> Cc: Lennart Poettering <lennart@poettering.net> Cc: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Cc: Peter Hutterer <peter.hutterer@who-t.net> Cc: walter harms <wharms@bfs.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
* Define TRANS_RECEIVED flag for transportsŁukasz Stelmach2014-01-133-0/+33
| | | | | | | | | The flag is to be used to mark transports related to sockets received from systemd. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
* xtrans.m4: remove AC_TYPE_SIGNAL and Imake SIGNALRETURNSINTGaetan Nadon2013-12-162-14/+1
| | | | | | | | | | | Assume signal handlers return void, as C89 requires Drops use of autoconf's obsolete AC_TYPE_SIGNAL and Imake's even more obsolete SIGNALRETURNSINT. None of the modules including xtrans.m4 uses RETSIGTYPE from autoconf. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* xtrans.m4: replace deprecated AC_HAVE_LIBRARY with AC_CHECK_LIBGaetan Nadon2013-12-161-1/+1
| | | | | | | The #define HAVE_LIBWS2_32 is still done and the lib ws2_32 is prepended to LIBS if found. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* xtrans.m4: fix warning by replacing obsolete AC_HELP_STRINGGaetan Nadon2013-12-161-5/+5
| | | | | | with AS_HELP_STRING Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* Don't restrict FD passing to Linux & SolarisMark Kettenis2013-12-141-4/+0
| | | | | | Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix alignment issues in FD passing codeMark Kettenis2013-11-211-8/+8
| | | | | | | | | | | A char array on the stack is not guaranteed to have more than byte alignment. This means that casting it to a 'struct cmsghdr' and accessing its members may result in unaligned access. This will generate SIGBUS on strict alignment architectures like OpenBSD/sparc64. The solution is to use a union to force proper alignment. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
* Remove unused static inlinesMark Kettenis2013-11-211-16/+0
| | | | | Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
* xtrans 1.3.2xtrans-1.3.2Alan Coopersmith2013-11-071-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Allow XTRANS_SEND_FDS on Solaris as wellAlan Coopersmith2013-11-071-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Check if we need to define _XOPEN_SOURCE for struct msghdr.msg_controlAlan Coopersmith2013-11-071-0/+35
| | | | | | | Required to expose the structure members in Solaris headers, since it was an XPG4/UNIX95 addition to the Solaris ABI. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add stubs for send/recv fd functions in local transportsAlan Coopersmith2013-11-071-0/+35
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Switch to CMSG_* macros for FD passingKeith Packard2013-11-071-40/+64
| | | | | | | | This should be portable to non-Linux systems Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Actually disable all of the FD passing code unless XTRANS_SEND_FDS is setKeith Packard2013-11-073-0/+14
| | | | | | Stick all of the functions relating to FD passing inside Signed-off-by: Keith Packard <keithp@keithp.com>
* Update to version 1.3.1xtrans-1.3.1Keith Packard2013-11-061-1/+1
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Don't include file descriptor passing code by defaultMark Kettenis2013-11-061-1/+3
| | | | | | | | | | | | Leave it up to the consumer to request this functionality by defining XTRANS_SEND_FDS. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> v2 - make sure this is only defined on systems where the code actually works (Linux for now)
* Add SEND_FDS version of ReadvKeith Packard2013-11-021-0/+24
| | | | | | | Now that we've found that libFS uses readv, we can test whether this readv implementation works correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* Revert "Remove 'Readv' interface"Keith Packard2013-11-022-0/+13
| | | | | | This reverts commit 9e8d99c2e27f2c8acbbfb5b760649aa1bfad665e. libFS still uses this API...
* Update to version 1.3.0xtrans-1.3.0Keith Packard2013-10-311-1/+1
| | | | | | Adds FD passing interfaces and pulls in current patches past 1.2.7 Signed-off-by: Keith Packard <keithp@keithp.com>
* Add APIs to send file descriptors through the networkKeith Packard2013-10-314-17/+256
| | | | | | Exposes new TRANS(SendFd)/TRANS(RecvFd) APIs. Signed-off-by: Keith Packard <keithp@keithp.com>
* Remove 'Readv' interfaceKeith Packard2013-10-312-13/+0
| | | | | | No-one uses this, so there's no reason for it to be in the library Signed-off-by: Keith Packard <keithp@keithp.com>
* Add const qualifier to unix_nolistenŁukasz Stelmach2013-07-091-1/+1
| | | | | | | Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Docs: Drop pre-C89 TRANS() from docs since it's no longer in the headersbaserock/morphAlan Coopersmith2013-01-271-4/+0
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Docs: convert function synopses to docbook funcsynopsis markupAlan Coopersmith2013-01-271-201/+360
| | | | | | Also add some cross-reference links and various other markup improvements. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* autogen.sh: Implement GNOME Build APIColin Walters2013-01-151-1/+3
| | | | | | http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <ajax@redhat.com>
* configure: Remove AM_MAINTAINER_MODEAdam Jackson2013-01-151-1/+0
| | | | Signed-off-by: Adam Jackson <ajax@redhat.com>
* Remove unused TLI ("STREAMSCONN") code from xtransAlan Coopersmith2012-12-265-1426/+10
| | | | | | | | | Has never been converted to build in modular builds, so has been unusable since X11R7.0 release in 2005. All known platforms with TLI/XTI support that X11R7 & later releases run on also have (and mostly prefer) BSD socket support for their networking API. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* xtrans 1.2.7xtrans-1.2.7Alan Coopersmith2012-03-221-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* informaltable cleanupMatt Dew2012-01-111-32/+33
| | | | | | | | | | | | | | | | 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>
* Xtranssock.c: avoid buffer overrun in SocketReopenRobert Bragg2011-12-131-6/+8
| | | | | | | | | | | | | | | | | | | 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>
* Remove unnecessary casts on malloc, calloc & free callsAlan Coopersmith2011-12-065-49/+43
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
* Replace malloc(strlen)+strcpy with strdupAlan Coopersmith2011-12-062-25/+9
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
* Finish conversion to standard C allocation functionsAlan Coopersmith2011-12-056-118/+114
| | | | | | | | | 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>
* Fix some resource & memory leaks in libxtrans.Alan Hourihane2011-12-053-0/+6
| | | | | | 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>
* Cleanup IDs and links in docMatt Dew2011-10-041-14/+14
| | | | | | | | | | 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>
* Convert a bunch of sprintf calls to snprintfAlan Coopersmith2011-10-012-16/+22
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Add const attributes to fix gcc -Wwrite-strings warningsAlan Coopersmith2011-10-016-16/+17
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Fix warning: unused variable 'tmpport' with various configurationsAlan Coopersmith2011-10-011-3/+2
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Add _X_UNUSED attributes to silence unused parameter warningsAlan Coopersmith2011-10-014-12/+16
| | | | | | | | 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>
* Mark __xtransname strings for debug messages as const char *Alan Coopersmith2011-10-011-9/+9
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Fix unused variable warningsAlan Coopersmith2011-10-012-5/+5
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Fix warning: ISO C90 forbids mixed declarations and codeAlan Coopersmith2011-10-011-2/+2
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Fix printf format string warningsAlan Coopersmith2011-10-013-19/+19
| | | | | | | | 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>
* Convert PRMSG macro to prmsg inline functionAlan Coopersmith2011-10-016-607/+569
| | | | | | | | | | 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>
* Fix warnings about static functions declared but never definedAlan Coopersmith2011-10-012-1/+9
| | | | | | | | | | 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>
* Removing SUN specific code, let solaris create .X11-pipe with sticky bit onArvind Umrao2011-09-211-4/+0
| | | | | | | 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>
* specs: regroup <author> <editor> <othercredit> under authorgroupGaetan Nadon2011-09-201-12/+12
| | | | | | Some elements are not displayed when outside authorgroup Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* specs: refactor copyright legal text for multi licensingGaetan Nadon2011-09-201-14/+3
| | | | | | we can use <copyright> markup for the first holder Signed-off-by: Gaetan Nadon <memsize@videotron.ca>