From 27c4df1b72eca00ec9519e9fbdc2110dfa07a07b Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Mon, 5 Oct 2015 22:41:14 +0000
Subject: Fix compilation on Windows

git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5746 a436a847-0d15-0410-975c-d299462d15a1
---
 src/lilv_internal.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/lilv_internal.h b/src/lilv_internal.h
index e2444d3..15b00dc 100644
--- a/src/lilv_internal.h
+++ b/src/lilv_internal.h
@@ -28,16 +28,21 @@ extern "C" {
 
 #ifdef _WIN32
 #    include <windows.h>
+#    include <direct.h>
 #    define dlopen(path, flags) LoadLibrary(path)
 #    define dlclose(lib)        FreeLibrary((HMODULE)lib)
 #    define unlink(path)        _unlink(path)
 #    define rmdir(path)         _rmdir(path)
 #    ifdef _MSC_VER
 #        define __func__ __FUNCTION__
-#        define INFINITY DBL_MAX + DBL_MAX
-#        define NAN      INFINITY - INFINITY
 #        define snprintf _snprintf
 #    endif
+#ifndef INFINITY
+#    define INFINITY DBL_MAX + DBL_MAX
+#endif
+#ifndef NAN
+#    define NAN INFINITY - INFINITY
+#endif
 static inline char* dlerror(void) { return "Unknown error"; }
 #else
 #    include <dlfcn.h>
-- 
cgit v1.2.1