From c81020559f329a516191927222b3698ba7370aca Mon Sep 17 00:00:00 2001
From: marha <marha@users.sourceforge.net>
Date: Sun, 22 Dec 2013 12:51:45 +0100
Subject: libxtrans fontconfig glproto libX11 libxcb xcbproto mesa xserver
 pixman xkeyboard-config git update 22 Dec 2013

xserver          commit a68df147421da21528b5be2d34678383922fa352
libxcb           commit f653464554469b5767f1c99abced25a76bace047
libxcb/xcb-proto commit 4087fc682c5ceb849b74442e17a6b73176e5eecb
xkeyboard-config commit a224a636139d22e1dc7ca7d23782cd656e87bcf5
libX11           commit 3d69b0a83e62f8f6fbdd952fc49cdbdf8825e1e6
libXdmcp         commit 089081dca4ba3598c6f9bf401c029378943b5854
libXext          commit bb24f2970f2e425f4df90c9b73d078ad15a73fbb
libfontenc       commit 3acba630d8b57084f7e92c15732408711ed5137a
libXinerama      commit edd95182b26eb5d576d4878c559e0f17dddaa909
libXau           commit 304a11be4727c5a7feeb2501e8e001466f8ce84e
xkbcomp          commit e3e6e938535532bfad175c1635256ab7fb3ac943
pixman           commit 945ab7a6f3eb6241f07e8f094dc0e647d1f10d9d
xextproto        commit 3f355f138d6df57e067458a20f47307883048adb
randrproto       commit e7526e6b5fe0966929cda10b2ded0258413744db
glproto          commit f84853d97d5749308992412a215fa518b6536eb3
mkfontscale      commit 880a0c4733e62e54e6a0f1238c7430727d23657b
xwininfo         commit ba0d1b0da21d2dbdd81098ed5778f3792b472e13
libXft           commit 4acfdaf95adb0a05c2a25550bdde036c865902f4
libXmu           commit 22d9c590901e121936f50dee97dc60c4f7defb63
libxtrans        commit 2c0a7840a28ae696e80e73157856d7a049fdf6c7
fontconfig       commit 5c725f2f5829238d16116f782d00d8bb0defaf08
mesa             commit 2efe7927d38983029784825fc4897e9b77aa237e
---
 fontconfig/src/fccache.c   | 2 +-
 fontconfig/src/fcdefault.c | 4 +++-
 fontconfig/src/fcmatch.c   | 5 +++--
 3 files changed, 7 insertions(+), 4 deletions(-)

(limited to 'fontconfig/src')

diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c
index c7f243749..10eacffdf 100644
--- a/fontconfig/src/fccache.c
+++ b/fontconfig/src/fccache.c
@@ -573,7 +573,7 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat)
     {
 #if defined(HAVE_MMAP) || defined(__CYGWIN__)
 	cache = mmap (0, fd_stat->st_size, PROT_READ, MAP_SHARED, fd, 0);
-#if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED)
+#if (HAVE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED)
 	posix_fadvise (fd, 0, fd_stat->st_size, POSIX_FADV_WILLNEED);
 #endif
 	if (cache == MAP_FAILED)
diff --git a/fontconfig/src/fcdefault.c b/fontconfig/src/fcdefault.c
index c6397c0c2..4beda7c00 100644
--- a/fontconfig/src/fcdefault.c
+++ b/fontconfig/src/fcdefault.c
@@ -149,7 +149,7 @@ retry:
 #else
 # if defined (HAVE_GETEXECNAME)
 	const char *p = getexecname ();
-# else
+# elif defined (HAVE_READLINK)
 	char buf[PATH_MAX + 1];
 	int len;
 	char *p = NULL;
@@ -160,6 +160,8 @@ retry:
 	    buf[len] = '\0';
 	    p = buf;
 	}
+# else
+	char *p = NULL;
 # endif
 	if (p)
 	{
diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c
index 627aa1a16..93e013f9b 100644
--- a/fontconfig/src/fcmatch.c
+++ b/fontconfig/src/fcmatch.c
@@ -743,6 +743,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr
 {
     FcBool ret = FcFalse;
     FcCharSet *cs;
+    int i;
 
     cs = 0;
     if (trim || csp)
@@ -752,7 +753,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr
 	    goto bail;
     }
 
-    while (nnode--)
+    for (i = 0; i < nnode; i++)
     {
 	FcSortNode	*node = *n++;
 	FcBool		adds_chars = FcFalse;
@@ -776,7 +777,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr
 	 * If this font isn't a subset of the previous fonts,
 	 * add it to the list
 	 */
-	if (!trim || adds_chars)
+	if (!i || !trim || adds_chars)
 	{
 	    FcPatternReference (node->pattern);
 	    if (FcDebug () & FC_DBG_MATCHV)
-- 
cgit v1.2.3