diff options
author | Egbert Eich <eich-at-freedesktop-dot-org> | 2005-05-17 08:10:10 +0000 |
---|---|---|
committer | Egbert Eich <eich-at-freedesktop-dot-org> | 2005-05-17 08:10:10 +0000 |
commit | 46e8d8a65430dd87c10b066b5cff99a689c22241 (patch) | |
tree | 029575822dac1985e5e1592567f3b3d05661dad4 | |
parent | 23198d2bfbf0049b2630235cd4d4a4ffba7ec6c1 (diff) |
gcc4 allows to check if sentinels are correct (a sentinel is the terminating element in a varargs list). A sentinel needs to be NULL, not 0 - which doesn't make a difference on 32bit but matters on 64bit. Furthermore it can be told that functions have a printf-like format string and argument list so that they can verify that both match. To use these features certain attributes need to be set - which are compiler specific. To do this we define macros which are expanded depending on the compiler version. For now we put those in include/Xfuncproto.h (the XFree86 DDX layer contains a file compiler.h which however is not visible outside the DDX) (Bugzilla #3268).XORG-6_8_99_9
-rw-r--r-- | include/X11/Xlib.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h index 62299b8..1cae2af 100644 --- a/include/X11/Xlib.h +++ b/include/X11/Xlib.h @@ -1,4 +1,4 @@ -/* $XdotOrg: lib/X11/include/X11/Xlib.h,v 1.3 2004-12-02 16:18:16 jg Exp $ */ +/* $XdotOrg: lib/X11/include/X11/Xlib.h,v 1.4 2005-05-17 08:10:10 eich Exp $ */ /* $Xorg: Xlib.h,v 1.6 2001/02/09 02:03:38 xorgcvs Exp $ */ /* @@ -3572,12 +3572,12 @@ extern Status XCloseOM( extern char *XSetOMValues( XOM /* om */, ... -); +) _X_SENTINEL(0); extern char *XGetOMValues( XOM /* om */, ... -); +) _X_SENTINEL(0); extern Display *XDisplayOfOM( XOM /* om */ @@ -3590,7 +3590,7 @@ extern char *XLocaleOfOM( extern XOC XCreateOC( XOM /* om */, ... -); +) _X_SENTINEL(0); extern void XDestroyOC( XOC /* oc */ @@ -3603,12 +3603,12 @@ extern XOM XOMOfOC( extern char *XSetOCValues( XOC /* oc */, ... -); +) _X_SENTINEL(0); extern char *XGetOCValues( XOC /* oc */, ... -); +) _X_SENTINEL(0); extern XFontSet XCreateFontSet( Display* /* display */, @@ -3840,11 +3840,11 @@ extern Status XCloseIM( extern char *XGetIMValues( XIM /* im */, ... -); +) _X_SENTINEL(0); extern char *XSetIMValues( XIM /* im */, ... -); +) _X_SENTINEL(0); extern Display *XDisplayOfIM( XIM /* im */ @@ -3856,7 +3856,7 @@ extern char *XLocaleOfIM( extern XIC XCreateIC( XIM /* im */, ... -); +) _X_SENTINEL(0); extern void XDestroyIC( XIC /* ic */ @@ -3884,11 +3884,11 @@ extern char *Xutf8ResetIC( extern char *XSetICValues( XIC /* ic */, ... -); +) _X_SENTINEL(0); extern char *XGetICValues( XIC /* ic */, ... -); +) _X_SENTINEL(0); extern XIM XIMOfIC( XIC /* ic */ @@ -3928,7 +3928,7 @@ extern int Xutf8LookupString( extern XVaNestedList XVaCreateNestedList( int /*unused*/, ... -); +) _X_SENTINEL(0); /* internal connections for IMs */ |