mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-07 02:59:39 +02:00
gmacros: Use __typeof__ when compiling with Clang
Just like gcc, clang has supported `__typeof__` for a long time, so allow it to be used. This fixes compilation of `gio/gcredentials.c` on macOS (which uses clang by default). I don’t know which version clang started supporting `__typeof__` in, so there’s no version check. One can be added in future if there are problems. This fixes commit 5b2bee3f539. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
b67185cd92
commit
dce24dc449
@ -232,7 +232,9 @@
|
||||
* This symbol is private.
|
||||
*/
|
||||
#undef glib_typeof
|
||||
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) && !defined(__cplusplus)
|
||||
#if !defined(__cplusplus) && \
|
||||
((defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) || \
|
||||
defined(__clang__))
|
||||
#define glib_typeof(t) __typeof__ (t)
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user