summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-05 22:41:14 +0000
committerDavid Robillard <d@drobilla.net>2015-10-05 22:41:14 +0000
commit27c4df1b72eca00ec9519e9fbdc2110dfa07a07b (patch)
tree738937504d35c70ca28ba9a328e496f058f812c5
parent27dd798dc3570ebe61f5afc4a8a77ef1e83fcac8 (diff)
downloadlilv-27c4df1b72eca00ec9519e9fbdc2110dfa07a07b.tar.gz
lilv-27c4df1b72eca00ec9519e9fbdc2110dfa07a07b.tar.bz2
lilv-27c4df1b72eca00ec9519e9fbdc2110dfa07a07b.zip
Fix compilation on Windows
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5746 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/lilv_internal.h9
1 files changed, 7 insertions, 2 deletions
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>