[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xtrans: Changes to 'upstream-unstable'



 .gitignore   |    3 +++
 Makefile.am  |    4 ++--
 Xtrans.c     |    4 ++--
 Xtransint.h  |   14 +++++++-------
 Xtranslcl.c  |    2 +-
 Xtranssock.c |   25 ++++++++++++++++---------
 Xtransutil.c |   13 ++++++++++---
 configure.ac |    2 +-
 8 files changed, 42 insertions(+), 25 deletions(-)

New commits:
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>

diff --git a/configure.ac b/configure.ac
index cf5ec71..3fcf515 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
-AC_INIT(xtrans, 1.2.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xtrans)
+AC_INIT(xtrans, 1.2.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xtrans)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 

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>

diff --git a/Xtrans.c b/Xtrans.c
index 278651a..7b18f10 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -103,7 +103,7 @@ Xtransport_table Xtransports[] = {
 #ifndef sun
     { &TRANS(PTSFuncs),		TRANS_LOCAL_PTS_INDEX },
 #endif /* sun */
-#ifdef SVR4
+#if defined(SVR4) || defined(__SVR4)
     { &TRANS(NAMEDFuncs),	TRANS_LOCAL_NAMED_INDEX },
 #endif
 #ifdef sun
@@ -1348,7 +1348,7 @@ static int TRANS(WriteV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt)
 #endif /* SYSV && __i386__ || WIN32 || __sxg__ */
 
 
-#if defined(_POSIX_SOURCE) || defined(USG) || defined(SVR4) || defined(__SCO__)
+#if defined(_POSIX_SOURCE) || defined(USG) || defined(SVR4) || defined(__SVR4) || defined(__SCO__)
 #ifndef NEED_UTSNAME
 #define NEED_UTSNAME
 #endif
diff --git a/Xtransint.h b/Xtransint.h
index 0bd4b46..cd5b64f 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -94,7 +94,7 @@ from The Open Group.
  * to avoid a race condition. JKJ (6/5/97)
  */
 
-# if defined(_POSIX_SOURCE) || defined(USG) || defined(SVR4) || defined(__SCO__)
+# if defined(_POSIX_SOURCE) || defined(USG) || defined(SVR4) || defined(__SVR4) || defined(__SCO__)
 #  ifndef NEED_UTSNAME
 #   define NEED_UTSNAME
 #  endif
diff --git a/Xtranslcl.c b/Xtranslcl.c
index f6a2468..8391156 100644
--- a/Xtranslcl.c
+++ b/Xtranslcl.c
@@ -75,7 +75,7 @@ from The Open Group.
 #include <sys/signal.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
-#if defined(SVR4)
+#if defined(SVR4) || defined(__SVR4)
 #include <sys/filio.h>
 #endif
 #ifdef sun
diff --git a/Xtranssock.c b/Xtranssock.c
index f36e3a6..0935744 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -87,7 +87,7 @@ from the copyright holders.
 #endif /* !NO_TCP_H */
 
 #include <sys/ioctl.h>
-#if defined(SVR4) 
+#if defined(SVR4) || defined(__SVR4)
 #include <sys/filio.h>
 #endif
 
@@ -222,7 +222,7 @@ static int TRANS(SocketINETClose) (XtransConnInfo ciptr);
 
 #if defined HAVE_SOCKLEN_T || (defined(IPv6) && defined(AF_INET6))
 # define SOCKLEN_T socklen_t
-#elif defined(SVR4) || defined(__SCO__)
+#elif defined(SVR4) || defined(__SVR4) || defined(__SCO__)
 # define SOCKLEN_T size_t 
 #else
 # define SOCKLEN_T int
@@ -1194,7 +1194,7 @@ TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr)
     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)
+#if defined(NCR) || defined(SCO325) || !defined(S_IFSOCK)
 	  		S_IFIFO
 #else
 			S_IFSOCK

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>

diff --git a/Xtranssock.c b/Xtranssock.c
index eabb587..f36e3a6 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -528,7 +528,14 @@ TRANS(SocketReopen) (int i, int type, int fd, char *port)
     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 */
+    if (ciptr->port == NULL) {
+	if (is_numeric(addr->sa_data)) {
+	    ciptr->port = addr->sa_data;
+	}
+    } else if (ciptr->port[0] == ':') {
+	ciptr->port++;
+    }
+    /* port should now point to portnum or NULL */
     return ciptr;
 }
 

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>

diff --git a/Xtransint.h b/Xtransint.h
index 8cc0b68..0bd4b46 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -352,7 +352,7 @@ static int is_numeric (
 
 #ifdef TRANS_SERVER
 static int trans_mkdir (
-    char *,		/* path */
+    const char *,	/* path */
     int			/* mode */
 );
 #endif
diff --git a/Xtransutil.c b/Xtransutil.c
index b4e03fe..bd9ff52 100644
--- a/Xtransutil.c
+++ b/Xtransutil.c
@@ -479,7 +479,7 @@ is_numeric (const char *str)
  * bit cannot be set and fail.
  */
 static int 
-trans_mkdir(char *path, int mode)
+trans_mkdir(const char *path, int mode)
 {
     struct stat buf;
 

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>

diff --git a/Xtransint.h b/Xtransint.h
index 623cdef..8cc0b68 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -347,7 +347,7 @@ static int TRANS(WriteV)(
 
 
 static int is_numeric (
-    char *		/* str */
+    const char *	/* str */
 );
 
 #ifdef TRANS_SERVER

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>

diff --git a/Xtransint.h b/Xtransint.h
index e1a95a2..623cdef 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -345,6 +345,18 @@ static int TRANS(WriteV)(
 
 #endif /* CRAY || WIN32 || __sxg__ */
 
+
+static int is_numeric (
+    char *		/* str */
+);
+
+#ifdef TRANS_SERVER
+static int trans_mkdir (
+    char *,		/* path */
+    int			/* mode */
+);
+#endif
+
 /*
  * Some XTRANSDEBUG stuff
  */
diff --git a/transport.c b/transport.c
index baf5bfd..5131d99 100644
--- a/transport.c
+++ b/transport.c
@@ -59,7 +59,6 @@ from The Open Group.
 #endif
 
 #include "Xtransint.h"
-#include "Xtransutil.c"
 
 #ifdef LOCALCONN
 #include "Xtranslcl.c"
@@ -71,3 +70,4 @@ from The Open Group.
 #include "Xtranstli.c"
 #endif
 #include "Xtrans.c"
+#include "Xtransutil.c"

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>

diff --git a/Xtransutil.c b/Xtransutil.c
index 6c4d93f..b4e03fe 100644
--- a/Xtransutil.c
+++ b/Xtransutil.c
@@ -448,8 +448,7 @@ TRANS(WSAStartup) (void)
 #include <ctype.h>
 
 static int
-is_numeric (char *str)
-
+is_numeric (const char *str)
 {
     int i;
 

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>

diff --git a/Xtransutil.c b/Xtransutil.c
index 0f7c7b2..6c4d93f 100644
--- a/Xtransutil.c
+++ b/Xtransutil.c
@@ -225,6 +225,13 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
 
 #ifdef ICE_t
 
+/* Needed for _XGethostbyaddr usage in TRANS(GetPeerNetworkId) */
+# if defined(TCPCONN) || defined(UNIXCONN)
+#  define X_INCLUDE_NETDB_H
+#  define XOS_USE_NO_LOCKING
+#  include <X11/Xos_r.h>
+# endif
+
 #include <signal.h>
 
 char *
@@ -438,6 +445,7 @@ TRANS(WSAStartup) (void)
 }
 #endif
 
+#include <ctype.h>
 
 static int
 is_numeric (char *str)

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>

diff --git a/Xtransint.h b/Xtransint.h
index 623cdef..e1a95a2 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -345,18 +345,6 @@ static int TRANS(WriteV)(
 
 #endif /* CRAY || WIN32 || __sxg__ */
 
-
-static int is_numeric (
-    char *		/* str */
-);
-
-#ifdef TRANS_SERVER
-static int trans_mkdir (
-    char *,		/* path */
-    int			/* mode */
-);
-#endif
-
 /*
  * Some XTRANSDEBUG stuff
  */
diff --git a/transport.c b/transport.c
index 5131d99..baf5bfd 100644
--- a/transport.c
+++ b/transport.c
@@ -59,6 +59,7 @@ from The Open Group.
 #endif
 
 #include "Xtransint.h"
+#include "Xtransutil.c"
 
 #ifdef LOCALCONN
 #include "Xtranslcl.c"
@@ -70,4 +71,3 @@ from The Open Group.
 #include "Xtranstli.c"
 #endif
 #include "Xtrans.c"
-#include "Xtransutil.c"

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>

diff --git a/Xtransint.h b/Xtransint.h
index 523751e..623cdef 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -372,7 +372,7 @@ static int trans_mkdir (
 			int hack= 0, saveerrno=errno; \
                         struct timeval tp;\
                         gettimeofday(&tp,0); \
-			ErrorF(__xtransname); \
+			ErrorF("%s",__xtransname);	\
 			ErrorF(x+hack,a,b,c); \
                         ErrorF("timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \
 			errno=saveerrno; \
@@ -382,7 +382,7 @@ static int trans_mkdir (
 			int hack= 0, saveerrno=errno; \
                         struct timeval tp;\
                         gettimeofday(&tp,0); \
-			fprintf(stderr, __xtransname); fflush(stderr); \
+			fprintf(stderr, "%s", __xtransname); fflush(stderr); \
 			fprintf(stderr, x+hack,a,b,c); fflush(stderr); \
                         fprintf(stderr, "timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \
                         fflush(stderr); \
@@ -394,14 +394,14 @@ static int trans_mkdir (
 /* Use ErrorF() for the X server */
 #define PRMSG(lvl,x,a,b,c)	if (lvl <= XTRANSDEBUG){ \
 			int hack= 0, saveerrno=errno; \
-			ErrorF(__xtransname); \
+			ErrorF("%s",__xtransname);    \
 			ErrorF(x+hack,a,b,c); \
 			errno=saveerrno; \
 			} else ((void)0)
 #else
 #define PRMSG(lvl,x,a,b,c)	if (lvl <= XTRANSDEBUG){ \
 			int hack= 0, saveerrno=errno; \
-			fprintf(stderr, __xtransname); fflush(stderr); \
+			fprintf(stderr, "%s", __xtransname); fflush(stderr); \
 			fprintf(stderr, x+hack,a,b,c); fflush(stderr); \
 			errno=saveerrno; \
 			} else ((void)0)

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.

diff --git a/.gitignore b/.gitignore
index 2a50369..187e984 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,6 @@ missing
 mkinstalldirs
 xtrans.pc
 *~
+xtrans-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 07e0153..f30b57a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,9 +15,9 @@ aclocal_DATA = xtrans.m4
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = xtrans.pc
 
-EXTRA_DIST = xtrans.pc.in ${aclocal_DATA}
+EXTRA_DIST = xtrans.pc.in ${aclocal_DATA} ChangeLog
 
-CLEANFILES = ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
 
 .PHONY: ChangeLog
 
diff --git a/Xtranssock.c b/Xtranssock.c
index ad3e116..eabb587 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -555,8 +555,12 @@ TRANS(SocketOpenCOTSClientBase) (char *transname, char *protocol,
 
     while ((i = TRANS(SocketSelectFamily) (i, transname)) >= 0) {
 	if ((ciptr = TRANS(SocketOpen) (
-		 i, Sockettrans2devtab[i].devcotsname)) != NULL)
+		i, Sockettrans2devtab[i].devcotsname)) != NULL) {
+	    /* Save the index for later use */
+
+	    ciptr->index = i;
 	    break;
+	}
     }
     if (i < 0) {
 	if (i == -1)
@@ -568,10 +572,6 @@ TRANS(SocketOpenCOTSClientBase) (char *transname, char *protocol,
 	return NULL;
     }
 
-    /* Save the index for later use */
-
-    ciptr->index = i;
-
     return ciptr;
 }
 


Reply to: