]> granicus.if.org Git - libx264/commitdiff
win32 threads enabled by default
authorLoren Merritt <pengvado@videolan.org>
Sat, 11 Jun 2005 19:27:02 +0000 (19:27 +0000)
committerLoren Merritt <pengvado@videolan.org>
Sat, 11 Jun 2005 19:27:02 +0000 (19:27 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@258 df754926-b1dd-0310-bc7b-ec298dee348c

encoder/encoder.c

index 8a8f694e5e5c3d452962516510f70003727ad79d..a69ea666cb6b93fc1402910b675640d2a74f8178 100644 (file)
 #include <string.h>
 #include <math.h>
 
-#if HAVE_PTHREAD
-#ifdef SYS_BEOS
-#include <kernel/OS.h>
-#define pthread_t               thread_id
-#define pthread_create(t,u,f,d) *(t)=spawn_thread(f,"",10,d)
-#define pthread_join(t,s)       wait_for_thread(t,(long*)s)
-#elif defined(__WIN32__)
+#ifdef __WIN32__
 #include <windows.h>
 #define pthread_t               HANDLE
 #define pthread_create(t,u,f,d) *(t)=CreateThread(NULL,0,f,d,0,NULL)
 #define pthread_join(t,s)       WaitForSingleObject(t,INFINITE); \
                                 CloseHandle(t)
+#define HAVE_PTHREAD 1
+#elif HAVE_PTHREAD
+#ifdef SYS_BEOS
+#include <kernel/OS.h>
+#define pthread_t               thread_id
+#define pthread_create(t,u,f,d) *(t)=spawn_thread(f,"",10,d)
+#define pthread_join(t,s)       wait_for_thread(t,(long*)s)
 #else
 #include <pthread.h>
 #endif