Hello community,
here is the log from the commit of package xorg-x11-xtrans-devel
checked in at Fri Mar 7 23:55:05 CET 2008.
--------
--- xorg-x11-xtrans-devel/xorg-x11-xtrans-devel.changes 2007-09-29 12:21:12.000000000 +0200
+++ xorg-x11-xtrans-devel/xorg-x11-xtrans-devel.changes 2008-03-06 07:45:14.291880000 +0100
@@ -1,0 +2,5 @@
+Thu Mar 6 07:59:54 CET 2008 - sndirsch@suse.de
+
+- xtrans 1.1
+
+-------------------------------------------------------------------
Old:
----
xtrans-1.0.4.tar.bz2
New:
----
xtrans-1.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xorg-x11-xtrans-devel.spec ++++++
--- /var/tmp/diff_new_pack.te8936/_old 2008-03-07 23:50:15.000000000 +0100
+++ /var/tmp/diff_new_pack.te8936/_new 2008-03-07 23:50:15.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package xorg-x11-xtrans-devel (Version 7.3)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -10,11 +10,12 @@
# norootforbuild
+
Name: xorg-x11-xtrans-devel
Url: http://xorg.freedesktop.org/
-%define tarball_version 1.0.4
+%define tarball_version 1.1
Version: 7.3
-Release: 1
+Release: 24
License: X11/MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Development/Libraries/X11
@@ -69,30 +70,33 @@
/usr/include/X11/Xtrans/*
/usr/%{_lib}/pkgconfig/*.pc
/usr/share/aclocal/*.m4
+
%changelog
-* Sat Sep 29 2007 - sndirsch@suse.de
+* Thu Mar 06 2008 sndirsch@suse.de
+- xtrans 1.1
+* Sat Sep 29 2007 sndirsch@suse.de
- bumped version to 7.3
-* Fri Aug 24 2007 - sndirsch@suse.de
+* Fri Aug 24 2007 sndirsch@suse.de
- xtrans 1.0.4:
* Fix typo in Xtranslcl.c (sprintf with size argument should be
snprintf)
-* Mon Dec 18 2006 - sndirsch@suse.de
+* Mon Dec 18 2006 sndirsch@suse.de
- updated to release 1.0.3
* Makefile.am: make ChangeLog hook safer
-* Sat Oct 14 2006 - sndirsch@suse.de
+* Sat Oct 14 2006 sndirsch@suse.de
- updated to X.Org 7.2RC1
-* Thu Aug 17 2006 - sndirsch@suse.de
+* Thu Aug 17 2006 sndirsch@suse.de
- removed xorg-x11-xproto-devel from BuildRequires to improve
autobuild deps
-* Sat Aug 05 2006 - sndirsch@suse.de
+* Sat Aug 05 2006 sndirsch@suse.de
- p_xauth.diff:
* Let X authorization be tolerant to hostname changes (Bug #98627)
-* Wed Aug 02 2006 - ro@suse.de
+* Wed Aug 02 2006 ro@suse.de
- fix setup line
-* Fri Jul 28 2006 - sndirsch@suse.de
+* Fri Jul 28 2006 sndirsch@suse.de
- use "-fno-strict-aliasing"
-* Thu Jul 27 2006 - sndirsch@suse.de
+* Thu Jul 27 2006 sndirsch@suse.de
- use $RPM_OPT_FLAGS
- remove existing /usr/include/X11 symlink in %%pre
-* Thu Jun 22 2006 - sndirsch@suse.de
+* Thu Jun 22 2006 sndirsch@suse.de
- created package
++++++ xtrans-1.0.4.tar.bz2 -> xtrans-1.1.tar.bz2 ++++++
++++ 1715 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/ChangeLog new/xtrans-1.1/ChangeLog
--- old/xtrans-1.0.4/ChangeLog 2007-08-22 02:55:22.000000000 +0200
+++ new/xtrans-1.1/ChangeLog 2008-03-06 03:02:56.000000000 +0100
@@ -1,3 +1,96 @@
+commit 662994b9096181117cec4cae88f24bf6da806159
+Author: Adam Jackson
+Date: Wed Mar 5 21:02:28 2008 -0500
+
+ xtrans 1.1
+
+commit 2afe206ec9569e0d62caa6d91c3fb057b0efa23d
+Author: Adam Jackson
+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
+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
+Date: Sun Dec 2 07:36:51 2007 -0800
+
+ make launchd error messages less scary
+
+commit cd1da5cec49fb7fe6238a00d9ba550b3ed78fa08
+Author: Ben Byer
+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
+Date: Wed Nov 14 03:55:42 2007 -0800
+
+ removed cvs tags
+
+commit 496cf2c46d2123c3bed3e6878f8f9a62e87ce559
+Author: Dodji Seketeli
+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
+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
+Date: Wed Sep 5 18:29:44 2007 -0700
+
+ changes to support launchd on OS X
+
+commit 4d0cfe491046df26027db291530b247b7f24df5b
+Author: Ben Byer
+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
Date: Tue Aug 21 17:54:23 2007 -0700
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/configure.ac new/xtrans-1.1/configure.ac
--- old/xtrans-1.0.4/configure.ac 2007-08-22 02:54:03.000000000 +0200
+++ new/xtrans-1.1/configure.ac 2008-03-06 03:01:20.000000000 +0100
@@ -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 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
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/INSTALL new/xtrans-1.1/INSTALL
--- old/xtrans-1.0.4/INSTALL 2007-08-22 02:55:19.000000000 +0200
+++ new/xtrans-1.1/INSTALL 2008-03-06 03:02:50.000000000 +0100
@@ -2,7 +2,7 @@
*************************
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 @@
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 -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/transport.c new/xtrans-1.1/transport.c
--- old/xtrans-1.0.4/transport.c 2006-07-11 20:06:40.000000000 +0200
+++ new/xtrans-1.1/transport.c 2008-03-06 02:46:00.000000000 +0100
@@ -1,4 +1,3 @@
-/* $Xorg: transport.c,v 1.4 2001/02/09 02:04:07 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
@@ -25,10 +24,7 @@
other dealings in this Software without prior written authorization
from The Open Group.
-*/
-/* $XFree86: xc/lib/xtrans/transport.c,v 3.9 2002/05/31 18:45:51 dawes Exp $ */
-
-/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
*
* All Rights Reserved
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/Xtrans.c new/xtrans-1.1/Xtrans.c
--- old/xtrans-1.0.4/Xtrans.c 2006-08-22 04:14:57.000000000 +0200
+++ new/xtrans-1.1/Xtrans.c 2008-03-06 02:46:00.000000000 +0100
@@ -1,5 +1,3 @@
-/* $XdotOrg: xc/lib/xtrans/Xtrans.c,v 1.4 2004/11/15 15:06:56 ago Exp $ */
-/* $Xorg: Xtrans.c,v 1.4 2001/02/09 02:04:06 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
@@ -26,10 +24,7 @@
other dealings in this Software without prior written authorization
from The Open Group.
-*/
-/* $XFree86: xc/lib/xtrans/Xtrans.c,v 3.33 2003/08/11 17:41:29 eich Exp $ */
-
-/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
*
* All Rights Reserved
*
@@ -53,6 +48,9 @@
*/
#include
+#ifdef HAVE_LAUNCHD
+#include
+#endif
/*
* The transport table contains a definition for every transport (protocol)
@@ -360,6 +358,15 @@
*/
#endif
+#ifdef HAVE_LAUNCHD
+ /* launchd sockets will look like 'local//tmp/launch-XgkNns/:0' */
+ if(address != NULL && strlen(address)>8 && (!strncmp(address,"local//",7))) {
+ _protocol="local";
+ _host="";
+ _port=address+6;
+ }
+#endif
+
/*
* Now that we have all of the components, allocate new
* string space for them.
@@ -858,6 +865,10 @@
return -1;
}
+#ifdef HAVE_LAUNCHD
+ if (!host || !*host) host=strdup("");
+#endif
+
if (!port || !*port)
{
PRMSG (1,"Connect: Missing port specification in %s\n",
@@ -1053,15 +1064,73 @@
char buffer[256]; /* ??? What size ?? */
XtransConnInfo ciptr, temp_ciptrs[NUMTRANS];
int status, i, j;
+#ifdef HAVE_LAUNCHD
+ int launchd_fd;
+ launch_data_t sockets_dict, checkin_request, checkin_response;
+ launch_data_t listening_fd_array, listening_fd;
+#endif
+
#if defined(IPv6) && defined(AF_INET6)
int ipv6_succ = 0;
#endif
-
PRMSG (2,"MakeAllCOTSServerListeners(%s,%p)\n",
port ? port : "NULL", ciptrs_ret, 0);
*count_ret = 0;
+#ifdef HAVE_LAUNCHD
+ /* Get launchd fd */
+ if ((checkin_request = launch_data_new_string(LAUNCH_KEY_CHECKIN)) == NULL) {
+ fprintf(stderr,"launch_data_new_string(\"" LAUNCH_KEY_CHECKIN "\") Unable to create string.\n");
+ goto not_launchd;
+ }
+
+ if ((checkin_response = launch_msg(checkin_request)) == NULL) {
+ fprintf(stderr,"launch_msg(\"" LAUNCH_KEY_CHECKIN "\") IPC failure: %s\n",strerror(errno));
+ goto not_launchd;
+ }
+
+ if (LAUNCH_DATA_ERRNO == launch_data_get_type(checkin_response)) {
+ // ignore EACCES, which is common if we weren't started by launchd
+ if (launch_data_get_errno(checkin_response) != EACCES)
+ fprintf(stderr,"launchd check-in failed: %s\n",strerror(launch_data_get_errno(checkin_response)));
+ goto not_launchd;
+ }
+
+ sockets_dict = launch_data_dict_lookup(checkin_response, LAUNCH_JOBKEY_SOCKETS);
+ if (NULL == sockets_dict) {
+ fprintf(stderr,"launchd check-in: no sockets found to answer requests on!\n");
+ goto not_launchd;
+ }
+
+ if (launch_data_dict_get_count(sockets_dict) > 1) {
+ fprintf(stderr,"launchd check-in: some sockets will be ignored!\n");
+ goto not_launchd;
+ }
+
+ listening_fd_array = launch_data_dict_lookup(sockets_dict, ":0");
+ if (NULL == listening_fd_array) {
+ fprintf(stderr,"launchd check-in: No known sockets found to answer requests on!\n");
+ goto not_launchd;
+ }
+
+ if (launch_data_array_get_count(listening_fd_array)!=1) {
+ fprintf(stderr,"launchd check-in: Expected 1 socket from launchd, got %d)\n",
+ launch_data_array_get_count(listening_fd_array));
+ goto not_launchd;
+ }
+
+ listening_fd=launch_data_array_get_index(listening_fd_array, 0);
+ launchd_fd=launch_data_get_fd(listening_fd);
+ fprintf(stderr,"Xquartz: run by launchd for fd %d\n",launchd_fd);
+ if((ciptr = TRANS(ReopenCOTSServer(TRANS_SOCKET_LOCAL_INDEX,
+ launchd_fd, getenv("DISPLAY"))))==NULL)
+ fprintf(stderr,"Got NULL while trying to Reopen launchd port\n");
+ else temp_ciptrs[(*count_ret)++] = ciptr;
+
+not_launchd:
+#endif
+
for (i = 0; i < NUMTRANS; i++)
{
Xtransport *trans = Xtransports[i].transport;
@@ -1308,7 +1377,7 @@
#endif /* CRAY */
-#if (defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
+#if (defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
/*
* emulate readv
@@ -1338,9 +1407,9 @@
return total;
}
-#endif /* SYSV && i386 || WIN32 || __sxg__ */
+#endif /* SYSV && __i386__ || WIN32 || __sxg__ */
-#if (defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
+#if (defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
/*
* emulate writev
@@ -1370,7 +1439,7 @@
return total;
}
-#endif /* SYSV && i386 || WIN32 || __sxg__ */
+#endif /* SYSV && __i386__ || WIN32 || __sxg__ */
#if (defined(_POSIX_SOURCE) && !defined(AIXV3) && !defined(__QNX__)) || defined(hpux) || defined(USG) || defined(SVR4) || defined(__SCO__)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/Xtransdnet.c new/xtrans-1.1/Xtransdnet.c
--- old/xtrans-1.0.4/Xtransdnet.c 2006-07-11 20:06:40.000000000 +0200
+++ new/xtrans-1.1/Xtransdnet.c 2008-03-06 02:46:00.000000000 +0100
@@ -1,4 +1,3 @@
-/* $Xorg: Xtransdnet.c,v 1.4 2001/02/09 02:04:06 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
@@ -25,10 +24,7 @@
other dealings in this Software without prior written authorization
from The Open Group.
-*/
-/* $XFree86: xc/lib/xtrans/Xtransdnet.c,v 3.7tsi Exp $ */
-
-/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
*
* All Rights Reserved
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/Xtrans.h new/xtrans-1.1/Xtrans.h
--- old/xtrans-1.0.4/Xtrans.h 2006-07-11 20:06:40.000000000 +0200
+++ new/xtrans-1.1/Xtrans.h 2008-03-06 02:46:00.000000000 +0100
@@ -1,4 +1,3 @@
-/* $Xorg: Xtrans.h,v 1.4 2001/02/09 02:04:06 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
@@ -25,10 +24,7 @@
other dealings in this Software without prior written authorization
from The Open Group.
-*/
-/* $XFree86: xc/lib/xtrans/Xtrans.h,v 3.21 2003/07/20 16:12:15 tsi Exp $ */
-
-/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
*
* All Rights Reserved
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/Xtransint.h new/xtrans-1.1/Xtransint.h
--- old/xtrans-1.0.4/Xtransint.h 2006-08-22 04:16:56.000000000 +0200
+++ new/xtrans-1.1/Xtransint.h 2008-03-06 02:48:42.000000000 +0100
@@ -1,5 +1,3 @@
-/* $XdotOrg: xc/lib/xtrans/Xtransint.h,v 1.2 2004/04/23 18:44:27 eich Exp $ */
-/* $Xorg: Xtransint.h,v 1.4 2001/02/09 02:04:06 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
@@ -26,10 +24,7 @@
other dealings in this Software without prior written authorization
from The Open Group.
-*/
-/* $XFree86: xc/lib/xtrans/Xtransint.h,v 3.41 2003/08/28 00:35:23 tsi Exp $ */
-
-/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
*
* All Rights Reserved
*
@@ -374,16 +369,17 @@
#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
* systems, so they may be emulated.
*/
-#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
+#if defined(CRAY) || (defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
#define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt)
@@ -397,10 +393,10 @@
#define READV(ciptr, iov, iovcnt) readv(ciptr->fd, iov, iovcnt)
-#endif /* CRAY || (SYSV && i386) || WIN32 || __sxg__ || */
+#endif /* CRAY || (SYSV && __i386__) || WIN32 || __sxg__ || */
-#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
+#if defined(CRAY) || (defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
#define WRITEV(ciptr, iov, iovcnt) TRANS(WriteV)(ciptr, iov, iovcnt)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/Xtranslcl.c new/xtrans-1.1/Xtranslcl.c
--- old/xtrans-1.0.4/Xtranslcl.c 2007-07-18 18:24:54.000000000 +0200
+++ new/xtrans-1.1/Xtranslcl.c 2008-03-06 02:46:00.000000000 +0100
@@ -1,4 +1,3 @@
-/* $Xorg: Xtranslcl.c,v 1.6 2001/02/09 02:04:06 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
@@ -25,10 +24,7 @@
other dealings in this Software without prior written authorization
from The Open Group.
-*/
-/* $XFree86: xc/lib/xtrans/Xtranslcl.c,v 3.40tsi Exp $ */
-
-/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
*
* All Rights Reserved
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/Xtranssock.c new/xtrans-1.1/Xtranssock.c
--- old/xtrans-1.0.4/Xtranssock.c 2006-09-13 23:06:06.000000000 +0200
+++ new/xtrans-1.1/Xtranssock.c 2008-03-06 02:48:42.000000000 +0100
@@ -1,5 +1,3 @@
-/* $XdotOrg: lib/xtrans/Xtranssock.c,v 1.11 2005/11/08 06:33:26 jkj Exp $ */
-/* $Xorg: Xtranssock.c,v 1.11 2001/02/09 02:04:06 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
@@ -27,10 +25,7 @@
other dealings in this Software without prior written authorization
from the copyright holders.
-*/
-/* $XFree86: xc/lib/xtrans/Xtranssock.c,v 3.68 2004/01/07 04:28:02 dawes Exp $ */
-
-/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
*
* All Rights Reserved
*
@@ -103,11 +98,11 @@
#include
#endif
-#if (defined(i386) && defined(SYSV)) && !defined(SCO325) && !defined(sun)
+#if (defined(__i386__) && defined(SYSV)) && !defined(SCO325) && !defined(sun)
#include
#endif
-#if (defined(i386) && defined(SYSV)) && (!defined(ISC) || !defined(I_NREAD) || defined(SCO325)) || defined(_SEQUENT_)
+#if (defined(__i386__) && defined(SYSV)) && (!defined(ISC) || !defined(I_NREAD) || defined(SCO325)) || defined(_SEQUENT_)
#include
#endif
@@ -163,6 +158,10 @@
#define SocketInitOnce() /**/
#endif
+#ifdef linux
+#define HAVE_ABSTRACT_SOCKETS
+#endif
+
#define MIN_BACKLOG 128
#ifdef SOMAXCONN
#if SOMAXCONN > MIN_BACKLOG
@@ -172,6 +171,7 @@
#ifndef BACKLOG
#define BACKLOG MIN_BACKLOG
#endif
+
/*
* This is the Socket implementation of the X Transport service layer
*
@@ -529,18 +529,67 @@
{
XtransConnInfo ciptr;
+ int portlen;
+ struct sockaddr *addr;
PRMSG (3,"SocketReopen(%d,%d,%s)\n", type, fd, port);
+ if (port == NULL) {
+ PRMSG (1, "SocketReopen: port was null!\n", 0, 0, 0);
+ return NULL;
+ }
+
+ portlen = strlen(port) + 1; // include space for trailing null
+#ifdef BSD44SOCKETS
+ if (portlen < 0 || portlen > (SOCK_MAXADDRLEN + 2)) {
+ PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0);
+ return NULL;
+ }
+ if (portlen < 14) portlen = 14;
+#else
+ if (portlen < 0 || portlen > 14) {
+ PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0);
+ return NULL;
+ }
+#endif /*BSD44SOCKETS*/
+
if ((ciptr = (XtransConnInfo) xcalloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
{
- PRMSG (1, "SocketReopen: malloc failed\n", 0, 0, 0);
+ PRMSG (1, "SocketReopen: malloc(ciptr) failed\n", 0, 0, 0);
return NULL;
}
ciptr->fd = fd;
+ if ((addr = (struct sockaddr *) xcalloc (1, portlen + 2)) == NULL) {
+ PRMSG (1, "SocketReopen: malloc(addr) failed\n", 0, 0, 0);
+ return NULL;
+ }
+ ciptr->addr = addr;
+ ciptr->addrlen = portlen + 2;
+
+ if ((ciptr->peeraddr = (struct sockaddr *) xcalloc (1, portlen + 2)) == NULL) {
+ PRMSG (1, "SocketReopen: malloc(portaddr) failed\n", 0, 0, 0);
+ return NULL;
+ }
+ ciptr->peeraddrlen = portlen + 2;
+
+ /* Initialize ciptr structure as if it were a normally-opened unix socket */
+ ciptr->flags = TRANS_LOCAL | TRANS_NOUNLINK;
+#ifdef BSD44SOCKETS
+ addr->sa_len = portlen + 1;
+#endif
+ addr->sa_family = AF_UNIX;
+#ifdef HAS_STRLCPY
+ strlcpy(addr->sa_data, port, portlen);
+#else
+ strncpy(addr->sa_data, port, portlen);
+#endif
+ ciptr->family = AF_UNIX;
+ memcpy(ciptr->peeraddr, ciptr->addr, sizeof(struct sockaddr));
+ ciptr->port = rindex(addr->sa_data, ':');
+ if (ciptr->port[0] == ':') ciptr->port++; /* port should now point to portnum or NULL */
return ciptr;
}
@@ -835,23 +884,28 @@
#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
@@ -1074,6 +1128,12 @@
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);
@@ -1096,16 +1156,16 @@
}
#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) {
+ PRMSG (1, "SocketUNIXCreateListener: path too long\n", 0, 0, 0);
+ return TRANS_CREATE_LISTENER_FAILED;
}
#if (defined(BSD44SOCKETS) || defined(__UNIXWARE__)) && !defined(Lynx)
@@ -1118,7 +1178,12 @@
namelen = strlen(sockname.sun_path) + offsetof(struct sockaddr_un, sun_path);
#endif
- unlink (sockname.sun_path);
+ if (abstract) {
+ sockname.sun_path[0] = '\0';
+ namelen = sizeof(sockname);
+ }
+ else
+ unlink (sockname.sun_path);
if ((status = TRANS(SocketCreateListener) (ciptr,
(struct sockaddr *) &sockname, namelen, flags)) < 0)
@@ -1148,6 +1213,9 @@
return TRANS_CREATE_LISTENER_FAILED;
}
+ if (abstract)
+ sockname.sun_path[0] = '@';
+
ciptr->family = sockname.sun_family;
ciptr->addrlen = namelen;
memcpy (ciptr->addr, &sockname, ciptr->addrlen);
@@ -1170,16 +1238,22 @@
struct stat statb;
int status = TRANS_RESET_NOOP;
unsigned int mode;
+ int abstract = 0;
+#ifdef HAVE_ABSTRACT_SOCKETS
+ abstract = ciptr->transptr->flags & TRANS_ABSTRACT;
+#endif
PRMSG (3, "SocketUNIXResetListener(%p,%d)\n", ciptr, ciptr->fd, 0);
- if (stat (unsock->sun_path, &statb) == -1 ||
+ if (!abstract && (
+ stat (unsock->sun_path, &statb) == -1 ||
((statb.st_mode & S_IFMT) !=
#if (defined (sun) && defined(SVR4)) || defined(NCR) || defined(SCO325) || !defined(S_IFSOCK)
- S_IFIFO))
+ S_IFIFO
#else
- S_IFSOCK))
+ S_IFSOCK
#endif
+ )))
{
int oldUmask = umask (0);
@@ -1345,6 +1419,7 @@
return NULL;
}
+ ciptr->addrlen = namelen;
/*
* Get the socket name and the peer name from the listener socket,
* since this is unix domain.
@@ -1361,6 +1436,10 @@
return NULL;
}
+ /*
+ * if the socket is abstract, we already modified the address to have a
+ * @ instead of the initial NUL, so no need to do that again here.
+ */
newciptr->addrlen = ciptr->addrlen;
memcpy (newciptr->addr, ciptr->addr, newciptr->addrlen);
@@ -1959,6 +2038,10 @@
int old_namelen;
#endif
+ int abstract = 0;
+#ifdef HAVE_ABSTRACT_SOCKETS
+ abstract = ciptr->transptr->flags & TRANS_ABSTRACT;
+#endif
PRMSG (2,"SocketUNIXConnect(%d,%s,%s)\n", ciptr->fd, host, port);
@@ -1970,7 +2053,7 @@
* we know for sure it will fail.
*/
- if (strcmp (host, "unix") != 0 && !UnixHostReallyLocal (host))
+ if (host && *host && host[0]!='/' && strcmp (host, "unix") != 0 && !UnixHostReallyLocal (host))
{
PRMSG (1,
"SocketUNIXConnect: Cannot connect to non-local host %s\n",
@@ -1996,7 +2079,7 @@
sockname.sun_family = AF_UNIX;
- if (set_sun_path(port, UNIX_PATH, sockname.sun_path) != 0) {
+ if (set_sun_path(port, UNIX_PATH, sockname.sun_path, abstract) != 0) {
PRMSG (1, "SocketUNIXConnect: path too long\n", 0, 0, 0);
return TRANS_CONNECT_FAILED;
}
@@ -2017,7 +2100,7 @@
* This is gross, but it was in Xlib
*/
old_sockname.sun_family = AF_UNIX;
- if (set_sun_path(port, OLD_UNIX_PATH, old_sockname.sun_path) != 0) {
+ if (set_sun_path(port, OLD_UNIX_PATH, old_sockname.sun_path, abstract) != 0) {
PRMSG (1, "SocketUNIXConnect: path too long\n", 0, 0, 0);
return TRANS_CONNECT_FAILED;
}
@@ -2025,6 +2108,17 @@
offsetof(struct sockaddr_un, sun_path);
#endif
+ /*
+ * Adjust the socket path if using abstract sockets.
+ * Done here because otherwise all the strlen() calls above would fail.
+ */
+
+ if (abstract) {
+ sockname.sun_path[0] = '\0';
+#if defined(hpux) && defined(X11_t)
+ old_sockname.sun_path[0] = '\0';
+#endif
+ }
/*
* Do the connect()
@@ -2062,12 +2156,19 @@
* should try again.
*/
- if (olderrno == ENOENT || olderrno == EINTR)
- return TRANS_TRY_CONNECT_AGAIN;
- else if (olderrno == EWOULDBLOCK || olderrno == EINPROGRESS)
+ if (olderrno == EWOULDBLOCK || olderrno == EINPROGRESS)
return TRANS_IN_PROGRESS;
- else
- {
+ else if (olderrno == EINTR)
+ return TRANS_TRY_CONNECT_AGAIN;
+ else if (olderrno == ENOENT) {
+ /*
+ * If opening as abstract socket failed, try again "normally"
+ */
+ if (abstract)
+ ciptr->transptr->flags &= ~(TRANS_ABSTRACT);
+ return TRANS_TRY_CONNECT_AGAIN;
+ }
+ else {
PRMSG (2,"SocketUNIXConnect: Can't connect: errno = %d\n",
EGET(),0, 0);
@@ -2090,12 +2191,15 @@
return TRANS_CONNECT_FAILED;
}
+ if (abstract)
+ sockname.sun_path[0] = '@';
+
ciptr->family = AF_UNIX;
ciptr->addrlen = namelen;
ciptr->peeraddrlen = namelen;
memcpy (ciptr->addr, &sockname, ciptr->addrlen);
memcpy (ciptr->peeraddr, &sockname, ciptr->peeraddrlen);
-
+
return 0;
}
@@ -2120,7 +2224,7 @@
return ret;
}
#else
-#if (defined(i386) && defined(SYSV) && !defined(SCO325)) || (defined(_SEQUENT_) && _SOCKET_VERSION == 1)
+#if (defined(__i386__) && defined(SYSV) && !defined(SCO325)) || (defined(_SEQUENT_) && _SOCKET_VERSION == 1)
return ioctl (ciptr->fd, I_NREAD, (char *) pend);
#else
#if defined(__UNIXOS2__)
@@ -2128,7 +2232,7 @@
#else
return ioctl (ciptr->fd, FIONREAD, (char *) pend);
#endif /* __UNIXOS2__ */
-#endif /* i386 && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */
+#endif /* __i386__ && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */
#endif /* WIN32 */
}
@@ -2235,7 +2339,6 @@
#ifdef UNIXCONN
static int
TRANS(SocketUNIXClose) (XtransConnInfo ciptr)
-
{
/*
* If this is the server side, then once the socket is closed,
@@ -2254,7 +2357,8 @@
&& sockname->sun_family == AF_UNIX
&& sockname->sun_path[0])
{
- if (!(ciptr->flags & TRANS_NOUNLINK))
+ if (!(ciptr->flags & TRANS_NOUNLINK
+ || ciptr->transptr->flags & TRANS_ABSTRACT))
unlink (sockname->sun_path);
}
@@ -2421,7 +2525,11 @@
Xtransport TRANS(SocketLocalFuncs) = {
/* Socket Interface */
"local",
+#ifdef HAVE_ABSTRACT_SOCKETS
+ TRANS_ABSTRACT,
+#else
0,
+#endif
#ifdef TRANS_CLIENT
TRANS(SocketOpenCOTSClient),
#endif /* TRANS_CLIENT */
@@ -2467,7 +2575,7 @@
Xtransport TRANS(SocketUNIXFuncs) = {
/* Socket Interface */
"unix",
-#if !defined(LOCALCONN)
+#if !defined(LOCALCONN) && !defined(HAVE_ABSTRACT_SOCKETS)
TRANS_ALIAS,
#else
0,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/Xtranstli.c new/xtrans-1.1/Xtranstli.c
--- old/xtrans-1.0.4/Xtranstli.c 2006-07-11 20:06:40.000000000 +0200
+++ new/xtrans-1.1/Xtranstli.c 2008-03-06 02:46:00.000000000 +0100
@@ -1,4 +1,3 @@
-/* $Xorg: Xtranstli.c,v 1.4 2001/02/09 02:04:07 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
@@ -25,10 +24,7 @@
other dealings in this Software without prior written authorization
from The Open Group.
-*/
-/* $XFree86: xc/lib/xtrans/Xtranstli.c,v 3.12tsi Exp $ */
-
-/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
*
* All Rights Reserved
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xtrans-1.0.4/Xtransutil.c new/xtrans-1.1/Xtransutil.c
--- old/xtrans-1.0.4/Xtransutil.c 2006-08-24 23:40:36.000000000 +0200
+++ new/xtrans-1.1/Xtransutil.c 2008-03-06 03:00:47.000000000 +0100
@@ -1,4 +1,3 @@
-/* $Xorg: Xtransutil.c,v 1.4 2001/02/09 02:04:07 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
@@ -25,10 +24,7 @@
other dealings in this Software without prior written authorization
from The Open Group.
-*/
-/* $XFree86: xc/lib/xtrans/Xtransutil.c,v 3.26 2003/07/09 15:27:30 tsi Exp $ */
-
-/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
*
* All Rights Reserved
*
@@ -660,8 +656,10 @@
return -1;
}
#endif
+#ifndef __APPLE_CC__
PRMSG(1, "mkdir: Owner of %s should be set to root\n",
path, 0, 0);
+#endif
}
if (updateMode && !updatedMode) {
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org