glib2/glib-mscver.patch

13 lines
570 B
Diff

diff -up glib-2.31.10/glib/gmacros.h.mscver glib-2.31.10/glib/gmacros.h
--- glib-2.31.10/glib/gmacros.h.mscver 2012-01-17 22:31:58.016213434 -0500
+++ glib-2.31.10/glib/gmacros.h 2012-01-17 22:32:36.884214017 -0500
@@ -343,7 +343,7 @@
#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);
#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);
-#elif _MSC_VER >= 1500
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
/* Visual studio 2008 and later has _Pragma */
#define G_HAS_CONSTRUCTORS 1