--- a/src/openslide-vendor-hamamatsu.c
+++ b/src/openslide-vendor-hamamatsu.c
@@ -54,6 +54,10 @@
 #include <cairo.h>
 
 #include "openslide-hash.h"
+
+#ifdef OUT
+#undef OUT
+#endif
 
 #define NGR_TILE_HEIGHT 64
 
--- a/src/openslide-vendor-sakura.c
+++ b/src/openslide-vendor-sakura.c
@@ -40,6 +40,10 @@
 #include <gio/gio.h>
 #include <string.h>
 #include <errno.h>
+
+#ifdef OUT
+#undef OUT
+#endif
 
 static const char MAGIC_BYTES[] = "SVGigaPixelImage";
 
--- a/src/openslide.c
+++ b/src/openslide.c
@@ -33,6 +33,10 @@
 
 #include "openslide-cairo.h"
 #include "openslide-error.h"
+
+#ifdef OUT
+#undef OUT
+#endif
 
 const char _openslide_release_info[] = "OpenSlide " SUFFIXED_VERSION ", copyright (C) 2007-2015 Carnegie Mellon University and others.\nLicensed under the GNU Lesser General Public License, version 2.1.";
 
--- a/src/openslide-vendor-mirax.c
+++ b/src/openslide-vendor-mirax.c
@@ -44,6 +44,10 @@
 #include <zlib.h>
 
 #include "openslide-hash.h"
+
+#ifdef OUT
+#undef OUT
+#endif
 
 static const char MRXS_EXT[] = ".mrxs";
 static const char SLIDEDAT_INI[] = "Slidedat.ini";
