Commit 1d14cc37 authored by Egbert Eich's avatar Egbert Eich

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).
parent 0161d08e
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment