macros: add dummy __has_builtin()

Add a dummy definition for Clang's __has_builtin() macro.  This will
allow us to use __has_builtin() unconditionally, in the same way as we
already do for __has_feature().

https://bugzilla.gnome.org/show_bug.cgi?id=503096
This commit is contained in:
Allison Ryan Lortie 2015-10-28 11:14:11 +00:00
parent 41bd8c90ae
commit 89bda59170

View File

@ -68,6 +68,10 @@
#define __has_feature(x) 0
#endif
#ifndef __has_builtin
#define __has_builtin(x) 0
#endif
#if (!defined(__clang__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \
(defined(__clang__) && __has_feature(__alloc_size__))
#define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))