37 |
|
|
38 |
#if defined(WIN32) |
#if defined(WIN32) |
39 |
#include <windows.h> |
#include <windows.h> |
40 |
|
|
41 |
|
// modern MinGW has usleep |
42 |
|
#if (__MINGW32_MAJOR_VERSION < 3 || \ |
43 |
|
(__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 15)) && \ |
44 |
|
!defined(__MINGW64) |
45 |
#define usleep(a) Sleep(a/1000) |
#define usleep(a) Sleep(a/1000) |
46 |
|
#endif |
47 |
|
|
48 |
#define sleep(a) Sleep(a*1000) |
#define sleep(a) Sleep(a*1000) |
49 |
typedef unsigned int uint; |
typedef unsigned int uint; |
50 |
// FIXME: define proper functions which do proper alignement under Win32 |
// FIXME: define proper functions which do proper alignement under Win32 |
53 |
#else |
#else |
54 |
// needed for usleep under POSIX |
// needed for usleep under POSIX |
55 |
#include <stdio.h> |
#include <stdio.h> |
56 |
|
// for uint |
57 |
|
#include <sys/types.h> |
58 |
#endif |
#endif |
59 |
|
|
60 |
|
|