summaryrefslogtreecommitdiffstats
path: root/Alc/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/compat.h')
-rw-r--r--Alc/compat.h34
1 files changed, 23 insertions, 11 deletions
diff --git a/Alc/compat.h b/Alc/compat.h
index af9f8e84..dbbcce28 100644
--- a/Alc/compat.h
+++ b/Alc/compat.h
@@ -8,21 +8,21 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-typedef DWORD pthread_key_t;
-int pthread_key_create(pthread_key_t *key, void (*callback)(void*));
-int pthread_key_delete(pthread_key_t key);
-void *pthread_getspecific(pthread_key_t key);
-int pthread_setspecific(pthread_key_t key, void *val);
+typedef DWORD althread_key_t;
+int althread_key_create(althread_key_t *key, void (*callback)(void*));
+int althread_key_delete(althread_key_t key);
+void *althread_getspecific(althread_key_t key);
+int althread_setspecific(althread_key_t key, void *val);
-WCHAR *strdupW(const WCHAR *str);
-
-typedef LONG pthread_once_t;
-#define PTHREAD_ONCE_INIT 0
-void pthread_once(pthread_once_t *once, void (*callback)(void));
+typedef LONG althread_once_t;
+#define ALTHREAD_ONCE_INIT 0
+void althread_once(althread_once_t *once, void (*callback)(void));
-static inline int sched_yield(void)
+inline int alsched_yield(void)
{ SwitchToThread(); return 0; }
+WCHAR *strdupW(const WCHAR *str);
+
#define HAVE_DYNLOAD 1
#else
@@ -38,6 +38,18 @@ void LeaveCriticalSection(CRITICAL_SECTION *cs);
ALuint timeGetTime(void);
void Sleep(ALuint t);
+#define althread_key_t pthread_key_t
+#define althread_key_create pthread_key_create
+#define althread_key_delete pthread_key_delete
+#define althread_getspecific pthread_getspecific
+#define althread_setspecific pthread_setspecific
+
+#define althread_once_t pthread_once_t
+#define ALTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define althread_once pthread_once
+
+#define alsched_yield sched_yield
+
#if defined(HAVE_DLFCN_H)
#define HAVE_DYNLOAD 1
#endif