From 4c417c4965b0a3020f35b42e1fac43a4250fdcf1 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Wed, 23 Aug 2017 17:01:13 +0800 Subject: [PATCH] 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 --- glib/glibconfig.h.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in index e9fc6c6d2..43e1ba122 100644 --- a/glib/glibconfig.h.in +++ b/glib/glibconfig.h.in @@ -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")))