From 1078f97706b77ab93fb30204acf270cfb652c900 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 7 Oct 2016 21:00:20 +0200 Subject: rename xf86bigfstr.h to xf86bigfproto.h --- nx-X11/include/extensions/Imakefile | 2 +- nx-X11/include/extensions/xf86bigfproto.h | 88 +++++++++++++++++++++++++++++++ nx-X11/include/extensions/xf86bigfstr.h | 88 ------------------------------- 3 files changed, 89 insertions(+), 89 deletions(-) create mode 100644 nx-X11/include/extensions/xf86bigfproto.h delete mode 100644 nx-X11/include/extensions/xf86bigfstr.h (limited to 'nx-X11/include') diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index d2be4b324..2d8f63494 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -13,7 +13,7 @@ SCREENSAVERHEADERS = saver.h saverproto.h scrnsaver.h #endif #if BuildXF86BigfontExt -XF86BIGFONTHEADERS = xf86bigfont.h xf86bigfstr.h +XF86BIGFONTHEADERS = xf86bigfont.h xf86bigfproto.h #endif #if BuildXvExt XVHEADERS = Xv.h Xvlib.h Xvproto.h diff --git a/nx-X11/include/extensions/xf86bigfproto.h b/nx-X11/include/extensions/xf86bigfproto.h new file mode 100644 index 000000000..b4b791fb9 --- /dev/null +++ b/nx-X11/include/extensions/xf86bigfproto.h @@ -0,0 +1,88 @@ +/* + * Declarations of request structures for the BIGFONT extension. + * + * Copyright (c) 1999-2000 Bruno Haible + * Copyright (c) 1999-2000 The XFree86 Project, Inc. + */ + +/* THIS IS NOT AN X CONSORTIUM STANDARD */ + +#ifndef _XF86BIGFPROTO_H_ +#define _XF86BIGFPROTO_H_ + +#include + +#define XF86BIGFONTNAME "XFree86-Bigfont" + +#define XF86BIGFONT_MAJOR_VERSION 1 /* current version numbers */ +#define XF86BIGFONT_MINOR_VERSION 1 + +typedef struct _XF86BigfontQueryVersion { + CARD8 reqType; /* always XF86BigfontReqCode */ + CARD8 xf86bigfontReqType; /* always X_XF86BigfontQueryVersion */ + CARD16 length B16; +} xXF86BigfontQueryVersionReq; +#define sz_xXF86BigfontQueryVersionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 capabilities; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of XFree86-Bigfont */ + CARD16 minorVersion B16; /* minor version of XFree86-Bigfont */ + CARD32 uid B32; + CARD32 gid B32; + CARD32 signature B32; + CARD32 pad1 B32; + CARD32 pad2 B32; +} xXF86BigfontQueryVersionReply; +#define sz_xXF86BigfontQueryVersionReply 32 + +/* Bit masks that can be set in the capabilities */ +#define XF86Bigfont_CAP_LocalShm 1 + +typedef struct _XF86BigfontQueryFont { + CARD8 reqType; /* always XF86BigfontReqCode */ + CARD8 xf86bigfontReqType; /* always X_XF86BigfontQueryFont */ + CARD16 length B16; + CARD32 id B32; + CARD32 flags B32; +} xXF86BigfontQueryFontReq; +#define sz_xXF86BigfontQueryFontReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + xCharInfo minBounds; + CARD32 walign1 B32; + xCharInfo maxBounds; + CARD32 walign2 B32; + CARD16 minCharOrByte2 B16; + CARD16 maxCharOrByte2 B16; + CARD16 defaultChar B16; + CARD16 nFontProps B16; + CARD8 drawDirection; + CARD8 minByte1; + CARD8 maxByte1; + BOOL allCharsExist; + INT16 fontAscent B16; + INT16 fontDescent B16; + CARD32 nCharInfos B32; + CARD32 nUniqCharInfos B32; + CARD32 shmid B32; + CARD32 shmsegoffset B32; + /* followed by nFontProps xFontProp structures */ + /* and if nCharInfos > 0 && shmid == -1, + followed by nUniqCharInfos xCharInfo structures + and then by nCharInfos CARD16 indices (each >= 0, < nUniqCharInfos) + and then, if nCharInfos is odd, one more CARD16 for padding. */ +} xXF86BigfontQueryFontReply; +#define sz_xXF86BigfontQueryFontReply 72 + +/* Bit masks that can be set in the flags */ +#define XF86Bigfont_FLAGS_Shm 1 + +#endif /* _XF86BIGFPROTO_H_ */ diff --git a/nx-X11/include/extensions/xf86bigfstr.h b/nx-X11/include/extensions/xf86bigfstr.h deleted file mode 100644 index 4a8eda47a..000000000 --- a/nx-X11/include/extensions/xf86bigfstr.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Declarations of request structures for the BIGFONT extension. - * - * Copyright (c) 1999-2000 Bruno Haible - * Copyright (c) 1999-2000 The XFree86 Project, Inc. - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifndef _XF86BIGFSTR_H_ -#define _XF86BIGFSTR_H_ - -#include - -#define XF86BIGFONTNAME "XFree86-Bigfont" - -#define XF86BIGFONT_MAJOR_VERSION 1 /* current version numbers */ -#define XF86BIGFONT_MINOR_VERSION 1 - -typedef struct _XF86BigfontQueryVersion { - CARD8 reqType; /* always XF86BigfontReqCode */ - CARD8 xf86bigfontReqType; /* always X_XF86BigfontQueryVersion */ - CARD16 length B16; -} xXF86BigfontQueryVersionReq; -#define sz_xXF86BigfontQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 capabilities; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of XFree86-Bigfont */ - CARD16 minorVersion B16; /* minor version of XFree86-Bigfont */ - CARD32 uid B32; - CARD32 gid B32; - CARD32 signature B32; - CARD32 pad1 B32; - CARD32 pad2 B32; -} xXF86BigfontQueryVersionReply; -#define sz_xXF86BigfontQueryVersionReply 32 - -/* Bit masks that can be set in the capabilities */ -#define XF86Bigfont_CAP_LocalShm 1 - -typedef struct _XF86BigfontQueryFont { - CARD8 reqType; /* always XF86BigfontReqCode */ - CARD8 xf86bigfontReqType; /* always X_XF86BigfontQueryFont */ - CARD16 length B16; - CARD32 id B32; - CARD32 flags B32; -} xXF86BigfontQueryFontReq; -#define sz_xXF86BigfontQueryFontReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - xCharInfo minBounds; - CARD32 walign1 B32; - xCharInfo maxBounds; - CARD32 walign2 B32; - CARD16 minCharOrByte2 B16; - CARD16 maxCharOrByte2 B16; - CARD16 defaultChar B16; - CARD16 nFontProps B16; - CARD8 drawDirection; - CARD8 minByte1; - CARD8 maxByte1; - BOOL allCharsExist; - INT16 fontAscent B16; - INT16 fontDescent B16; - CARD32 nCharInfos B32; - CARD32 nUniqCharInfos B32; - CARD32 shmid B32; - CARD32 shmsegoffset B32; - /* followed by nFontProps xFontProp structures */ - /* and if nCharInfos > 0 && shmid == -1, - followed by nUniqCharInfos xCharInfo structures - and then by nCharInfos CARD16 indices (each >= 0, < nUniqCharInfos) - and then, if nCharInfos is odd, one more CARD16 for padding. */ -} xXF86BigfontQueryFontReply; -#define sz_xXF86BigfontQueryFontReply 72 - -/* Bit masks that can be set in the flags */ -#define XF86Bigfont_FLAGS_Shm 1 - -#endif /* _XF86BIGFSTR_H_ */ -- cgit v1.2.3 From 7f98ab03b47ca980bf656ca6083d74c5b4546da9 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 8 Oct 2016 00:20:48 +0200 Subject: update Xfuncproto.h --- nx-X11/include/Xfuncproto.h | 69 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 4 deletions(-) (limited to 'nx-X11/include') diff --git a/nx-X11/include/Xfuncproto.h b/nx-X11/include/Xfuncproto.h index 88113c086..7760b6e44 100644 --- a/nx-X11/include/Xfuncproto.h +++ b/nx-X11/include/Xfuncproto.h @@ -67,15 +67,15 @@ in this Software without prior written authorization from The Open Group. #endif #endif /* _XFUNCPROTOBEGIN */ +/* Added in X11R6.9, so available in any version of modular xproto */ #if defined(__GNUC__) && (__GNUC__ >= 4) # define _X_SENTINEL(x) __attribute__ ((__sentinel__(x))) -# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) #else # define _X_SENTINEL(x) -# define _X_ATTRIBUTE_PRINTF(x,y) #endif /* GNUC >= 4 */ -#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) +/* Added in X11R6.9, so available in any version of modular xproto */ +#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__) && !defined(__MINGW32__) # define _X_EXPORT __attribute__((visibility("default"))) # define _X_HIDDEN __attribute__((visibility("hidden"))) # define _X_INTERNAL __attribute__((visibility("internal"))) @@ -83,18 +83,52 @@ in this Software without prior written authorization from The Open Group. # define _X_EXPORT __global # define _X_HIDDEN __hidden # define _X_INTERNAL __hidden -#else /* not gcc >= 3.3 and not Sun Studio >= 8 */ +#else /* not gcc >= 4 and not Sun Studio >= 8 */ # define _X_EXPORT # define _X_HIDDEN # 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) +# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0) +#else /* not gcc >= 3.3 */ +# define _X_LIKELY(x) (x) +# 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)) #else /* not gcc >= 3.1 */ # define _X_DEPRECATED #endif +/* requires xproto >= 7.0.17 */ +#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \ + || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +# define _X_NORETURN __attribute((noreturn)) +#else +# define _X_NORETURN +#endif /* GNUC */ + +/* Added in X11R6.9, so available in any version of modular xproto */ +#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203) +# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) +#else /* not gcc >= 2.3 */ +# define _X_ATTRIBUTE_PRINTF(x,y) +#endif + /* requires xproto >= 7.0.22 */ #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205) #define _X_UNUSED __attribute__((__unused__)) @@ -102,4 +136,31 @@ in this Software without prior written authorization from The Open Group. #define _X_UNUSED /* */ #endif +/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */ +/* requires xproto >= 7.0.9 + (introduced in 7.0.8 but didn't support all compilers until 7.0.9) */ +#if defined(inline) /* assume autoconf set it correctly */ || \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \ + (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)) +# define _X_INLINE inline +#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */ +# define _X_INLINE __inline__ +#else +# define _X_INLINE +#endif + +/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */ +/* requires xproto >= 7.0.21 */ +#ifndef _X_RESTRICT_KYWD +# if defined(restrict) /* assume autoconf set it correctly */ || \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ \ + && !defined(__cplusplus)) /* Workaround g++ issue on Solaris */ +# define _X_RESTRICT_KYWD restrict +# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */ +# define _X_RESTRICT_KYWD __restrict__ +# else +# define _X_RESTRICT_KYWD +# endif +#endif + #endif /* _XFUNCPROTO_H_ */ -- cgit v1.2.3