summaryrefslogtreecommitdiffstats
path: root/src/suil_internal.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-03 16:43:57 +0000
committerDavid Robillard <d@drobilla.net>2012-08-03 16:43:57 +0000
commit769d980f5ef68b84b8a4fe016eccced4d3b06b49 (patch)
treee697e4aa125a1fbfae858f5ae681721305cb8ae4 /src/suil_internal.h
parent6d856f2c3207fd5acd513d41f72830c29daf07f2 (diff)
downloadsuil-769d980f5ef68b84b8a4fe016eccced4d3b06b49.tar.gz
suil-769d980f5ef68b84b8a4fe016eccced4d3b06b49.tar.bz2
suil-769d980f5ef68b84b8a4fe016eccced4d3b06b49.zip
Fix compilation with MSVC.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@4609 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/suil_internal.h')
-rw-r--r--src/suil_internal.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/suil_internal.h b/src/suil_internal.h
index 385dc26..0e565cb 100644
--- a/src/suil_internal.h
+++ b/src/suil_internal.h
@@ -24,8 +24,10 @@
#ifdef _WIN32
#include <windows.h>
#define dlopen(path, flags) LoadLibrary(path)
-#define dlclose(lib) FreeLibrary(lib)
+#define dlclose(lib) FreeLibrary((HMODULE)lib)
#define dlsym GetProcAddress
+#define inline __inline
+#define snprintf _snprintf
static inline char* dlerror(void) { return "Unknown error"; }
#else
#include <dlfcn.h>
@@ -35,8 +37,7 @@ static inline char* dlerror(void) { return "Unknown error"; }
#include "suil/suil.h"
-#define SUIL_ERRORF(fmt, ...) fprintf(stderr, "error: %s: " fmt, \
- __func__, __VA_ARGS__)
+#define SUIL_ERRORF(fmt, ...) fprintf(stderr, "suil error: " fmt, __VA_ARGS__)
struct SuilHostImpl {
SuilPortWriteFunc write_func;