1 #ifndef _PTWQ_WINDOWS_PLATFORM_H
2 #define _PTWQ_WINDOWS_PLATFORM_H 1
4 #define PROVIDE_LEGACY_XP_SUPPORT 1
6 #ifdef PROVIDE_LEGACY_XP_SUPPORT
7 # define _WIN32_WINNT 0x0500
9 # define _WIN32_WINNT 0x0610
11 #define WIN32_LEAN_AND_MEAN
15 #include "winpthreads.h"
17 /* Instead of __attribute__ ((constructor)), use DllMain() */
18 #define CONSTRUCTOR /* */
20 #define VISIBLE __declspec(dllexport)
22 # define __func__ __FUNCTION__
27 #define sleep(sec) Sleep(1000*sec)
28 #define strdup(p) _strdup(p)
29 #define random() rand()
31 #ifdef PROVIDE_LEGACY_XP_SUPPORT
32 # define WORKQUEUE_PLATFORM_SPECIFIC \
33 LIST_ENTRY(_pthread_workqueue) wqlist_entry
35 /* Specific workqueue items */
36 # define WORKQUEUE_PLATFORM_SPECIFIC \
37 PTP_POOL win_thread_pool; \
38 TP_CALLBACK_ENVIRON win_callback_env
42 #endif /* _PTWQ_WINDOWS_PLATFORM_H */