build: Define G_HAVE_GNUC_[VARARGS|VISIBILITY] conditionally

They are not supported by Visual Studio, so only define them in
glibconfig.h.in when not on Visual Studio.  Fixes builds of GTK+-2.x
against Meson/MSVC builds of GLib.

https://bugzilla.gnome.org/show_bug.cgi?id=783270
This commit is contained in:
Chun-wei Fan 2017-08-23 17:01:13 +08:00
parent 5e55a4e243
commit 4c417c4965

View File

@ -130,11 +130,12 @@ typedef unsigned @glib_intptr_type_define@ guintptr;
# undef G_HAVE_ISO_VARARGS
#endif
#define G_HAVE_GNUC_VARARGS 1
#mesondefine G_HAVE_GROWING_STACK
#define G_HAVE_GNUC_VISIBILITY 1
#ifndef _MSC_VER
# define G_HAVE_GNUC_VARARGS 1
# define G_HAVE_GNUC_VISIBILITY 1
#endif
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))