mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 17:56:17 +01:00
Merge branch 'ebassi/c99-macro-varargs' into 'main'
Require C99's __VA_ARGS__ Closes #2681 See merge request GNOME/glib!2791
This commit is contained in:
commit
5cf742d42e
@ -40,12 +40,12 @@ features’ are assumed. Those are detailed below.
|
||||
|
||||
GLib additionally requires Python 3 to build.
|
||||
|
||||
Varargs macros
|
||||
C99 Varargs macros
|
||||
---
|
||||
|
||||
_Not a hard requirement._
|
||||
_Hard requirement._
|
||||
|
||||
GLib can work with either C99 or GNU style varargs macros.
|
||||
GLib requires C99 ``__VA_ARG__`` support for both C and C++ compilers.
|
||||
|
||||
Symbol visibility control
|
||||
---
|
||||
|
@ -118,8 +118,7 @@ typedef unsigned @glib_intptr_type_define@ guintptr;
|
||||
|
||||
@glib_vacopy@
|
||||
|
||||
@g_have_iso_c_varargs@
|
||||
@g_have_iso_cxx_varargs@
|
||||
#define G_HAVE_ISO_VARARGS 1
|
||||
|
||||
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
|
||||
* is passed ISO vararg support is turned off, and there is no work
|
||||
|
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('''
|
||||
|
Loading…
Reference in New Issue
Block a user