Declare LoadLib functions in one place

This commit is contained in:
Chris Robinson 2013-10-28 17:48:48 -07:00
parent 321644de7c
commit 823782a33f

View File

@ -14,11 +14,6 @@ int pthread_key_delete(pthread_key_t key);
void *pthread_getspecific(pthread_key_t key);
int pthread_setspecific(pthread_key_t key, void *val);
#define HAVE_DYNLOAD 1
void *LoadLib(const char *name);
void CloseLib(void *handle);
void *GetSymbol(void *handle, const char *name);
WCHAR *strdupW(const WCHAR *str);
typedef LONG pthread_once_t;
@ -28,6 +23,8 @@ void pthread_once(pthread_once_t *once, void (*callback)(void));
static inline int sched_yield(void)
{ SwitchToThread(); return 0; }
#define HAVE_DYNLOAD 1
#else
#include <pthread.h>
@ -43,11 +40,14 @@ void Sleep(ALuint t);
#if defined(HAVE_DLFCN_H)
#define HAVE_DYNLOAD 1
#endif
#endif
#ifdef HAVE_DYNLOAD
void *LoadLib(const char *name);
void CloseLib(void *handle);
void *GetSymbol(void *handle, const char *name);
#endif
#endif
#endif /* AL_COMPAT_H */