summaryrefslogtreecommitdiff
path: root/Xfuncproto.h.in
AgeCommit message (Collapse)Author
2016-09-23Fix typo __has_extenstion -> __has_extensionKeith Packard
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-22Xfuncproto: Add support for _X_NOTSAN macroJeremy Huddleston Sequoia
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-09-22Xfuncproto: Add support for _X_DEPRECATED_MSG() macroJeremy Huddleston Sequoia
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-09-22Xfuncproto.h: Define __has_extension() if it isn't alreadyJeremy Huddleston Sequoia
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-09-22Xfuncproto.h: Define __has_feature() if it isn't alreadyJeremy Huddleston Sequoia
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-01-13Use C99 compliant definition of nonnull attribute.Thomas Klausner
Fixes warning with clang. Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-08-07Use clang's __has_attribute to check for attribute supportAlan Coopersmith
Hopefully other compilers will start adopting this so we don't have to maintain ever growing matrixes of compiler/version checks for all the attributes we use. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-09Enable use of __attribute__((deprecated)) with Solaris Studio 12.4 compilerAlan Coopersmith
Support for this attribute is added in the 12.4 beta release. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-09Add _X_COLD attribute for branch prediction hintsAlan Coopersmith
Unfortunately the Solaris Studio equivalent is a pragma taking the function names as arguments, so doesn't translate cleanly into a common macro form. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-10-16Do not use visibility attributes on MinGWYaakov Selkowitz
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net>
2012-09-06Bug 51009: _X_RESTRICT_KYWD fix for g++ 4.6 & later on SolarisAlan Coopersmith
g++ 4.6 & later on Solaris set the __STDC_VERSION__ define to indicate C99 mode to expose C99/Unix03 functions in the system headers, even though they don't recognize the C99 restrict keyword, as explained in http://gcc.gnu.org/ml/gcc-patches/2010-05/msg01308.html Thus we avoid using the restrict keyword here if __cplusplus is also defined, falling back to the __GNUC__ case using __restrict__ instead. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=51009 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Tested-by: Jonathan Perkin
2011-08-30Fix Xfuncproto.h to work when #included in a C89-mode compilationAlan Coopersmith
Variable argument macros are not supported in C89, only C99 or a compiler-specific extension like gcc's. Even just defining the macro causes builds with C89 compilers to fail, as they can't figure out how to handle #define _X_NONNULL(...), so only define the fallback for C99 compilers. Since this means C89 compilers will see _X_NONNULL unexpanded in sources, add a comment to remind users that this should only be used with #ifdef _X_NONNULL guards in public/exported API headers we install for other software to compile against, so that we don't break their builds. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-05-25Add comments to Xfuncproto.h noting required xproto versions for each macroAlan Coopersmith
Saves time trawling git logs to determine what to put in the call to PKG_CHECK_MODULES in configure.ac when you start using one of these. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Cyril Brulebois <kibi@debian.org>
2011-04-28Add _X_NONNULL macro to annotate when a function expects arguments to be ↵Jeremy Huddleston
non-null This will allow with compiler optimization and better static analysis. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-04-28Add _X_UNUSED attribute to designate unused variables and silence warningsJeremy Huddleston
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-04-21Fix __STDC_VERSION__ tests.Matthieu Herrb
the existing test: defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L) causes an warning when building X stuff with gcc -Wundef. Other tests for __STDC_VERSION__ in the X sources all use defined(__STDC_VERSION__) && (__STDC_VERSION__ -0 >= 199901L) Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-24Support _X_INLINE in any C99-compliant compilerAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-12-13Xfuncproto.h: Add _X_RESTRICT_KEYWORD for C99 & gcc in non-strict-C89 modeAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-12-13Enable gcc attribute(__format__) on gcc versions older than 4.0Alan Coopersmith
Enabled on 2.3 and up, since that's where it's available according to http://www.ohse.de/uwe/articles/gcc-attributes.html#func-format Tested with gcc 3.4.3 on Solaris. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-18Add Sun cc 5.9 & later to compilers supporting noreturn attributeAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-03-28Add _X_NORETURN macro to signify functions that don't returnJeremy Huddleston
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-04xproto: Cygwin GCC does not support visibility attributesYaakov Selkowitz
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12Remove all trace of X_NOT_STDC_ENV (#6527)Adam Jackson
Seriously C89 already you guys.
2007-05-01Enable GCC's visibility attributes on GCC 4 or greater only.Tilman Sauerbeck
2006-10-26Xfuncproto: add _X_LIKELY and _X_UNLIKELYDaniel Stone
Add gcc branch hinting annotations.
2006-09-21Xfuncproto: define _X_INLINE for older compilersDaniel Stone
2006-09-20Xfuncproto: add _X_INLINEDaniel Stone
2005-12-03Automatically generate FUNCPROTO and NARROWPROTO defines in Xfuncproto.h.Kevin E Martin