summaryrefslogtreecommitdiff
path: root/x11/libX11/patches
diff options
context:
space:
mode:
authorbjs <bjs>2008-07-24 01:07:31 +0000
committerbjs <bjs>2008-07-24 01:07:31 +0000
commit2a11d61466c9660791337c6cb2f4c773d971853f (patch)
tree056e24512827a567d15a9f4ea9ac3c9e967682be /x11/libX11/patches
parentd32c0138d7f06c6cc1318aafc37a101e84121f0a (diff)
downloadpkgsrc-2a11d61466c9660791337c6cb2f4c773d971853f.tar.gz
Properly define XTHREAD_CFLAGS/XTHREADLIB on NetBSD: We do not
want -pthread in XTHREAD_CFLAGS, as this will end up linking everything against libpthread. Thus, in keeping with our gcc specfile, define _REENTRANT in XTHREAD_CFLAGS instead. XTHREADLIB is now -pthread, not -lpthread. While here, update to head of libX11-1.1 branch in GIT (with the exception of some unicode changes which caused mkpatches to choke). changes: - IM: Respect XMODIFIERS for Thai locale (bug #15719) - Bug #15884: Remove useless sleep()'s from the connection code. - NLS: Make UTF-8 the default for Russian - ConnDis: properly cast 'addr' before accessing it as a byte array. - added error check in Xcms color file parser; closes bug #15305 - Fix missing error condition in cmsColNm.c, also. Bump PKGREVISION.
Diffstat (limited to 'x11/libX11/patches')
-rw-r--r--x11/libX11/patches/patch-aa58
-rw-r--r--x11/libX11/patches/patch-ab21
-rw-r--r--x11/libX11/patches/patch-ac18
-rw-r--r--x11/libX11/patches/patch-ah74
-rw-r--r--x11/libX11/patches/patch-ai17
-rw-r--r--x11/libX11/patches/patch-aj18
-rw-r--r--x11/libX11/patches/patch-ak44
-rw-r--r--x11/libX11/patches/patch-al27
-rw-r--r--x11/libX11/patches/patch-am15
-rw-r--r--x11/libX11/patches/patch-an27
-rw-r--r--x11/libX11/patches/patch-ao15
11 files changed, 313 insertions, 21 deletions
diff --git a/x11/libX11/patches/patch-aa b/x11/libX11/patches/patch-aa
index b82d8c6a8fb..b84256f08db 100644
--- a/x11/libX11/patches/patch-aa
+++ b/x11/libX11/patches/patch-aa
@@ -1,10 +1,13 @@
-$NetBSD: patch-aa,v 1.4 2008/04/24 07:45:49 joerg Exp $
+$NetBSD: patch-aa,v 1.5 2008/07/24 01:07:31 bjs Exp $
Include pthread.h as thread stubs might be macros like on NetBSD.
Define conditional for cross-compiling support.
---- configure.ac.orig 2008-03-06 21:48:26.000000000 +0100
+Also, don't look for keysmydef.h, as this could break cross
+builds (from GIT).
+
+--- configure.ac.orig 2008-03-06 15:48:26.000000000 -0500
+++ configure.ac
@@ -180,7 +180,7 @@ esac
AC_SUBST(XTHREADS)
@@ -15,7 +18,56 @@ Define conditional for cross-compiling support.
AM_CONDITIONAL(THRSTUBS, test x$thrstubs = xyes)
dnl XXX incomplete, please fill this in
-@@ -322,6 +322,8 @@ else
+@@ -189,8 +189,8 @@ if test x$xthreads = xyes ; then
+ linux*|openbsd*|gnu*|k*bsd*-gnu)
+ XTHREADLIB=-lpthread ;;
+ netbsd*)
+- XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS"
+- XTHREADLIB="-lpthread" ;;
++ XTHREAD_CFLAGS="-D_REENTRANT"
++ XTHREADLIB="-pthread" ;;
+ freebsd*)
+ XTHREAD_CFLAGS="-D_THREAD_SAFE"
+ XTHREADLIB="-pthread" ;;
+@@ -220,31 +220,14 @@ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL,
+ #
+ # Find keysymdef.h
+ #
+-KEYSYMDEF=""
+ AC_MSG_CHECKING([keysymdef.h])
+-for flag in $XPROTO_CFLAGS -I/usr/include; do
+- case "$KEYSYMDEF" in
+- "")
+- case "$flag" in
+- *-I*)
+- dir=`echo "$flag" | sed 's/ *-I//'`
+- file="$dir/X11/keysymdef.h"
+- if test -f "$file"; then
+- KEYSYMDEF="$file"
+- fi
+- ;;
+- esac
+- ;;
+- esac
+-done
+-case "$KEYSYMDEF" in
+-"")
+- AC_MSG_ERROR([Cannot find keysymdef.h])
+- ;;
+-*)
++dir=`pkg-config --variable=includedir xproto`
++KEYSYMDEF="$dir/X11/keysymdef.h"
++if test -f "$KEYSYMDEF"; then
+ AC_MSG_RESULT([$KEYSYMDEF])
+- ;;
+-esac
++else
++ AC_MSG_ERROR([Cannot find keysymdef.h])
++fi
+ AC_SUBST(KEYSYMDEF)
+
+ AM_CONDITIONAL(UDC, test xfalse = xtrue)
+@@ -322,6 +305,8 @@ else
fi
AC_SUBST(XKBPROTO_REQUIRES)
diff --git a/x11/libX11/patches/patch-ab b/x11/libX11/patches/patch-ab
new file mode 100644
index 00000000000..c056c1a61f0
--- /dev/null
+++ b/x11/libX11/patches/patch-ab
@@ -0,0 +1,21 @@
+$NetBSD: patch-ab,v 1.3 2008/07/24 01:07:31 bjs Exp $
+
+IM: Respect XMODIFIERS for Thai locale (bug #15719)
+
+--- modules/im/ximcp/imThaiIm.c.orig 2008-03-06 15:45:06.000000000 -0500
++++ modules/im/ximcp/imThaiIm.c
+@@ -67,7 +67,13 @@ _XimCheckIfThaiProcessing(im)
+ char *language;
+
+ _XGetLCValues(im->core.lcd, XlcNLanguage, &language, NULL);
+- if(strcmp(language, THAI_LANGUAGE_NAME) == 0) {
++ if(strcmp(language, THAI_LANGUAGE_NAME) == 0 &&
++ (strcmp(im->core.im_name, "") == 0 ||
++ strcmp(im->core.im_name, "BasicCheck") == 0 ||
++ strcmp(im->core.im_name, "Strict") == 0 ||
++ strcmp(im->core.im_name, "Thaicat") == 0 ||
++ strcmp(im->core.im_name, "Passthrough") == 0))
++ {
+ return(True);
+ }
+ return(False);
diff --git a/x11/libX11/patches/patch-ac b/x11/libX11/patches/patch-ac
index b07f4a2b594..9380df1396d 100644
--- a/x11/libX11/patches/patch-ac
+++ b/x11/libX11/patches/patch-ac
@@ -1,6 +1,9 @@
-$NetBSD: patch-ac,v 1.4 2008/04/24 07:45:49 joerg Exp $
+$NetBSD: patch-ac,v 1.5 2008/07/24 01:07:31 bjs Exp $
---- configure.orig 2008-03-06 21:48:42.000000000 +0100
+_POSIX_THREAD_SAFE_FUNCTIONS is not used on NetBSD. Instead,
+let's use _REENTRANT.
+
+--- configure.orig 2008-03-06 15:48:42.000000000 -0500
+++ configure
@@ -927,6 +927,8 @@ XKB_FALSE
XKBPROTO_CFLAGS
@@ -115,6 +118,17 @@ $NetBSD: patch-ac,v 1.4 2008/04/24 07:45:49 joerg Exp $
if test x$thrstubs = xyes; then
THRSTUBS_TRUE=
THRSTUBS_FALSE='#'
+@@ -22966,8 +22970,8 @@ if test x$xthreads = xyes ; then
+ linux*|openbsd*|gnu*|k*bsd*-gnu)
+ XTHREADLIB=-lpthread ;;
+ netbsd*)
+- XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS"
+- XTHREADLIB="-lpthread" ;;
++ XTHREAD_CFLAGS="-D_REENTRANT"
++ XTHREADLIB="-pthread" ;;
+ freebsd*)
+ XTHREAD_CFLAGS="-D_THREAD_SAFE"
+ XTHREADLIB="-pthread" ;;
@@ -23507,6 +23511,15 @@ else
fi
diff --git a/x11/libX11/patches/patch-ah b/x11/libX11/patches/patch-ah
index 4f339156304..fbf72e43ae1 100644
--- a/x11/libX11/patches/patch-ah
+++ b/x11/libX11/patches/patch-ah
@@ -1,18 +1,60 @@
-$NetBSD: patch-ah,v 1.2 2008/01/14 07:12:53 tnn Exp $
+$NetBSD: patch-ah,v 1.3 2008/07/24 01:07:31 bjs Exp $
---- src/XlibInt.c.orig 2007-07-21 10:45:39.000000000 +0200
+--- src/XlibInt.c.orig 2008-07-23 01:53:49.000000000 -0400
+++ src/XlibInt.c
-@@ -138,8 +138,13 @@ xthread_t (*_Xthread_self_fn)(void) = NU
- #ifdef ISC
- #define ECHECK(err) ((errno == err) || ETEST())
- #else
-+#ifdef __hpux
-+#define ECHECK(err) ((errno == err) || ETEST())
-+#define SUNSYSV 1
-+#else
- #define ECHECK(err) (errno == err)
- #endif
-+#endif
- #define ESET(val) errno = val
- #endif
- #endif
+@@ -206,8 +206,6 @@ static char *_XAsyncReply(
+ Bool discard);
+ #endif /* !USE_XCB */
+
+-#define SEQLIMIT (65535 - (BUFSIZE / SIZEOF(xReq)) - 10)
+-
+ /*
+ * The following routines are internal routines used by Xlib for protocol
+ * packet transmission and reception.
+@@ -570,24 +568,34 @@ _XWaitForReadable(
+ }
+ #endif /* !USE_XCB */
+
++static int sync_hazard(Display *dpy)
++{
++ unsigned long span = dpy->request - dpy->last_request_read;
++ unsigned long hazard = min((dpy->bufmax - dpy->buffer) / SIZEOF(xReq), 65535 - 10);
++ return span >= 65535 - hazard - 10;
++}
++
+ static
+ int _XSeqSyncFunction(
+ register Display *dpy)
+ {
+ xGetInputFocusReply rep;
+ register xReq *req;
++ int sent_sync = 0;
+
+ LockDisplay(dpy);
+- if ((dpy->request - dpy->last_request_read) >= (BUFSIZE / SIZEOF(xReq))) {
++ if ((dpy->request - dpy->last_request_read) >= (65535 - BUFSIZE/SIZEOF(xReq))) {
+ GetEmptyReq(GetInputFocus, req);
+ (void) _XReply (dpy, (xReply *)&rep, 0, xTrue);
++ sent_sync = 1;
+ }
+ /* could get XID handler while waiting for reply in MT env */
+- if (dpy->synchandler == _XSeqSyncFunction) {
++ if (dpy->synchandler == _XSeqSyncFunction && !sync_hazard(dpy)) {
+ dpy->synchandler = dpy->savedsynchandler;
+ dpy->flags &= ~XlibDisplayPrivSync;
+ }
+ UnlockDisplay(dpy);
++ if (sent_sync)
+ SyncHandle();
+ return 0;
+ }
+@@ -595,8 +603,7 @@ int _XSeqSyncFunction(
+ void _XSetSeqSyncFunction(
+ register Display *dpy)
+ {
+- if ((dpy->request - dpy->last_request_read) >= SEQLIMIT &&
+- !(dpy->flags & XlibDisplayPrivSync)) {
++ if (!(dpy->flags & XlibDisplayPrivSync) && sync_hazard(dpy)) {
+ dpy->savedsynchandler = dpy->synchandler;
+ dpy->synchandler = _XSeqSyncFunction;
+ dpy->flags |= XlibDisplayPrivSync;
diff --git a/x11/libX11/patches/patch-ai b/x11/libX11/patches/patch-ai
new file mode 100644
index 00000000000..5602e86b326
--- /dev/null
+++ b/x11/libX11/patches/patch-ai
@@ -0,0 +1,17 @@
+$NetBSD: patch-ai,v 1.1 2008/07/24 01:07:31 bjs Exp $
+
+Bug #15884: Remove useless sleep()'s from the connection code.
+
+--- modules/im/ximcp/imTrans.c.orig 2008-03-06 15:45:06.000000000 -0500
++++ modules/im/ximcp/imTrans.c
+@@ -77,10 +77,7 @@ _XimTransConnect(
+ spec->trans_conn = NULL;
+
+ if (connect_stat == TRANS_TRY_CONNECT_AGAIN)
+- {
+- sleep(1);
+ continue;
+- }
+ else
+ break;
+ }
diff --git a/x11/libX11/patches/patch-aj b/x11/libX11/patches/patch-aj
new file mode 100644
index 00000000000..e5133e2142d
--- /dev/null
+++ b/x11/libX11/patches/patch-aj
@@ -0,0 +1,18 @@
+$NetBSD: patch-aj,v 1.1 2008/07/24 01:07:31 bjs Exp $
+
+NLS: Make UTF-8 the default for Russian
+
+--- nls/locale.alias.pre.orig 2008-03-06 15:45:06.000000000 -0500
++++ nls/locale.alias.pre
+@@ -916,8 +916,9 @@ ro_RO: ro_RO.ISO8859-2
+ ro_RO.iso88592: ro_RO.ISO8859-2
+ ro_RO.ISO-8859-2: ro_RO.ISO8859-2
+ ro_RO.utf8: ro_RO.UTF-8
+-ru: ru_RU.ISO8859-5
+-ru_RU: ru_RU.ISO8859-5
++ru: ru_RU.UTF-8
++ru_RU: ru_RU.UTF-8
++ru_RU.utf8: ru_RU.UTF-8
+ ru_RU.iso88595: ru_RU.ISO8859-5
+ ru_RU.ISO-8859-5: ru_RU.ISO8859-5
+ ru_RU.koi8r: ru_RU.KOI8-R
diff --git a/x11/libX11/patches/patch-ak b/x11/libX11/patches/patch-ak
new file mode 100644
index 00000000000..eabac8ee7aa
--- /dev/null
+++ b/x11/libX11/patches/patch-ak
@@ -0,0 +1,44 @@
+$NetBSD: patch-ak,v 1.1 2008/07/24 01:07:31 bjs Exp $
+
+ConnDis: properly cast 'addr' before accessing it as a byte array.
+
+Bug #15884: Remove useless sleep()'s from the connection code.
+
+--- src/ConnDis.c.orig 2008-03-06 15:45:06.000000000 -0500
++++ src/ConnDis.c
+@@ -42,6 +42,7 @@ in this Software without prior written a
+ #include <X11/Xdmcp.h>
+ #include <stdio.h>
+ #include <ctype.h>
++#include <unistd.h>
+
+ #if !defined(WIN32)
+ #ifndef Lynx
+@@ -389,10 +390,7 @@ _X11TransConnectDisplay (
+ trans_conn = NULL;
+
+ if (connect_stat == TRANS_TRY_CONNECT_AGAIN)
+- {
+- sleep(1);
+ continue;
+- }
+ else
+ break;
+ }
+@@ -409,7 +407,6 @@ _X11TransConnectDisplay (
+ {
+ _X11TransClose(trans_conn);
+ trans_conn = NULL;
+- sleep(1);
+ if (saddr)
+ {
+ free ((char *) saddr);
+@@ -1143,7 +1140,7 @@ GetAuthorization(
+
+ /* In the case of v4 mapped addresses send the v4
+ part of the address - addr is already in network byte order */
+- if (memcmp(addr+8, ipv4mappedprefix, 12) == 0) {
++ if (memcmp((char*)addr+8, ipv4mappedprefix, 12) == 0) {
+ for (i = 20 ; i < 24; i++)
+ xdmcp_data[j++] = ((char *)addr)[i];
+
diff --git a/x11/libX11/patches/patch-al b/x11/libX11/patches/patch-al
new file mode 100644
index 00000000000..70570a9a70c
--- /dev/null
+++ b/x11/libX11/patches/patch-al
@@ -0,0 +1,27 @@
+$NetBSD: patch-al,v 1.1 2008/07/24 01:07:31 bjs Exp $
+
+Warning fixes.
+
+--- src/GetDflt.c.orig 2008-03-06 15:45:06.000000000 -0500
++++ src/GetDflt.c
+@@ -98,16 +98,16 @@ GetHomeDir(
+ int len)
+ {
+ #ifdef WIN32
+- register char *ptr1;
+- register char *ptr2;
++ register char *ptr1 = NULL;
++ register char *ptr2 = NULL;
+ int len1 = 0, len2 = 0;
+
+- if (ptr1 = getenv("HOME")) { /* old, deprecated */
++ if ((ptr1 = getenv("HOME"))) { /* old, deprecated */
+ len1 = strlen (ptr1);
+ } else if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) {
+ len1 = strlen (ptr1);
+ len2 = strlen (ptr2);
+- } else if (ptr2 = getenv("USERNAME")) {
++ } else if ((ptr2 = getenv("USERNAME"))) {
+ len1 = strlen (ptr1 = "/users/");
+ len2 = strlen (ptr2);
+ }
diff --git a/x11/libX11/patches/patch-am b/x11/libX11/patches/patch-am
new file mode 100644
index 00000000000..7b74e8c7bd0
--- /dev/null
+++ b/x11/libX11/patches/patch-am
@@ -0,0 +1,15 @@
+$NetBSD: patch-am,v 1.1 2008/07/24 01:07:31 bjs Exp $
+
+Warning fix.
+
+--- src/locking.c.orig 2008-03-06 15:45:06.000000000 -0500
++++ src/locking.c
+@@ -60,7 +60,7 @@ extern LockInfoPtr _Xi18n_lock;
+ #ifdef WIN32
+ static DWORD _X_TlsIndex = (DWORD)-1;
+
+-_Xthread_init()
++void _Xthread_init()
+ {
+ if (_X_TlsIndex == (DWORD)-1)
+ _X_TlsIndex = TlsAlloc();
diff --git a/x11/libX11/patches/patch-an b/x11/libX11/patches/patch-an
new file mode 100644
index 00000000000..b49ab5e896a
--- /dev/null
+++ b/x11/libX11/patches/patch-an
@@ -0,0 +1,27 @@
+$NetBSD: patch-an,v 1.1 2008/07/24 01:07:31 bjs Exp $
+
+Fix missing error condition (from GIT)
+
+added error check in Xcms color file parser; closes bug #15305
+
+--- src/xcms/cmsColNm.c.orig 2008-03-06 15:45:06.000000000 -0500
++++ src/xcms/cmsColNm.c
+@@ -735,10 +735,17 @@ LoadColornameDB(void)
+ }
+
+ if ((stream = _XFopenFile (pathname, "r")) == NULL) {
++ /* can't open file */
++ XcmsColorDbState = XcmsDbInitFailure;
+ return(XcmsFailure);
+ }
+
+- stringSectionSize(stream, &nEntries, &size);
++ if (stringSectionSize(stream, &nEntries, &size) != XcmsSuccess ||
++ nEntries == 0) {
++ (void) fclose(stream);
++ XcmsColorDbState = XcmsDbInitFailure;
++ return(XcmsFailure);
++ }
+ rewind(stream);
+
+ strings = (char *) Xmalloc(size);
diff --git a/x11/libX11/patches/patch-ao b/x11/libX11/patches/patch-ao
new file mode 100644
index 00000000000..f6a934cca99
--- /dev/null
+++ b/x11/libX11/patches/patch-ao
@@ -0,0 +1,15 @@
+$NetBSD: patch-ao,v 1.1 2008/07/24 01:07:31 bjs Exp $
+
+Warning fix.
+
+--- src/xlibi18n/lcWrap.c.orig 2008-03-06 15:45:06.000000000 -0500
++++ src/xlibi18n/lcWrap.c
+@@ -154,7 +154,7 @@ _XlcDefaultMapModifiers(
+ #ifdef WIN32
+ {
+ char *s;
+- for (s = mods; s = strchr(s, '@'); s++) {
++ for (s = mods; (s = strchr(s, '@')); s++) {
+ for (s++; *s && *s != '='; s++) {
+ if (*s == '#') {
+ *s = '=';