1 /****************************************************************************/
2 #if( defined _MSC_VER )
5 an unfortunately necessary hack for MSVC
6 MSVC only defines __STDC__ if /Za is given, where /Za turns off MSVC C extensions -
7 which prevents Windows header files from compiling.
11 #define __STDC_HOSTED__ 1
14 #if( defined __linux__ )
23 /****************************************************************************/
24 #if( defined _MSC_VER && _MSC_VER >= 1310 && NTDDI_VERSION >= NTDDI_WINXP && defined _WIN32 )
26 #ifdef TEST_PAL_PORTING_ABSTRACTION_LAYER
27 #error More than one porting abstraction layer matches current platform.
30 #define TEST_PAL_PORTING_ABSTRACTION_LAYER
32 #define TEST_PAL_OS_STRING "Windows"
36 typedef HANDLE test_pal_thread_state_t;
37 typedef DWORD test_pal_thread_return_t;
39 #define TEST_PAL_CALLING_CONVENTION WINAPI
47 /****************************************************************************/
48 #if( defined __GNUC__ && defined __linux__ && _POSIX_THREADS > 0 )
50 #ifdef TEST_PAL_PORTING_ABSTRACTION_LAYER
51 #error More than one porting abstraction layer matches current platform.
54 #define TEST_PAL_PORTING_ABSTRACTION_LAYER
56 #define TEST_PAL_OS_STRING "Linux"
62 #include <sys/syscall.h>
63 #include <sys/types.h>
65 typedef pthread_t test_pal_thread_state_t;
66 typedef void * test_pal_thread_return_t;
68 #define TEST_PAL_CALLING_CONVENTION
76 /****************************************************************************/
77 #if( !defined TEST_PAL_PORTING_ABSTRACTION_LAYER )
79 #error No matching porting abstraction layer in test_porting_abstraction_layer_operating_system.h