… | |
… | |
15 | |
15 | |
16 | ///////////////////////////////////////////////////////////////////////////// |
16 | ///////////////////////////////////////////////////////////////////////////// |
17 | |
17 | |
18 | #ifdef _WIN32 |
18 | #ifdef _WIN32 |
19 | |
19 | |
20 | #define NTDDI_VERSION NTDDI_WIN2K // needed to get win2000 api calls |
20 | //#define NTDDI_VERSION NTDDI_WIN2K // needed to get win2000 api calls, fails with mingw |
21 | #define _WIN32_WINNT 0x400 |
21 | #define _WIN32_WINNT 0x400 // maybe working alternative for mingw |
22 | #include <stdio.h>//D |
22 | #include <stdio.h>//D |
23 | #include <fcntl.h> |
23 | #include <fcntl.h> |
24 | #include <io.h> |
24 | #include <io.h> |
25 | #include <time.h> |
25 | #include <time.h> |
26 | #include <winsock2.h> |
26 | #include <winsock2.h> |
27 | #include <process.h> |
27 | #include <process.h> |
28 | #include <windows.h> |
28 | #include <windows.h> |
|
|
29 | |
|
|
30 | /* work around some bugs in ptw32 */ |
|
|
31 | #if defined(__MINGW32__) && defined(_TIMESPEC_DEFINED) |
|
|
32 | #define HAVE_STRUCT_TIMESPEC 1 |
|
|
33 | #endif |
|
|
34 | |
29 | #include <pthread.h> |
35 | #include <pthread.h> |
30 | #define sigset_t int |
36 | #define sigset_t int |
31 | #define sigfillset(a) |
37 | #define sigfillset(a) |
32 | #define pthread_sigmask(a,b,c) |
38 | #define pthread_sigmask(a,b,c) |
33 | #define sigaddset(a,b) |
39 | #define sigaddset(a,b) |