aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-12 04:36:24 -0700
committerChris Robinson <[email protected]>2011-06-12 04:36:24 -0700
commitccf62fc525d8649adfa3359a5dfde9c64336ffab (patch)
treef7496ea22d404b6bcc288ff68ca3c0f018abb169 /OpenAL32/Include
parent6bfab6427a40de60a7b4c12bce7cf1a687a33e2d (diff)
Add wrappers to handle dyanmically loading libs
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 8df5a4b9..2a504ffa 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -192,6 +192,8 @@ typedef DWORD tls_type;
#define tls_get(x) TlsGetValue((x))
#define tls_set(x, a) TlsSetValue((x), (a))
+#define HAVE_DYNLOAD 1
+
#else
#include <unistd.h>
@@ -261,8 +263,14 @@ static __inline void Sleep(ALuint t)
while(nanosleep(&tv, &rem) == -1 && errno == EINTR)
tv = rem;
}
+
#define min(x,y) (((x)<(y))?(x):(y))
#define max(x,y) (((x)>(y))?(x):(y))
+
+#if defined(HAVE_DLFCN_H)
+#define HAVE_DYNLOAD 1
+#endif
+
#endif
#include "alListener.h"
@@ -577,6 +585,14 @@ void al_print(const char *fname, unsigned int line, const char *fmt, ...)
PRINTF_STYLE(3,4);
#define AL_PRINT(...) al_print(__FILE__, __LINE__, __VA_ARGS__)
+
+#if defined(_WIN32) || defined(HAVE_DLFCN_H)
+#define HAVE_DYNLOAD 1
+void *LoadLib(const char *name);
+void CloseLib(void *handle);
+void *GetSymbol(void *handle, const char *name);
+#endif
+
extern ALdouble ConeScale;
extern ALdouble ZScale;