From 6d46609dfd488f9433d0ed10f49d05e31a6fe51e Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 1 Jul 2013 11:35:04 +0200 Subject: Synchronised files --- X11/Xlibint.h | 18 +++++++++++++++++- X11/extensions/extutil.h | 3 ++- X11/extensions/multibuf.h | 6 ------ 3 files changed, 19 insertions(+), 8 deletions(-) (limited to 'X11') diff --git a/X11/Xlibint.h b/X11/Xlibint.h index f71692c5d..ff2975fe7 100644 --- a/X11/Xlibint.h +++ b/X11/Xlibint.h @@ -835,6 +835,15 @@ typedef struct _XExten { /* private to extension mechanism */ struct _XExten *next_flush; /* next in list of those with flushes */ } _XExtension; +/* Temporary definition until we can depend on an xproto release with it */ +#ifdef _X_COLD +# define _XLIB_COLD _X_COLD +#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403) /* 4.3+ */ +# define _XLIB_COLD __attribute__((__cold__)) +#else +# define _XLIB_COLD /* nothing */ +#endif + /* extension hooks */ #ifdef DataRoutineIsProcedure @@ -857,7 +866,14 @@ X11_EXTERN int (*_XErrorFunction)( extern void _XEatData( Display* /* dpy */, unsigned long /* n */ -); +) _XLIB_COLD; +extern void _XEatDataWords( + Display* /* dpy */, + unsigned long /* n */ +) _XLIB_COLD; +#if defined(__SUNPRO_C) /* Studio compiler alternative to "cold" attribute */ +# pragma rarely_called(_XEatData, _XEatDataWords) +#endif extern char *_XAllocScratch( Display* /* dpy */, unsigned long /* nbytes */ diff --git a/X11/extensions/extutil.h b/X11/extensions/extutil.h index 29404d5ae..074cc183a 100644 --- a/X11/extensions/extutil.h +++ b/X11/extensions/extutil.h @@ -34,6 +34,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _EXTUTIL_H_ #define _EXTUTIL_H_ +#include #include /* @@ -178,7 +179,7 @@ char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \ code -= codes->first_error; \ if (code >= 0 && code < nerr) { \ char tmp[256]; \ - sprintf (tmp, "%s.%d", extname, code); \ + snprintf (tmp, sizeof(tmp), "%s.%d", extname, code); \ XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \ return buf; \ } \ diff --git a/X11/extensions/multibuf.h b/X11/extensions/multibuf.h index 12fda357d..27165f08a 100644 --- a/X11/extensions/multibuf.h +++ b/X11/extensions/multibuf.h @@ -30,15 +30,9 @@ in this Software without prior written authorization from The Open Group. #include -#if !defined(UNIXCPP) || defined(ANSICPP) #define MbufGetReq(name,req,info) GetReq (name, req); \ req->reqType = info->codes->major_opcode; \ req->mbufReqType = X_##name; -#else -#define MbufGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->mbufReqType = X_/**/name; -#endif /* * Extra definitions that will only be needed in the client -- cgit v1.2.3