valgrind.h: Disable Valgrind features on x64 Visual C++ Builds
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 30 Jun 2014 09:31:57 +0000 (17:31 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 30 Jun 2014 11:56:05 +0000 (19:56 +0800)
...so that builds of GLib on x64 Visual C++ can be restored, as the build
fails in line 449 of valgrind.h as it only supports MinGW/GCC for x64
Windows and simply will not build otherwise.  Make the x64 Visual C++
builds compile again by defining NVALGRIND when GLib is being built for
Windows on x64 Visual C++.

https://bugzilla.gnome.org/show_bug.cgi?id=732465

glib/valgrind.h

index a4380d1..bebfd69 100644 (file)
 #  endif
 #endif
 
+/* XXX: Unfortunately x64 Visual C++ does not suport inline asms,
+ * so disable the use of valgrind's inline asm's for x64 Visual C++
+ * builds, so that x64 Visual C++ builds of GLib can be maintained
+ */
+#if defined (PLAT_amd64_win64) && defined (_MSC_VER)
+#  if !defined(NVALGRIND)
+#    define NVALGRIND 1
+#  endif
+#endif
+
 
 /* ------------------------------------------------------------------ */
 /* ARCHITECTURE SPECIFICS for SPECIAL INSTRUCTIONS.  There is nothing */