[glib/glib-2-54] build: Define G_HAVE_GNUC_[VARARGS|VISIBILITY] conditionally



commit 4ba41dbd201c483e5eb37352d080f6b527515f0e
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Aug 23 17:01:13 2017 +0800

    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 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in
index e9fc6c6..43e1ba1 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")))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]