mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
Require C99's __VA_ARGS__
We have fallback in places for GNU's variadic arguments in macros, and for static inline functions with variadic arguments as an fallback of last resort, but going forward we are going to depend on `__VA_ARGS__` for macros that cannot be re-implemented using a static inline function. Fixes: #2681
This commit is contained in:
14
meson.build
14
meson.build
@@ -1715,11 +1715,8 @@ g_have_iso_c_varargs = cc.compiles('''
|
||||
call_a(2,3);
|
||||
}''', name : 'ISO C99 varargs macros in C')
|
||||
|
||||
if g_have_iso_c_varargs
|
||||
glibconfig_conf.set('g_have_iso_c_varargs', '''
|
||||
#ifndef __cplusplus
|
||||
# define G_HAVE_ISO_VARARGS 1
|
||||
#endif''')
|
||||
if not g_have_iso_c_varargs
|
||||
error('GLib requires a C compiler with support for C99 __VA_ARG__ in macros.')
|
||||
endif
|
||||
|
||||
g_have_iso_cxx_varargs = cxx.compiles('''
|
||||
@@ -1729,11 +1726,8 @@ g_have_iso_cxx_varargs = cxx.compiles('''
|
||||
call_a(2,3);
|
||||
}''', name : 'ISO C99 varargs macros in C++')
|
||||
|
||||
if g_have_iso_cxx_varargs
|
||||
glibconfig_conf.set('g_have_iso_cxx_varargs', '''
|
||||
#ifdef __cplusplus
|
||||
# define G_HAVE_ISO_VARARGS 1
|
||||
#endif''')
|
||||
if not g_have_iso_cxx_varargs
|
||||
error('GLib requires a C++ compiler with support for C99 __VA_ARG__ in macros.')
|
||||
endif
|
||||
|
||||
g_have_gnuc_varargs = cc.compiles('''
|
||||
|
Reference in New Issue
Block a user