]> pd.if.org Git - liblfds/blob - liblfds/liblfds7.1.0/test_and_benchmark/libtest/inc/libtest/libtest_porting_abstraction_layer_operating_system.h
Initial import (all versions, including the new 7.1.0)
[liblfds] / liblfds / liblfds7.1.0 / test_and_benchmark / libtest / inc / libtest / libtest_porting_abstraction_layer_operating_system.h
1 /****************************************************************************/
2 #if( defined _WIN32 && NTDDI_VERSION >= NTDDI_WINXP && !defined KERNEL_MODE )
3
4   #ifdef LIBTEST_PAL_OPERATING_SYSTEM
5     #error More than one porting abstraction layer matches current platform in "libtest_porting_abstraction_layer_operating_system.h".
6   #endif
7
8   #define LIBTEST_PAL_OPERATING_SYSTEM
9
10   #include <stdlib.h>
11   #include <time.h>
12   #include <windows.h>
13
14   #define LIBTEST_PAL_OS_STRING  "Windows"
15
16 #endif
17
18
19
20
21
22 /****************************************************************************/
23 #if( defined _WIN32 && NTDDI_VERSION >= NTDDI_WINXP && defined KERNEL_MODE )
24
25   #ifdef LIBTEST_PAL_OPERATING_SYSTEM
26     #error More than one porting abstraction layer matches current platform in "libtest_porting_abstraction_layer_operating_system.h".
27   #endif
28
29   #define LIBTEST_PAL_OPERATING_SYSTEM
30
31   #include <stdlib.h>
32   #include <time.h>
33   #include <wdm.h>
34
35   #define LIBTEST_PAL_OS_STRING  "Windows"
36
37 #endif
38
39
40
41
42
43 /****************************************************************************/
44 #if( defined __linux__ && !defined KERNEL_MODE )
45
46   #ifdef LIBTEST_PAL_OPERATING_SYSTEM
47     #error More than one porting abstraction layer matches current platform in "libtest_porting_abstraction_layer_operating_system.h".
48   #endif
49
50   #define LIBTEST_PAL_OPERATING_SYSTEM
51
52   #define _GNU_SOURCE
53
54   #include <unistd.h>
55   #include <stdio.h>
56   #include <stdlib.h>
57   #include <time.h>
58
59   #define LIBTEST_PAL_OS_STRING  "Linux"
60
61 #endif
62
63
64
65
66
67 /****************************************************************************/
68 #if( defined __linux__ && defined KERNEL_MODE )
69
70   #ifdef LIBTEST_PAL_OPERATING_SYSTEM
71     #error More than one porting abstraction layer matches current platform in "libtest_porting_abstraction_layer_operating_system.h".
72   #endif
73
74   #define LIBTEST_PAL_OPERATING_SYSTEM
75
76   #error libtest not quite yet ready for Linux kernel - it uses time() all over the place
77
78   #define LIBTEST_PAL_OS_STRING  "Linux"
79
80 #endif
81
82
83
84
85
86 /****************************************************************************/
87 #if( !defined LIBTEST_PAL_OPERATING_SYSTEM )
88
89   #error No matching porting abstraction layer in "libtest_porting_abstraction_layer_operating_system.h".
90
91 #endif
92