ChangeLog | 93 ++++++++++++++++++++ INSTALL | 5 - Makefile.in | 49 +++++----- Xtrans.c | 91 +++++++++++++++++-- Xtrans.h | 6 - Xtransdnet.c | 6 - Xtransint.h | 16 +-- Xtranslcl.c | 6 - Xtranssock.c | 198 +++++++++++++++++++++++++++++++++---------- Xtranstli.c | 6 - Xtransutil.c | 8 - aclocal.m4 | 38 ++++---- configure | 22 ++-- configure.ac | 5 - debian/changelog | 6 + debian/xsfbs/xsfbs.mk | 110 ++++-------------------- debian/xsfbs/xsfbs.sh | 7 - install-sh | 228 ++++++++++++++++++++++++++------------------------ transport.c | 6 - 19 files changed, 552 insertions(+), 354 deletions(-)
New commits: commit 6ad7ce2d4af2647bdcfd80eca7e1ba1ca3263b46 Author: Julien Cristau <[EMAIL PROTECTED]> Date: Fri Mar 7 12:01:02 2008 +0100 update changelogs for new release diff --git a/ChangeLog b/ChangeLog index 0c06d3f..fcadcc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,96 @@ +commit 662994b9096181117cec4cae88f24bf6da806159 +Author: Adam Jackson <[EMAIL PROTECTED]> +Date: Wed Mar 5 21:02:28 2008 -0500 + + xtrans 1.1 + +commit 2afe206ec9569e0d62caa6d91c3fb057b0efa23d +Author: Adam Jackson <[EMAIL PROTECTED]> +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 <[EMAIL PROTECTED]> +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 <[EMAIL PROTECTED]> +Date: Sun Dec 2 07:36:51 2007 -0800 + + make launchd error messages less scary + +commit cd1da5cec49fb7fe6238a00d9ba550b3ed78fa08 +Author: Ben Byer <[EMAIL PROTECTED]> +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 <[EMAIL PROTECTED]> +Date: Wed Nov 14 03:55:42 2007 -0800 + + removed cvs tags + +commit 496cf2c46d2123c3bed3e6878f8f9a62e87ce559 +Author: Dodji Seketeli <[EMAIL PROTECTED]> +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 <[EMAIL PROTECTED]> +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 <[EMAIL PROTECTED]> +Date: Wed Sep 5 18:29:44 2007 -0700 + + changes to support launchd on OS X + +commit 4d0cfe491046df26027db291530b247b7f24df5b +Author: Ben Byer <[EMAIL PROTECTED]> +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 <[EMAIL PROTECTED]> Date: Tue Aug 21 17:54:23 2007 -0700 diff --git a/debian/changelog b/debian/changelog index fcd25c2..fd3b19d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xtrans (1.1-1) UNRELEASED; urgency=low + + * New upstream release. + + -- Julien Cristau <[EMAIL PROTECTED]> Fri, 07 Mar 2008 12:00:05 +0100 + xtrans (1.0.4-1) unstable; urgency=low * New upstream release. commit bba45b23f3a3202c6d405d4376a6a31a5c9a665e Author: Julien Cristau <[EMAIL PROTECTED]> Date: Fri Mar 7 11:59:50 2008 +0100 autoreconf for new release diff --git a/INSTALL b/INSTALL index 5458714..d3c5b40 100644 --- a/INSTALL +++ b/INSTALL @@ -2,7 +2,7 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. +2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -67,6 +67,9 @@ The simplest way to compile this package is: 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 ===================== diff --git a/Makefile.in b/Makefile.in index 06558f0..321ff1e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -270,8 +270,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -283,8 +283,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -294,13 +294,12 @@ ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -356,6 +355,10 @@ dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -383,6 +386,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -536,19 +541,19 @@ uninstall-am: uninstall-XtransincludeHEADERS uninstall-aclocalDATA \ .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic ctags dist dist-all dist-bzip2 dist-gzip \ - dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-XtransincludeHEADERS install-aclocalDATA \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pkgconfigDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ - uninstall uninstall-XtransincludeHEADERS uninstall-aclocalDATA \ - uninstall-am uninstall-pkgconfigDATA + dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-XtransincludeHEADERS \ + install-aclocalDATA install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgconfigDATA \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-XtransincludeHEADERS \ + uninstall-aclocalDATA uninstall-am uninstall-pkgconfigDATA .PHONY: ChangeLog diff --git a/aclocal.m4 b/aclocal.m4 index 64ed8f7..93624fa 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,10 +11,13 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(AC_AUTOCONF_VERSION, [2.61],, +[m4_warning([this file was generated for autoconf 2.61. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) dnl Copyright 2005 Red Hat, Inc dnl @@ -78,7 +81,7 @@ AC_DEFUN([XORG_RELEASE_VERSION],[ [Patch version of this package]) ]) -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -93,7 +96,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], +m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -109,8 +112,10 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) +[AM_AUTOMAKE_VERSION([1.10.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -382,7 +387,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -430,13 +435,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 +# serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -541,16 +546,17 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # @@ -851,7 +857,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) diff --git a/configure b/configure index b6024f0..ca5205a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for xtrans 1.0.4. +# Generated by GNU Autoconf 2.61 for xtrans 1.1. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xtrans' PACKAGE_TARNAME='xtrans' -PACKAGE_VERSION='1.0.4' -PACKAGE_STRING='xtrans 1.0.4' +PACKAGE_VERSION='1.1' +PACKAGE_STRING='xtrans 1.1' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_subst_vars='SHELL @@ -1171,7 +1171,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xtrans 1.0.4 to adapt to many kinds of systems. +\`configure' configures xtrans 1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1237,7 +1237,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xtrans 1.0.4:";; + short | recursive ) echo "Configuration of xtrans 1.1:";; esac cat <<\_ACEOF @@ -1328,7 +1328,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xtrans configure 1.0.4 +xtrans configure 1.1 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1342,7 +1342,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xtrans $as_me 1.0.4, which was +It was created by xtrans $as_me 1.1, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2032,7 +2032,7 @@ fi # Define the identity of the package. PACKAGE='xtrans' - VERSION='1.0.4' + VERSION='1.1' cat >>confdefs.h <<_ACEOF @@ -3884,7 +3884,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xtrans $as_me 1.0.4, which was +This file was extended by xtrans $as_me 1.1, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3931,7 +3931,7 @@ Report bugs to <[EMAIL PROTECTED]>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xtrans config.status 1.0.4 +xtrans config.status 1.1 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -4506,7 +4506,7 @@ echo "$as_me: executing $ac_file commands" >&6;} # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ diff --git a/install-sh b/install-sh index 4fbbae7..a5897de 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-10-14.15 +scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -48,7 +48,7 @@ IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else @@ -58,34 +58,49 @@ fi # Put in absolute file names if you don't have them in your path; # or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 +chgrpcmd= chmodcmd=$chmodprog chowncmd= -chgrpcmd= -stripcmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= +dst_arg= + +copy_on_change=false no_target_directory= -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -95,65 +110,55 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; + + -C) copy_on_change=true;; - -d) dir_arg=true - shift - continue;; + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - shift - shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac - continue;; + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; + shift;; - -s) stripcmd=$stripprog - shift - continue;; + -s) stripcmd=$stripprog;; - -t) dstarg=$2 - shift - shift - continue;; + -t) dst_arg=$2 + shift;; - -T) no_target_directory=true - shift - continue;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; @@ -165,21 +170,22 @@ while test $# -ne 0; do *) break;; esac + shift done -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from [EMAIL PROTECTED] for arg do - if test -n "$dstarg"; then + if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" + set fnord "$@" "$dst_arg" shift # fnord fi shift # arg - dstarg=$arg + dst_arg=$arg done fi @@ -224,7 +230,7 @@ for src do # Protect names starting with `-'. case $src in - -*) src=./$src ;; + -*) src=./$src;; esac if test -n "$dir_arg"; then @@ -242,22 +248,22 @@ do exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dstarg + dst=$dst_arg # Protect names starting with `-'. case $dst in - -*) dst=./$dst ;; + -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 + echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst @@ -378,26 +384,19 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; esac - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac + eval "$initialize_posix_glob" oIFS=$IFS IFS=/ - $posix_glob && set -f + $posix_glob set -f set fnord $dstdir shift - $posix_glob && set +f + $posix_glob set +f IFS=$oIFS prefixes= @@ -459,41 +458,54 @@ do # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ - || { - echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || exit 1 + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 trap '' 0 fi commit 662994b9096181117cec4cae88f24bf6da806159 Author: Adam Jackson <[EMAIL PROTECTED]> Date: Wed Mar 5 21:02:28 2008 -0500 xtrans 1.1 diff --git a/configure.ac b/configure.ac index c713be8..0846bf1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,3 @@ -dnl -dnl $Id$ -dnl dnl Copyright © 2003 Keith Packard, Noah Levitt dnl dnl Permission to use, copy, modify, distribute, and sell this software and its @@ -24,7 +21,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) -AC_INIT(xtrans, 1.0.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xtrans) +AC_INIT(xtrans, 1.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xtrans) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE commit 2afe206ec9569e0d62caa6d91c3fb057b0efa23d Author: Adam Jackson <[EMAIL PROTECTED]> 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. diff --git a/Xtransint.h b/Xtransint.h index 97e8a89..317dbf8 100644 --- a/Xtransint.h +++ b/Xtransint.h @@ -369,9 +369,10 @@ typedef struct _Xtransport_table { #define TRANS_DISABLED (1<<2) /* Don't open this one */ #define TRANS_NOLISTEN (1<<3) /* Don't listen on this one */ #define TRANS_NOUNLINK (1<<4) /* Dont unlink transport endpoints */ +#define TRANS_ABSTRACT (1<<5) /* Use abstract sockets if available */ /* Flags to preserve when setting others */ -#define TRANS_KEEPFLAGS (TRANS_NOUNLINK) +#define TRANS_KEEPFLAGS (TRANS_NOUNLINK|TRANS_ABSTRACT) /* * readv() and writev() don't exist or don't work correctly on some diff --git a/Xtranssock.c b/Xtranssock.c index 646d634..94b73e2 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -158,6 +158,10 @@ static int IBMsockInit = 0; #define SocketInitOnce() /**/ #endif +#ifdef linux +#define HAVE_ABSTRACT_SOCKETS +#endif + #define MIN_BACKLOG 128 #ifdef SOMAXCONN #if SOMAXCONN > MIN_BACKLOG @@ -880,23 +884,28 @@ TRANS(SocketSetOption) (XtransConnInfo ciptr, int option, int arg) #ifdef UNIXCONN static int -set_sun_path(const char *port, const char *upath, char *path) +set_sun_path(const char *port, const char *upath, char *path, int abstract) { struct sockaddr_un s; int maxlen = sizeof(s.sun_path) - 1; + const char *at = ""; if (!port || !*port || !path) return -1; - if (*port == '/') { /* a full pathname */ - if (strlen(port) > maxlen) - return -1; - sprintf(path, "%s", port); - } else { - if (strlen(port) + strlen(upath) > maxlen) - return -1; - sprintf(path, "%s%s", upath, port); - } +#ifdef HAVE_ABSTRACT_SOCKETS + if (port[0] == '@') + upath = ""; + else if (abstract) + at = "@"; +#endif + + if (*port == '/') /* a full pathname */ + upath = ""; + + if (strlen(port) + strlen(upath) > maxlen) + return -1; + sprintf(path, "%s%s%s", at, upath, port); return 0; } #endif @@ -1119,6 +1128,12 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port, int oldUmask; int status; unsigned int mode; + char tmpport[108]; + + int abstract = 0; +#ifdef HAVE_ABSTRACT_SOCKETS + abstract = ciptr->transptr->flags & TRANS_ABSTRACT; +#endif PRMSG (2, "SocketUNIXCreateListener(%s)\n", port ? port : "NULL", 0, 0); @@ -1141,16 +1156,16 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port, } #endif + memset(&sockname, 0, sizeof(sockname)); sockname.sun_family = AF_UNIX; - if (port && *port) { - if (set_sun_path(port, UNIX_PATH, sockname.sun_path) != 0) { - PRMSG (1, "SocketUNIXCreateListener: path too long\n", 0, 0, 0); - return TRANS_CREATE_LISTENER_FAILED; - } - } else { - snprintf (sockname.sun_path, sizeof(sockname.sun_path), - "%s%ld", UNIX_PATH, (long)getpid()); + if (!(port && *port)) { + snprintf (tmpport, sizeof(tmpport), "%s%ld", UNIX_PATH, (long)getpid()); + port = tmpport; + } + if (set_sun_path(port, UNIX_PATH, sockname.sun_path, abstract) != 0) { -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]