x11proto-core: Changes to 'debian-unstable'
ChangeLog | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
Xdefs.h | 4 -
Xfuncproto.h.in | 9 ++++
Xmd.h | 81 ++++++++------------------------------
Xpoll.h.in | 2
Xproto.h | 30 +++++++-------
Xthreads.h | 1
Xwindows.h | 6 ++
configure.ac | 5 +-
debian/changelog | 6 ++
keysymdef.h | 6 ++
11 files changed, 183 insertions(+), 83 deletions(-)
New commits:
commit fd933521ce4cafc4ee4b7138fb012a3c4d4eea95
Author: Julien Cristau <jcristau@debian.org>
Date: Mon Apr 14 20:38:26 2014 +0200
Upload to unstable
diff --git a/debian/changelog b/debian/changelog
index 3a3f16f..fe4567f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-x11proto-core (7.0.26-1) UNRELEASED; urgency=medium
+x11proto-core (7.0.26-1) unstable; urgency=medium
* New upstream release.
- -- Julien Cristau <jcristau@debian.org> Mon, 14 Apr 2014 20:37:29 +0200
+ -- Julien Cristau <jcristau@debian.org> Mon, 14 Apr 2014 20:38:23 +0200
x11proto-core (7.0.24-1) unstable; urgency=low
commit efc91d84a203e18cf99239837c2dbdc2df23a5af
Author: Julien Cristau <jcristau@debian.org>
Date: Mon Apr 14 20:37:56 2014 +0200
Bump to 7.0.26
diff --git a/ChangeLog b/ChangeLog
index bfbeb89..7aead74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,119 @@
+commit 03cbbf6c3e811c026c86e3a60d2f9af56606e155
+Author: Julien Cristau <jcristau@debian.org>
+Date: Mon Apr 14 15:36:00 2014 +0200
+
+ xproto 7.0.26
+
+ Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit d522ff998b77f0c8c39c4d3945f78d2221fe1209
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date: Tue Dec 17 14:26:07 2013 +0000
+
+ Xpoll.h.in: Fix WIN32 check to trigger on MinGW only
+
+ MinGW-w64 w32api-headers 3.0.0 define WIN32 in some places they didn't before,
+ which causes this check to turn on for Cygwin, which is not wanted.
+
+ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+ Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+commit aee7e4de57349db186ca9d8c1312dc18590d3942
+Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+Date: Wed Apr 3 13:55:16 2013 +0100
+
+ Xwindows.h: Wrap Windows 64-bit types as well for 64-bit build
+
+ Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+ Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+
+commit e5e2ed5b115107d1b1d5248ac5c5dda67e71ea50
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Dec 28 11:11:00 2013 -0800
+
+ Add more comments on connection setup to Xproto.h
+
+ Some of the bits I forget and have to dig out of the protocol spec
+ every few years when I need to know again.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 148d89f0b3a652acc54b1a21807ffd6d0e81e279
+Author: Keith Packard <keithp@keithp.com>
+Date: Sun Dec 15 08:27:09 2013 -0800
+
+ Replace 'pointer' with explicit 'void *'
+
+ To get rid of the 'pointer' typedef, stop using it locally. That way,
+ when _XTYPEDEF_POINTER is defined before Xdefs.h is included, it won't
+ get defined and Xdefs.h will still compile.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3911ad9e8e8911c4b4a5d624e73b51667d0e3963
+Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+Date: Thu Nov 21 20:20:22 2013 -0600
+
+ Xthreads.h: Declare _Xthread_init for WIN32
+
+ This fixes the build of libXt on *-*-mingw* with -Werror=implicit.
+
+ Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a7fa86998c873ce7463d169b4bd423898ca2bae1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Nov 22 22:14:24 2013 -0800
+
+ xproto 7.0.25
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a8aa17cb63493b4b756587ddc884a9055dba14da
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Sat Oct 26 09:42:05 2013 -0400
+
+ config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES
+
+ Fix Automake warning: AC_OUTPUT should be used without arguments.
+ www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ed5a86761d96d4bdebda4f09071a49cbf4688d1b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Mar 1 20:05:12 2013 -0800
+
+ Remove WORD64, MUSTCOPY, and other CRAY leftovers
+
+ Leaves behind several no-op macros for compatibility with existing
+ code that uses them.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6d4acb0e3a6568a8faaa651d4e3d32f917b9067b
+Author: Benno Schulenberg <bensberg@justemail.net>
+Date: Sat Aug 31 17:00:34 2013 +0200
+
+ Additional dead keysyms to complete the German DIN T3 keyboard layout.
+
+ Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+commit 043ed78ce03febd113615f5920bc9dffaf7f0b16
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Apr 19 14:45:28 2013 -0700
+
+ Add _X_COLD attribute for branch prediction hints
+
+ Unfortunately the Solaris Studio equivalent is a pragma taking the
+ function names as arguments, so doesn't translate cleanly into a
+ common macro form.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
commit d103af8068fb90494cbd6e1ff950850369bbf95f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Mar 29 16:20:49 2013 -0700
diff --git a/debian/changelog b/debian/changelog
index d1fbc90..3a3f16f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+x11proto-core (7.0.26-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+
+ -- Julien Cristau <jcristau@debian.org> Mon, 14 Apr 2014 20:37:29 +0200
+
x11proto-core (7.0.24-1) unstable; urgency=low
* New upstream release.
commit 03cbbf6c3e811c026c86e3a60d2f9af56606e155
Author: Julien Cristau <jcristau@debian.org>
Date: Mon Apr 14 15:36:00 2014 +0200
xproto 7.0.26
Signed-off-by: Julien Cristau <jcristau@debian.org>
diff --git a/configure.ac b/configure.ac
index 04f1238..355fd0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
-AC_INIT([Xproto], [7.0.25],
+AC_INIT([Xproto], [7.0.26],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
commit d522ff998b77f0c8c39c4d3945f78d2221fe1209
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Tue Dec 17 14:26:07 2013 +0000
Xpoll.h.in: Fix WIN32 check to trigger on MinGW only
MinGW-w64 w32api-headers 3.0.0 define WIN32 in some places they didn't before,
which causes this check to turn on for Cygwin, which is not wanted.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
diff --git a/Xpoll.h.in b/Xpoll.h.in
index 8275658..0a05424 100644
--- a/Xpoll.h.in
+++ b/Xpoll.h.in
@@ -50,7 +50,7 @@ from The Open Group.
#ifndef _XPOLL_H_
#define _XPOLL_H_
-#ifndef WIN32
+#if !defined(WIN32) || defined(__CYGWIN__)
#ifndef USE_POLL
commit aee7e4de57349db186ca9d8c1312dc18590d3942
Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Date: Wed Apr 3 13:55:16 2013 +0100
Xwindows.h: Wrap Windows 64-bit types as well for 64-bit build
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
diff --git a/Xwindows.h b/Xwindows.h
index e6be6ee..70e1deb 100644
--- a/Xwindows.h
+++ b/Xwindows.h
@@ -63,6 +63,10 @@ The Open Group.
#define _NO_BOOL_TYPEDEF
#define BOOL WINBOOL
#define INT32 wINT32
+#ifdef __x86_64__
+#define INT64 wINT64
+#define LONG64 wLONG64
+#endif
#undef Status
#define Status wStatus
#define ATOM wATOM
@@ -75,6 +79,8 @@ The Open Group.
#undef BYTE
#undef BOOL
#undef INT32
+#undef INT64
+#undef LONG64
#undef ATOM
#undef FreeResource
#undef CreateWindowA
commit e5e2ed5b115107d1b1d5248ac5c5dda67e71ea50
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Dec 28 11:11:00 2013 -0800
Add more comments on connection setup to Xproto.h
Some of the bits I forget and have to dig out of the protocol spec
every few years when I need to know again.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/Xproto.h b/Xproto.h
index 76e2c99..6cdea89 100644
--- a/Xproto.h
+++ b/Xproto.h
@@ -259,10 +259,13 @@ restoring the definitions in X.h. */
typedef CARD16 KeyButMask;
/*****************
- connection setup structure. This is followed by
- numRoots xWindowRoot structs.
+ Connection setup structures. See Chapter 8: Connection Setup
+ of the X Window System Protocol specification for details.
*****************/
+/* Client initiates handshake with this data, followed by the strings
+ * for the auth protocol & data.
+ */
typedef struct {
CARD8 byteOrder;
BYTE pad;
@@ -272,6 +275,16 @@ typedef struct {
CARD16 pad2 B16;
} xConnClientPrefix;
+/* Server response to xConnClientPrefix.
+ *
+ * If success == Success, this is followed by xConnSetup and
+ * numRoots xWindowRoot structs.
+ *
+ * If success == Failure, this is followed by a reason string.
+ *
+ * The protocol also defines a case of success == Authenticate, but
+ * that doesn't seem to have ever been implemented by the X Consortium.
+ */
typedef struct {
CARD8 success;
BYTE lengthReason; /*num bytes in string following if failure */
commit 148d89f0b3a652acc54b1a21807ffd6d0e81e279
Author: Keith Packard <keithp@keithp.com>
Date: Sun Dec 15 08:27:09 2013 -0800
Replace 'pointer' with explicit 'void *'
To get rid of the 'pointer' typedef, stop using it locally. That way,
when _XTYPEDEF_POINTER is defined before Xdefs.h is included, it won't
get defined and Xdefs.h will still compile.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/Xdefs.h b/Xdefs.h
index 46ffdad..e25a208 100644
--- a/Xdefs.h
+++ b/Xdefs.h
@@ -101,8 +101,8 @@ typedef FSID AccContext;
typedef struct timeval **OSTimePtr;
-typedef void (* BlockHandlerProcPtr)(pointer /* blockData */,
+typedef void (* BlockHandlerProcPtr)(void * /* blockData */,
OSTimePtr /* pTimeout */,
- pointer /* pReadmask */);
+ void * /* pReadmask */);
#endif
commit 3911ad9e8e8911c4b4a5d624e73b51667d0e3963
Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Date: Thu Nov 21 20:20:22 2013 -0600
Xthreads.h: Declare _Xthread_init for WIN32
This fixes the build of libXt on *-*-mingw* with -Werror=implicit.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/Xthreads.h b/Xthreads.h
index 3d44208..2027127 100644
--- a/Xthreads.h
+++ b/Xthreads.h
@@ -107,6 +107,7 @@ typedef struct {
struct _xthread_waiter *waiters;
} xcondition_rec;
typedef CRITICAL_SECTION xmutex_rec;
+extern void _Xthread_init(void);
# define xthread_init() _Xthread_init()
# define xthread_self GetCurrentThreadId
# define xthread_fork(func,closure) { \
commit a7fa86998c873ce7463d169b4bd423898ca2bae1
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Nov 22 22:14:24 2013 -0800
xproto 7.0.25
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/configure.ac b/configure.ac
index 53c6e34..04f1238 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
-AC_INIT([Xproto], [7.0.24],
+AC_INIT([Xproto], [7.0.25],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
commit a8aa17cb63493b4b756587ddc884a9055dba14da
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Sat Oct 26 09:42:05 2013 -0400
config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES
Fix Automake warning: AC_OUTPUT should be used without arguments.
www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
diff --git a/configure.ac b/configure.ac
index 0e21f8e..53c6e34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,8 +209,9 @@ if test "x$WIDEPROTO" = xno; then
fi
-AC_OUTPUT([Makefile
+AC_CONFIG_FILES([Makefile
specs/Makefile
specs/SIAddresses/Makefile
Xpoll.h
xproto.pc])
+AC_OUTPUT
commit ed5a86761d96d4bdebda4f09071a49cbf4688d1b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Mar 1 20:05:12 2013 -0800
Remove WORD64, MUSTCOPY, and other CRAY leftovers
Leaves behind several no-op macros for compatibility with existing
code that uses them.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/Xmd.h b/Xmd.h
index 96cc08f..492465e 100644
--- a/Xmd.h
+++ b/Xmd.h
@@ -70,15 +70,6 @@ SOFTWARE.
# endif
/*
- * Stuff to handle large architecture machines; the constants were generated
- * on a 32-bit machine and must correspond to the protocol.
- */
-# ifdef WORD64
-# define MUSTCOPY
-# endif /* WORD64 */
-
-
-/*
* Definition of macro used to set constants for size of network structures;
* machines with preprocessors that can't handle all of the sz_ symbols
* can define this macro to be sizeof(x) if and only if their compiler doesn't
@@ -100,29 +91,15 @@ SOFTWARE.
* need them. Note that bitfields are not guaranteed to be signed
* (or even unsigned) according to ANSI C.
*/
-# ifdef WORD64
-typedef long INT64;
-typedef unsigned long CARD64;
-# define B32 :32
-# define B16 :16
-# ifdef UNSIGNEDBITFIELDS
-typedef unsigned int INT32;
-typedef unsigned int INT16;
-# else
-typedef signed int INT32;
-typedef signed int INT16;
-# endif
-# else
-# define B32
-# define B16
-# ifdef LONG64
+# define B32 /* bitfield not needed on architectures with native 32-bit type */
+# define B16 /* bitfield not needed on architectures with native 16-bit type */
+# ifdef LONG64
typedef long INT64;
typedef int INT32;
-# else
+# else
typedef long INT32;
-# endif
-typedef short INT16;
# endif
+typedef short INT16;
typedef signed char INT8;
@@ -130,10 +107,8 @@ typedef signed char INT8;
typedef unsigned long CARD64;
typedef unsigned int CARD32;
# else
-typedef unsigned long CARD32;
-# endif
-# if !defined(WORD64) && !defined(LONG64)
typedef unsigned long long CARD64;
+typedef unsigned long CARD32;
# endif
typedef unsigned short CARD16;
typedef unsigned char CARD8;
@@ -145,43 +120,23 @@ typedef CARD8 BYTE;
typedef CARD8 BOOL;
/*
- * definitions for sign-extending bitfields on 64-bit architectures
+ * was definitions for sign-extending bitfields on architectures without
+ * native types smaller than 64-bit, now just backwards compatibility
*/
-# if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
-# define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
-# define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
-# define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
-# define cvtINT8toShort(val) cvtINT8toInt(val)
-# define cvtINT16toShort(val) cvtINT16toInt(val)
-# define cvtINT32toShort(val) cvtINT32toInt(val)
-# define cvtINT8toLong(val) cvtINT8toInt(val)
-# define cvtINT16toLong(val) cvtINT16toInt(val)
-# define cvtINT32toLong(val) cvtINT32toInt(val)
-# else
-# define cvtINT8toInt(val) (val)
-# define cvtINT16toInt(val) (val)
-# define cvtINT32toInt(val) (val)
-# define cvtINT8toShort(val) (val)
-# define cvtINT16toShort(val) (val)
-# define cvtINT32toShort(val) (val)
-# define cvtINT8toLong(val) (val)
-# define cvtINT16toLong(val) (val)
-# define cvtINT32toLong(val) (val)
-# endif /* WORD64 and UNSIGNEDBITFIELDS */
+# define cvtINT8toInt(val) (val)
+# define cvtINT16toInt(val) (val)
+# define cvtINT32toInt(val) (val)
+# define cvtINT8toShort(val) (val)
+# define cvtINT16toShort(val) (val)
+# define cvtINT32toShort(val) (val)
+# define cvtINT8toLong(val) (val)
+# define cvtINT16toLong(val) (val)
+# define cvtINT32toLong(val) (val)
-
-
-# ifdef MUSTCOPY
-/*
- * This macro must not cast or else pointers will get aligned and be wrong
- */
-# define NEXTPTR(p,t) (((char *) p) + SIZEOF(t))
-# else /* else not MUSTCOPY, this is used for 32-bit machines */
/*
* this version should leave result of type (t *), but that should only be
* used when not in MUSTCOPY
*/
-# define NEXTPTR(p,t) (((t *)(p)) + 1)
-# endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
+# define NEXTPTR(p,t) (((t *)(p)) + 1)
#endif /* XMD_H */
diff --git a/Xproto.h b/Xproto.h
index 495d441..76e2c99 100644
--- a/Xproto.h
+++ b/Xproto.h
@@ -625,13 +625,9 @@ typedef struct _xQueryFontReply {
CARD16 sequenceNumber B16;
CARD32 length B32; /* definitely > 0, even if "nCharInfos" is 0 */
xCharInfo minBounds;
-#ifndef WORD64
CARD32 walign1 B32;
-#endif
xCharInfo maxBounds;
-#ifndef WORD64
CARD32 walign2 B32;
-#endif
CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
CARD16 defaultChar B16;
CARD16 nFontProps B16; /* followed by this many xFontProp structures */
@@ -674,13 +670,9 @@ typedef struct {
CARD16 sequenceNumber B16;
CARD32 length B32; /* definitely > 0, even if "nameLength" is 0 */
xCharInfo minBounds;
-#ifndef WORD64
CARD32 walign1 B32;
-#endif
xCharInfo maxBounds;
-#ifndef WORD64
CARD32 walign2 B32;
-#endif
CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
CARD16 defaultChar B16;
CARD16 nFontProps B16; /* followed by this many xFontProp structures */
@@ -1447,12 +1439,7 @@ typedef struct {
CARD16 length B16;
Window destination B32;
CARD32 eventMask B32;
-#ifdef WORD64
- /* the structure should have been quad-aligned */
- BYTE eventdata[SIZEOF(xEvent)];
-#else
xEvent event;
-#endif /* WORD64 */
} xSendEventReq;
typedef struct {
commit 6d4acb0e3a6568a8faaa651d4e3d32f917b9067b
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Sat Aug 31 17:00:34 2013 +0200
Additional dead keysyms to complete the German DIN T3 keyboard layout.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
diff --git a/keysymdef.h b/keysymdef.h
index ae73977..147ecf5 100644
--- a/keysymdef.h
+++ b/keysymdef.h
@@ -414,6 +414,12 @@ SOFTWARE.
#define XK_dead_belowcomma 0xfe6e
#define XK_dead_currency 0xfe6f
+/* extra dead elements for German T3 layout */
+#define XK_dead_lowline 0xfe90
+#define XK_dead_aboveverticalline 0xfe91
+#define XK_dead_belowverticalline 0xfe92
+#define XK_dead_longsolidusoverlay 0xfe93
+
/* dead vowels for universal syllable entry */
#define XK_dead_a 0xfe80
#define XK_dead_A 0xfe81
commit 043ed78ce03febd113615f5920bc9dffaf7f0b16
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 19 14:45:28 2013 -0700
Add _X_COLD attribute for branch prediction hints
Unfortunately the Solaris Studio equivalent is a pragma taking the
function names as arguments, so doesn't translate cleanly into a
common macro form.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
index 8256fec..dac9229 100644
--- a/Xfuncproto.h.in
+++ b/Xfuncproto.h.in
@@ -97,6 +97,7 @@ in this Software without prior written authorization from The Open Group.
# define _X_INTERNAL
#endif /* GNUC >= 4 */
+/* Branch prediction hints for individual conditionals */
/* requires xproto >= 7.0.9 */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
@@ -106,6 +107,14 @@ in this Software without prior written authorization from The Open Group.
# define _X_UNLIKELY(x) (x)
#endif
+/* Bulk branch prediction hints via marking error path functions as "cold" */
+/* requires xproto >= 7.0.25 */
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403) /* 4.3+ */
+# define _X_COLD __attribute__((__cold__))
+#else
+# define _X_COLD /* nothing */
+#endif
+
/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
# define _X_DEPRECATED __attribute__((deprecated))
Reply to: