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

libfs: Changes to 'debian-unstable'



 ChangeLog                 |  217 ++++++++++++++++++++++++
 README                    |    2 
 configure.ac              |   10 +
 debian/changelog          |    8 
 debian/control            |    1 
 debian/rules              |    6 
 include/X11/fonts/FSlib.h |    4 
 src/FSErrDis.c            |    9 -
 src/FSOpenServ.c          |   13 -
 src/FSlibInt.c            |  412 +---------------------------------------------
 src/FSlibint.h            |  105 -----------
 src/FSlibos.h             |    5 
 12 files changed, 261 insertions(+), 531 deletions(-)

New commits:
commit 5a9a5f24dbe42b840ff95fd661727b8ef9864e8b
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Jul 13 01:11:42 2014 +0200

    Upload to unstable

diff --git a/debian/changelog b/debian/changelog
index 89fe166..6af7f04 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-libfs (2:1.0.6-1) UNRELEASED; urgency=medium
+libfs (2:1.0.6-1) unstable; urgency=medium
 
   * New upstream release.
   * Remove Cyril from Uploaders.
   * Use dh_prep instead of dh_clean -k.
 
- -- Julien Cristau <jcristau@debian.org>  Sun, 13 Jul 2014 01:06:13 +0200
+ -- Julien Cristau <jcristau@debian.org>  Sun, 13 Jul 2014 01:11:38 +0200
 
 libfs (2:1.0.5-1) unstable; urgency=low
 

commit 84ba54c425ec5368848ac7fad16483c74d1569b4
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Jul 13 01:10:35 2014 +0200

    Use dh_prep instead of dh_clean -k.

diff --git a/debian/changelog b/debian/changelog
index 4d903af..89fe166 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ libfs (2:1.0.6-1) UNRELEASED; urgency=medium
 
   * New upstream release.
   * Remove Cyril from Uploaders.
+  * Use dh_prep instead of dh_clean -k.
 
  -- Julien Cristau <jcristau@debian.org>  Sun, 13 Jul 2014 01:06:13 +0200
 
diff --git a/debian/rules b/debian/rules
index ed7e197..f25fec3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -55,7 +55,7 @@ clean:
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 
 	cd build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install

commit eeb9332ecafeffbc345c3dc1fb50a9211a587d56
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Jul 13 01:10:09 2014 +0200

    Remove Cyril from Uploaders.

diff --git a/debian/changelog b/debian/changelog
index 20427e4..4d903af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 libfs (2:1.0.6-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * Remove Cyril from Uploaders.
 
  -- Julien Cristau <jcristau@debian.org>  Sun, 13 Jul 2014 01:06:13 +0200
 
diff --git a/debian/control b/debian/control
index eefcef8..08bea08 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,6 @@ Source: libfs
 Section: x11
 Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
-Uploaders: Cyril Brulebois <kibi@debian.org>
 Build-Depends:
  pkg-config,
  x11proto-core-dev (>= 6.8.99.15+cvs.20050722),

commit dd749a04c8ce1876ee90488b36ef1b33b8b1fcf5
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Jul 13 01:07:08 2014 +0200

    Delete dead code from debian/rules

diff --git a/debian/rules b/debian/rules
index 364b306..ed7e197 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,10 +10,6 @@
 # set this to the name of the main shlib's binary package
 PACKAGE = libfs6
 
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
 DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

commit d4535a5c1de37411d69993922ad4afd3a611f21b
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Jul 13 01:06:23 2014 +0200

    Bump changelogs

diff --git a/ChangeLog b/ChangeLog
index f70e9a1..a683d60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,220 @@
+commit 88be5c37c40070305e64c4b8dc0a1c1f6ca80440
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Mar 16 10:44:14 2014 -0700
+
+    libFS 1.0.6
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e5be46eceee9c0c0d5f0363d3e08b19f86f85fcb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 3 23:07:12 2014 -0800
+
+    Use strlcpy instead of strcpy/strncpy if it is available
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e831ef9246684298c147f9b26de0810b8218c3cb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 3 21:33:10 2014 -0800
+
+    Replace malloc(strlen + 1); strcpy() with strdup()
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+
+commit 980cf8ac0c636ff7ef1fccb9e74f116ac5ea34ae
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 3 21:13:30 2014 -0800
+
+    Remove unused internal helper _FSWireToEvent
+    
+    Since we build with -export-symbols-regex '^FS.*', it wasn't available
+    to callers outside libFS, and was never called by anything inside libFS.
+    
+    Seems to have been imported from XlibInt.c without ever being used.
+    
+    Flagged by cppcheck 1.62:
+    [FSlibInt.c:753]: (style) The function '_FSWireToEvent' is never used.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+
+commit b9f27dc863c3ca01bb231ee48e84bc60b39d4f1f
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 3 20:55:33 2014 -0800
+
+    Remove unused internal helper _FSEventsQueued
+    
+    Since we build with -export-symbols-regex '^FS.*', it wasn't available
+    to callers outside libFS, and was never called by anything inside libFS.
+    
+    Seems to have been imported from XlibInt.c without ever being used.
+    
+    Flagged by cppcheck 1.62:
+    [FSlibInt.c:180]: (style) The function '_FSEventsQueued' is never used.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+
+commit 37772516acb95b3c9934252994b7dfdc147dfd23
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 3 20:50:32 2014 -0800
+
+    Remove unused internal helper _FSAllocScratch
+    
+    Since we build with -export-symbols-regex '^FS.*', it wasn't available
+    to callers outside libFS, and was never called by anything inside libFS.
+    
+    Seems to have been imported from XlibInt.c without ever being used.
+    The _FSserver fields that it used (and nothing else did) are replaced
+    with "unused" placeholders to maintain struct layout/size.
+    
+    Flagged by cppcheck 1.62:
+    [FSlibInt.c:973]: (style) The function '_FSAllocScratch' is never used.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+
+commit ac1eb6e3ea54724cf3ab3ad1ccf0595df9e34786
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 3 20:46:48 2014 -0800
+
+    Remove unused internal helper _FSGetHostname
+    
+    Since we build with -export-symbols-regex '^FS.*', it wasn't available
+    to callers outside libFS, and was never called by anything inside libFS.
+    
+    Xtrans provides it's own exact copy of this function, which gets
+    the name _FSTransGetHostname when built in libFS, nothing in libFS
+    outside the Xtrans code calls a gethostname() function.
+    
+    Flagged by cppcheck 1.62:
+    [FSlibInt.c:1060]: (style) The function '_FSGetHostname' is never used.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+
+commit a4c12fe0ca5cb359bffe08b26a92ddcf8e194441
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 3 20:04:33 2014 -0800
+
+    If EAGAIN == EWOULDBLOCK, only need to check errno for one of them
+    
+    Solaris <sys/errno.h> has:
+     #define EWOULDBLOCK       EAGAIN
+    so checking (errno == EAGAIN || errno == EWOULDBLOCK) is overkill.
+    
+    This leads cppcheck 1.62 to complain:
+    [FSlibInt.c:153] -> [FSlibInt.c:153]: (style) Same expression on both sides of '||'.
+    [FSlibInt.c:301] -> [FSlibInt.c:301]: (style) Same expression on both sides of '||'.
+    [FSlibInt.c:379] -> [FSlibInt.c:379]: (style) Same expression on both sides of '||'.
+    [FSlibInt.c:472] -> [FSlibInt.c:472]: (style) Same expression on both sides of '||'.
+    
+    This quiets it, and reduces the number of calls Solaris Studio cc
+    generates to the __errno() function to get the thread-specific errno value.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+
+commit b6885f7aedc3b6eba62ffa1edac1e8488d938cea
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 3 19:57:09 2014 -0800
+
+    Reduce scope & remove unneeded assignment of defaultp in FSGetErrorText()
+    
+    Suggested by cppcheck 1.62
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit dcb6c39feb63dcf7e843bd2394a2544fd4e79f9f
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Jan 2 01:03:49 2014 -0800
+
+    FSOpenServer: Fix double-free in error path
+    
+    FSOpenServ.c:266:5: warning: Use of memory after it is freed
+        OutOfMemory(svr, setup);
+        ^~~~~~~~~~~~~~~~~~~~~~~
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 4b0b74f953619164dc2863ee2cd3f09d15c65a51
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Jan 2 00:49:27 2014 -0800
+
+    Update error loop to correctly handle error in i==0 case
+    
+    FSOpenServ.c:183:3: warning: Function call argument is an uninitialized value
+                    FSfree(alts[i].name);
+                    ^~~~~~~~~~~~~~~~~~~~
+    ./FSlibos.h:273:21: note: expanded from macro 'FSfree'
+                        ^~~~~~~~~~~
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 5ed8b4cf1f1c35ef35a3c94350e6b96646a2a0b7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Dec 27 11:01:35 2013 -0800
+
+    Add AC_USE_SYSTEM_EXTENSIONS to expose non-standard extensions
+    
+    Required on Solaris to expose fd_mask in <sys/select.h> now that
+    xtrans 1.3 defines _XOPEN_SOURCE to 600 on Solaris, since fd_mask
+    is not defined in that version of the XPG standards.
+    
+    Fixes build failure:
+    ../../src/FSConnServ.c: In function '_FSWaitForWritable':
+    ../../src/FSConnServ.c:166:6: error: 'fd_mask' undeclared (first use in this function)
+    ../../src/FSConnServ.c:166:6: note: each undeclared identifier is reported only once for each function it appears in
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+
+commit 19ca53de0aae67b1f23085c832b445576c6a0b25
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 1 11:14:58 2013 -0400
+
+    Fix build with xtrans 1.3
+    
+    ->Readv was in fact being used, oops.  Just call straight down to
+    readv() instead.
+    
+    Reviewed-by: Peter Harris <pharris@opentext.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 96243bfec19d0f543de3ef590a482f7f6dcdaa3d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Jun 24 22:52:09 2013 -0700
+
+    Drop Cray (WORD64/MUSTCOPY) support
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d30a927b79ee0faa5f4547d5d60570f8fcd11fc2
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Jun 24 22:46:52 2013 -0700
+
+    Fix a couple comment typos
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 665fb8c34183bbaba5c7deb045863090082f814b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Jun 24 22:42:56 2013 -0700
+
+    Require ANSI C89 pre-processor, drop pre-C89 token pasting support
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 279fbcc23d6cd462e034dec6a9d1378cb86247e3
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue May 28 17:42:06 2013 -0700
+
+    Fix typo in readme ("xfslsfonts" should be "fslsfonts")
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
 commit 9d1458e02fe8dcac68b32917c9b10fa49d7161e7
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Tue May 28 17:17:40 2013 -0700
diff --git a/debian/changelog b/debian/changelog
index 06726d4..20427e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libfs (2:1.0.6-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Julien Cristau <jcristau@debian.org>  Sun, 13 Jul 2014 01:06:13 +0200
+
 libfs (2:1.0.5-1) unstable; urgency=low
 
   * New upstream release.

commit 88be5c37c40070305e64c4b8dc0a1c1f6ca80440
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Mar 16 10:44:14 2014 -0700

    libFS 1.0.6
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index 26fffb1..03ecca4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libFS], [1.0.5],
+AC_INIT([libFS], [1.0.6],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libFS])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])

commit e5be46eceee9c0c0d5f0363d3e08b19f86f85fcb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 3 23:07:12 2014 -0800

    Use strlcpy instead of strcpy/strncpy if it is available
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index bcc4187..26fffb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,9 @@ PKG_CHECK_MODULES(FS, xproto >= 7.0.17 fontsproto xtrans)
 # Find needed libraries for TCP sockets (pre-pended in $LIBS)
 XTRANS_CONNECTION_FLAGS
 
+# Checks for library functions.
+AC_CHECK_FUNCS([strlcpy])
+
 # Allow checking code with lint, sparse, etc.
 XORG_WITH_LINT
 XORG_LINT_LIBRARY([FS])
diff --git a/src/FSErrDis.c b/src/FSErrDis.c
index 1a712ff..76ebab6 100644
--- a/src/FSErrDis.c
+++ b/src/FSErrDis.c
@@ -84,9 +84,14 @@ int FSGetErrorDatabaseText(
 {
     if (nbytes == 0)
 	return 0;
+#ifdef HAVE_STRLCPY
+    if (strlcpy(buffer, defaultp, nbytes) >= nbytes)
+	return 0;
+#else
     (void) strncpy(buffer, defaultp, nbytes);
     if ((strlen(defaultp) + 1) > nbytes)
 	buffer[nbytes - 1] = '\0';
+#endif
     return 1;
 }
 
diff --git a/src/FSlibInt.c b/src/FSlibInt.c
index 71f6ac1..090da3f 100644
--- a/src/FSlibInt.c
+++ b/src/FSlibInt.c
@@ -850,7 +850,11 @@ _FSPrintDefaultError(
 		ext && (ext->codes.major_opcode != event->request_code);
 		ext = ext->next);
 	if (ext)
+#ifdef HAVE_STRLCPY
+	    strlcpy(buffer, ext->name, sizeof(buffer));
+#else
 	    strcpy(buffer, ext->name);
+#endif
 	else
 	    buffer[0] = '\0';
     }

commit e831ef9246684298c147f9b26de0810b8218c3cb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 3 21:33:10 2014 -0800

    Replace malloc(strlen + 1); strcpy() with strdup()
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>

diff --git a/src/FSOpenServ.c b/src/FSOpenServ.c
index b8ccb2f..faebe13 100644
--- a/src/FSOpenServ.c
+++ b/src/FSOpenServ.c
@@ -127,10 +127,9 @@ FSOpenServer(const char *server)
 	return (FSServer *) NULL;
     }
 
-    if ((svr->server_name = FSmalloc(strlen(server) + 1)) == NULL) {
+    if ((svr->server_name = strdup(server)) == NULL) {
 	goto fail;
     }
-    (void) strcpy(svr->server_name, server);
 
     if ((svr->trans_conn = _FSConnectServer(svr->server_name)) == NULL) {
 	goto fail;

commit 980cf8ac0c636ff7ef1fccb9e74f116ac5ea34ae
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 3 21:13:30 2014 -0800

    Remove unused internal helper _FSWireToEvent
    
    Since we build with -export-symbols-regex '^FS.*', it wasn't available
    to callers outside libFS, and was never called by anything inside libFS.
    
    Seems to have been imported from XlibInt.c without ever being used.
    
    Flagged by cppcheck 1.62:
    [FSlibInt.c:753]: (style) The function '_FSWireToEvent' is never used.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>

diff --git a/src/FSlibInt.c b/src/FSlibInt.c
index eeab20c..71f6ac1 100644
--- a/src/FSlibInt.c
+++ b/src/FSlibInt.c
@@ -746,35 +746,6 @@ _FSUnknownNativeEvent(
     return (0);
 }
 
-/*
- * reformat a wire event into an FSEvent structure of the right type.
- */
-Bool
-_FSWireToEvent(
-    register FSServer	*svr,	/* pointer to display structure */
-    register FSEvent	*re,	/* pointer to where event should be
-				 * reformatted */
-    register fsEvent	*event)	/* wire protocol event */
-{
-
-    re->type = event->type & 0x7f;
-    ((FSAnyEvent *) re)->serial = _FSSetLastRequestRead(svr,
-						   (fsGenericReply *) event);
-    ((FSAnyEvent *) re)->send_event = ((event->type & 0x80) != 0);
-    ((FSAnyEvent *) re)->server = svr;
-
-    /*
-     * Ignore the leading bit of the event type since it is set when a client
-     * sends an event rather than the server.
-     */
-
-    switch (event->type & 0177) {
-    default:
-	return (_FSUnknownWireEvent(svr, re, event));
-    }
-}
-
-
 static const char *
 _SysErrorMsg(int n)
 {
diff --git a/src/FSlibint.h b/src/FSlibint.h
index b5aba87..5e539be 100644
--- a/src/FSlibint.h
+++ b/src/FSlibint.h
@@ -87,7 +87,6 @@ extern unsigned long _FSSetLastRequestRead ( FSServer *svr,
 extern int _FSUnknownWireEvent ( FSServer *svr, FSEvent *re, fsEvent *event );
 extern int _FSUnknownNativeEvent ( FSServer *svr, FSEvent *re,
 				   fsEvent *event );
-extern int _FSWireToEvent ( FSServer *svr, FSEvent *re, fsEvent *event );
 extern int _FSDefaultIOError ( FSServer *svr ) _X_NORETURN;
 extern int _FSPrintDefaultError ( FSServer *svr, FSErrorEvent *event,
 				  FILE *fp );

commit b9f27dc863c3ca01bb231ee48e84bc60b39d4f1f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 3 20:55:33 2014 -0800

    Remove unused internal helper _FSEventsQueued
    
    Since we build with -export-symbols-regex '^FS.*', it wasn't available
    to callers outside libFS, and was never called by anything inside libFS.
    
    Seems to have been imported from XlibInt.c without ever being used.
    
    Flagged by cppcheck 1.62:
    [FSlibInt.c:180]: (style) The function '_FSEventsQueued' is never used.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>

diff --git a/src/FSlibInt.c b/src/FSlibInt.c
index 48091cf..eeab20c 100644
--- a/src/FSlibInt.c
+++ b/src/FSlibInt.c
@@ -176,42 +176,6 @@ _FSFlush(register FSServer *svr)
     svr->last_req = (char *) &_dummy_request;
 }
 
-int
-_FSEventsQueued(
-    register FSServer	*svr,
-    int			 mode)
-{
-    register BytesReadable_t len;
-    BytesReadable_t pend;
-    char        buf[BUFSIZE];
-    register fsReply *rep;
-
-    if (mode == QueuedAfterFlush) {
-	_FSFlush(svr);
-	if (svr->qlen)
-	    return (svr->qlen);
-    }
-    if (_FSTransBytesReadable(svr->trans_conn, &pend) < 0)
-	(*_FSIOErrorFunction) (svr);
-    if ((len = pend) < SIZEOF(fsReply))
-	return (svr->qlen);	/* _FSFlush can enqueue events */
-    else if (len > BUFSIZE)
-	len = BUFSIZE;
-    len /= SIZEOF(fsReply);
-    pend = len * SIZEOF(fsReply);
-    _FSRead(svr, buf, (long) pend);
-
-    /* no space between comma and type or else macro will die */
-    STARTITERATE(rep, fsReply, buf, (len > 0), len--) {
-	if (rep->generic.type == FS_Error)
-	    _FSError(svr, (fsError *) rep);
-	else			/* must be an event packet */
-	    _FSEnq(svr, (fsEvent *) rep);
-    }
-    ENDITERATE
-	return (svr->qlen);
-}
-
 /* _FSReadEvents - Flush the output queue,
  * then read as many events as possible (but at least 1) and enqueue them
  */
diff --git a/src/FSlibint.h b/src/FSlibint.h
index b50509b..b5aba87 100644
--- a/src/FSlibint.h
+++ b/src/FSlibint.h
@@ -82,7 +82,6 @@ extern int _FSReply ( FSServer *svr, fsReply *rep, int extra, int discard );
 extern XtransConnInfo _FSConnectServer ( char *server_name );
 extern void _FSDisconnectServer ( XtransConnInfo trans_conn );
 extern void _FSSendClientPrefix ( FSServer *svr, fsConnClientPrefix *client );
-extern int _FSEventsQueued ( FSServer *svr, int mode );
 extern unsigned long _FSSetLastRequestRead ( FSServer *svr,
 					     fsGenericReply *rep );
 extern int _FSUnknownWireEvent ( FSServer *svr, FSEvent *re, fsEvent *event );

commit 37772516acb95b3c9934252994b7dfdc147dfd23
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 3 20:50:32 2014 -0800

    Remove unused internal helper _FSAllocScratch
    
    Since we build with -export-symbols-regex '^FS.*', it wasn't available
    to callers outside libFS, and was never called by anything inside libFS.
    
    Seems to have been imported from XlibInt.c without ever being used.
    The _FSserver fields that it used (and nothing else did) are replaced
    with "unused" placeholders to maintain struct layout/size.
    
    Flagged by cppcheck 1.62:
    [FSlibInt.c:973]: (style) The function '_FSAllocScratch' is never used.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>

diff --git a/include/X11/fonts/FSlib.h b/include/X11/fonts/FSlib.h
index 11b3ba6..1cd7f13 100644
--- a/include/X11/fonts/FSlib.h
+++ b/include/X11/fonts/FSlib.h
@@ -148,8 +148,8 @@ struct _FSServer {
     int         ext_number;
     Bool        (*event_vec[132]) (FSServer *, FSEvent *, fsEvent *);
     Status	(*wire_vec[132]) (FSServer *, FSEvent *, fsEvent *);
-    char       *scratch_buffer;
-    unsigned long scratch_length;
+    void         *unused_1; /* previously scratch_buffer */
+    unsigned long unused_2; /* previously scratch_length */
     FSSyncHandler synchandler;
     unsigned long flags;
     struct _XtransConnInfo *trans_conn; /* transport connection object */
diff --git a/src/FSlibInt.c b/src/FSlibInt.c
index cd996d1..48091cf 100644
--- a/src/FSlibInt.c
+++ b/src/FSlibInt.c
@@ -964,25 +964,6 @@ _FSDefaultError(
 FSIOErrorHandler _FSIOErrorFunction = _FSDefaultIOError;
 FSErrorHandler _FSErrorFunction = _FSDefaultError;
 
-/*
- * This routine can be used to (cheaply) get some memory within a single
- * Xlib routine for scratch space.  It is reallocated from the same place
- * each time, unless the library needs a large scratch space.
- */
-char       *
-_FSAllocScratch(
-    register FSServer	*svr,
-    unsigned long	 nbytes)
-{
-    if (nbytes > svr->scratch_length) {
-	if (svr->scratch_buffer != NULL)
-	    FSfree(svr->scratch_buffer);
-	return (svr->scratch_length = nbytes,
-		svr->scratch_buffer = FSmalloc(nbytes));
-    }
-    return (svr->scratch_buffer);
-}
-
 int
 FSFree(char *data)
 {
diff --git a/src/FSlibint.h b/src/FSlibint.h
index 7669778..b50509b 100644
--- a/src/FSlibint.h
+++ b/src/FSlibint.h
@@ -93,7 +93,6 @@ extern int _FSDefaultIOError ( FSServer *svr ) _X_NORETURN;
 extern int _FSPrintDefaultError ( FSServer *svr, FSErrorEvent *event,
 				  FILE *fp );
 extern int _FSDefaultError ( FSServer *svr, FSErrorEvent *event );
-extern char * _FSAllocScratch ( FSServer *svr, unsigned long nbytes );
 extern void _FSFreeQ ( void );
 
 extern FSErrorHandler  FSSetErrorHandler ( FSErrorHandler handler );

commit ac1eb6e3ea54724cf3ab3ad1ccf0595df9e34786
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 3 20:46:48 2014 -0800

    Remove unused internal helper _FSGetHostname
    
    Since we build with -export-symbols-regex '^FS.*', it wasn't available
    to callers outside libFS, and was never called by anything inside libFS.
    
    Xtrans provides it's own exact copy of this function, which gets
    the name _FSTransGetHostname when built in libFS, nothing in libFS
    outside the Xtrans code calls a gethostname() function.
    
    Flagged by cppcheck 1.62:
    [FSlibInt.c:1060]: (style) The function '_FSGetHostname' is never used.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>

diff --git a/src/FSlibInt.c b/src/FSlibInt.c
index cb53e44..cd996d1 100644
--- a/src/FSlibInt.c
+++ b/src/FSlibInt.c
@@ -1034,57 +1034,6 @@ _FSFreeQ(void)
     return;
 }
 
-#ifdef _POSIX_SOURCE                     /* stupid makedepend [need if] */
-#ifndef __QNX__ /* QNX's uname nodename entry is not same as tcpip hostname */
-#define NEED_UTSNAME
-#endif
-#endif
-#ifdef hpux
-#define NEED_UTSNAME
-#endif
-#ifdef SVR4
-#ifndef _SEQUENT_
-#define NEED_UTSNAME
-#endif
-#endif
-
-#ifdef NEED_UTSNAME
-#include <sys/utsname.h>
-#endif
-
-
-/*
- * _FSGetHostname - similar to gethostname but allows special processing.
- */
-int
-_FSGetHostname(
-    char	*buf,
-    int		 maxlen)
-{
-    int         len;
-
-#ifdef NEED_UTSNAME
-    /*
-     * same host name crock as in server and xinit.
-     */
-    struct utsname name;
-
-    uname(&name);
-    len = strlen(name.nodename);
-    if (len >= maxlen)
-	len = maxlen - 1;
-    strncpy(buf, name.nodename, len);
-    buf[len] = '\0';
-#else
-    buf[0] = '\0';
-    (void) gethostname(buf, maxlen);
-    buf[maxlen - 1] = '\0';
-    len = strlen(buf);
-#endif				/* NEED_UTSNAME */
-
-    return len;
-}
-
 #ifndef _FSANYSET
 /*
  * This is not always a macro.
diff --git a/src/FSlibint.h b/src/FSlibint.h
index 60a2ce6..7669778 100644
--- a/src/FSlibint.h
+++ b/src/FSlibint.h
@@ -95,7 +95,6 @@ extern int _FSPrintDefaultError ( FSServer *svr, FSErrorEvent *event,
 extern int _FSDefaultError ( FSServer *svr, FSErrorEvent *event );
 extern char * _FSAllocScratch ( FSServer *svr, unsigned long nbytes );
 extern void _FSFreeQ ( void );
-extern int _FSGetHostname ( char *buf, int maxlen );
 
 extern FSErrorHandler  FSSetErrorHandler ( FSErrorHandler handler );
 extern FSIOErrorHandler FSSetIOErrorHandler ( FSIOErrorHandler handler );

commit a4c12fe0ca5cb359bffe08b26a92ddcf8e194441
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 3 20:04:33 2014 -0800

    If EAGAIN == EWOULDBLOCK, only need to check errno for one of them
    
    Solaris <sys/errno.h> has:
     #define EWOULDBLOCK       EAGAIN
    so checking (errno == EAGAIN || errno == EWOULDBLOCK) is overkill.
    
    This leads cppcheck 1.62 to complain:
    [FSlibInt.c:153] -> [FSlibInt.c:153]: (style) Same expression on both sides of '||'.
    [FSlibInt.c:301] -> [FSlibInt.c:301]: (style) Same expression on both sides of '||'.
    [FSlibInt.c:379] -> [FSlibInt.c:379]: (style) Same expression on both sides of '||'.
    [FSlibInt.c:472] -> [FSlibInt.c:472]: (style) Same expression on both sides of '||'.
    
    This quiets it, and reduces the number of calls Solaris Studio cc
    generates to the __errno() function to get the thread-specific errno value.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>

diff --git a/src/FSlibInt.c b/src/FSlibInt.c
index 0fabc96..cb53e44 100644
--- a/src/FSlibInt.c
+++ b/src/FSlibInt.c
@@ -66,11 +66,14 @@ static const char * _SysErrorMsg ( int n );
 
 /* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
  * systems are broken and return EWOULDBLOCK when they should return EAGAIN
+ *
+ * Solaris defines EWOULDBLOCK to be EAGAIN, so don't need to check twice
+ * for it.
  */
 #ifdef WIN32
 #define ETEST() (WSAGetLastError() == WSAEWOULDBLOCK)
 #else
-#if defined(EAGAIN) && defined(EWOULDBLOCK)
+#if defined(EAGAIN) && defined(EWOULDBLOCK) && (EAGAIN != EWOULDBLOCK)
 #define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK)
 #else
 #ifdef EAGAIN

commit b6885f7aedc3b6eba62ffa1edac1e8488d938cea
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 3 19:57:09 2014 -0800

    Reduce scope & remove unneeded assignment of defaultp in FSGetErrorText()
    
    Suggested by cppcheck 1.62
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/FSErrDis.c b/src/FSErrDis.c
index e3d296e..1a712ff 100644
--- a/src/FSErrDis.c
+++ b/src/FSErrDis.c
@@ -96,8 +96,6 @@ int FSGetErrorText(
     char		*buffer,
     int			 nbytes)
 {
-
-    const char *defaultp = NULL;
     char        buf[32];
     register _FSExtension *ext;
 
@@ -105,7 +103,7 @@ int FSGetErrorText(
 	return 0;
     snprintf(buf, sizeof(buf), "%d", code);
     if (code < (FSErrorListSize / sizeof(char *)) && code >= 0) {
-	defaultp = FSErrorList[code];
+	const char *defaultp = FSErrorList[code];
 	FSGetErrorDatabaseText(svr, "FSProtoError", buf, defaultp, buffer, nbytes);
     }
     ext = svr->ext_procs;

commit dcb6c39feb63dcf7e843bd2394a2544fd4e79f9f
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Jan 2 01:03:49 2014 -0800

    FSOpenServer: Fix double-free in error path
    
    FSOpenServ.c:266:5: warning: Use of memory after it is freed
        OutOfMemory(svr, setup);
        ^~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

diff --git a/src/FSOpenServ.c b/src/FSOpenServ.c
index 9b51e20..b8ccb2f 100644
--- a/src/FSOpenServ.c
+++ b/src/FSOpenServ.c
@@ -66,7 +66,7 @@ static fsReq _dummy_request = {
     0, 0, 0
 };
 
-static void OutOfMemory ( FSServer *svr, char *setup );
+static void OutOfMemory ( FSServer *svr );
 
 FSServer   *_FSHeadOfServerList = NULL;
 
@@ -85,13 +85,11 @@ void _FSFreeServerStructure(FSServer *svr)
 
 static
 void OutOfMemory(
-    FSServer	*svr,
-    char	*setup)
+    FSServer	*svr)
 {
     if (svr->trans_conn)
 	_FSDisconnectServer(svr->trans_conn);
     _FSFreeServerStructure(svr);
-    FSfree(setup);
     errno = ENOMEM;
 }
 
@@ -263,7 +261,7 @@ FSOpenServer(const char *server)
     FSfree(alts);
     FSfree(alt_data);
     FSfree(auth_data);
-    OutOfMemory(svr, setup);
+    OutOfMemory(svr);
     return (FSServer *) NULL;
 
 }

commit 4b0b74f953619164dc2863ee2cd3f09d15c65a51
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Jan 2 00:49:27 2014 -0800

    Update error loop to correctly handle error in i==0 case
    
    FSOpenServ.c:183:3: warning: Function call argument is an uninitialized value
                    FSfree(alts[i].name);
                    ^~~~~~~~~~~~~~~~~~~~
    ./FSlibos.h:273:21: note: expanded from macro 'FSfree'
                        ^~~~~~~~~~~
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

diff --git a/src/FSOpenServ.c b/src/FSOpenServ.c
index 15a657a..9b51e20 100644
--- a/src/FSOpenServ.c
+++ b/src/FSOpenServ.c
@@ -179,7 +179,7 @@ FSOpenServer(const char *server)
 	altlen = (unsigned int) *ad++;
 	alts[i].name = FSmalloc(altlen + 1);
 	if (!alts[i].name) {
-	    while (--i) {
+	    while (--i >= 0) {
 		FSfree(alts[i].name);
 	    }
 	    goto fail;

commit 5ed8b4cf1f1c35ef35a3c94350e6b96646a2a0b7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Dec 27 11:01:35 2013 -0800

    Add AC_USE_SYSTEM_EXTENSIONS to expose non-standard extensions
    
    Required on Solaris to expose fd_mask in <sys/select.h> now that
    xtrans 1.3 defines _XOPEN_SOURCE to 600 on Solaris, since fd_mask
    is not defined in that version of the XPG standards.
    
    Fixes build failure:
    ../../src/FSConnServ.c: In function '_FSWaitForWritable':
    ../../src/FSConnServ.c:166:6: error: 'fd_mask' undeclared (first use in this function)
    ../../src/FSConnServ.c:166:6: note: each undeclared identifier is reported only once for each function it appears in
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/configure.ac b/configure.ac
index b00749f..bcc4187 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,11 @@ AC_CONFIG_HEADERS([config.h])
 # Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
+# Must be called before any macros that run the compiler (like
+# AC_PROG_LIBTOOL) to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
+
 # Initialize libtool
 AC_PROG_LIBTOOL
 

commit 19ca53de0aae67b1f23085c832b445576c6a0b25
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Nov 1 11:14:58 2013 -0400

    Fix build with xtrans 1.3
    
    ->Readv was in fact being used, oops.  Just call straight down to
    readv() instead.
    
    Reviewed-by: Peter Harris <pharris@opentext.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/FSlibInt.c b/src/FSlibInt.c
index edc66ba..0fabc96 100644
--- a/src/FSlibInt.c
+++ b/src/FSlibInt.c
@@ -58,6 +58,7 @@ in this Software without prior written authorization from The Open Group.


Reply to: