summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2005-05-17 08:10:10 +0000
committerEgbert Eich <eich@suse.de>2005-05-17 08:10:10 +0000
commit1d14cc37d43bf349ee18e748f62913a0963f6e85 (patch)
tree9c07d6e5d358d2f7746241b8ddd0151270f9cf75
parent0161d08ecd543c80e5625bf63d0091dbccd95f4e (diff)
downloadxorg-lib-libXft-XORG-6_8_99_12.tar.gz
gcc4 allows to check if sentinels are correct (a sentinel is theXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10
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).
-rw-r--r--include/X11/Xft/Xft.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/X11/Xft/Xft.h b/include/X11/Xft/Xft.h
index d6199b1..68b5d06 100644
--- a/include/X11/Xft/Xft.h
+++ b/include/X11/Xft/Xft.h
@@ -44,6 +44,9 @@
#include <X11/Xfuncproto.h>
/* #include <X11/Xosdefs.h>*/
+#ifndef _X_SENTINEL
+# define _X_SENTINEL(x)
+#endif
#ifndef _XFT_NO_COMPAT_
#include <X11/Xft/XftCompat.h>
@@ -346,7 +349,7 @@ XftFontMatch (Display *dpy,
FcResult *result);
XftFont *
-XftFontOpen (Display *dpy, int screen, ...);
+XftFontOpen (Display *dpy, int screen, ...) _X_SENTINEL(0);
XftFont *
XftFontOpenName (Display *dpy, int screen, _Xconst char *name);
@@ -441,7 +444,7 @@ XftGetVersion (void);
FcFontSet *
XftListFonts (Display *dpy,
int screen,
- ...);
+ ...) _X_SENTINEL(0);
/* xftmatch.c */