diff options
| -rw-r--r-- | include/compat/stdlib.h | 8 | ||||
| -rw-r--r-- | include/compat/sys/stat.h | 7 | ||||
| -rw-r--r-- | include/compat/sys/types.h | 6 | ||||
| -rw-r--r-- | include/compat/time.h | 5 |
4 files changed, 10 insertions, 16 deletions
diff --git a/include/compat/stdlib.h b/include/compat/stdlib.h index 47189fd..e31f075 100644 --- a/include/compat/stdlib.h +++ b/include/compat/stdlib.h | |||
| @@ -3,18 +3,16 @@ | |||
| 3 | * Public domain | 3 | * Public domain |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef LIBCRYPTOCOMPAT_STDLIB_H | ||
| 7 | #define LIBCRYPTOCOMPAT_STDLIB_H | ||
| 8 | |||
| 9 | #ifdef _MSC_VER | 6 | #ifdef _MSC_VER |
| 10 | #include <../include/stdlib.h> | 7 | #include <../include/stdlib.h> |
| 11 | #else | 8 | #else |
| 12 | #include_next <stdlib.h> | 9 | #include_next <stdlib.h> |
| 13 | #endif | 10 | #endif |
| 14 | 11 | ||
| 12 | #ifndef LIBCRYPTOCOMPAT_STDLIB_H | ||
| 13 | #define LIBCRYPTOCOMPAT_STDLIB_H | ||
| 14 | |||
| 15 | #include <sys/types.h> | 15 | #include <sys/types.h> |
| 16 | #include <sys/stat.h> | ||
| 17 | //#include <sys/time.h> | ||
| 18 | #include <stdint.h> | 16 | #include <stdint.h> |
| 19 | 17 | ||
| 20 | #ifndef HAVE_ARC4RANDOM_BUF | 18 | #ifndef HAVE_ARC4RANDOM_BUF |
diff --git a/include/compat/sys/stat.h b/include/compat/sys/stat.h index 55135d8..9d48251 100644 --- a/include/compat/sys/stat.h +++ b/include/compat/sys/stat.h | |||
| @@ -6,7 +6,10 @@ | |||
| 6 | #ifndef LIBCRYPTOCOMPAT_SYS_STAT_H | 6 | #ifndef LIBCRYPTOCOMPAT_SYS_STAT_H |
| 7 | #define LIBCRYPTOCOMPAT_SYS_STAT_H | 7 | #define LIBCRYPTOCOMPAT_SYS_STAT_H |
| 8 | 8 | ||
| 9 | #ifdef _MSC_VER | 9 | #ifndef _MSC_VER |
| 10 | #include_next <sys/stat.h> | ||
| 11 | #else | ||
| 12 | |||
| 10 | #include <windows.h> | 13 | #include <windows.h> |
| 11 | #include <../include/sys/stat.h> | 14 | #include <../include/sys/stat.h> |
| 12 | 15 | ||
| @@ -88,8 +91,6 @@ | |||
| 88 | #define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) | 91 | #define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) |
| 89 | #define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK) | 92 | #define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK) |
| 90 | 93 | ||
| 91 | #else | ||
| 92 | #include_next <sys/stat.h> | ||
| 93 | #endif | 94 | #endif |
| 94 | 95 | ||
| 95 | #endif | 96 | #endif |
diff --git a/include/compat/sys/types.h b/include/compat/sys/types.h index 9929dd5..38dc582 100644 --- a/include/compat/sys/types.h +++ b/include/compat/sys/types.h | |||
| @@ -3,15 +3,15 @@ | |||
| 3 | * sys/types.h compatibility shim | 3 | * sys/types.h compatibility shim |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef LIBCRYPTOCOMPAT_SYS_TYPES_H | ||
| 7 | #define LIBCRYPTOCOMPAT_SYS_TYPES_H | ||
| 8 | |||
| 9 | #ifdef _MSC_VER | 6 | #ifdef _MSC_VER |
| 10 | #include <../include/sys/types.h> | 7 | #include <../include/sys/types.h> |
| 11 | #else | 8 | #else |
| 12 | #include_next <sys/types.h> | 9 | #include_next <sys/types.h> |
| 13 | #endif | 10 | #endif |
| 14 | 11 | ||
| 12 | #ifndef LIBCRYPTOCOMPAT_SYS_TYPES_H | ||
| 13 | #define LIBCRYPTOCOMPAT_SYS_TYPES_H | ||
| 14 | |||
| 15 | #include <stdint.h> | 15 | #include <stdint.h> |
| 16 | 16 | ||
| 17 | #ifdef __MINGW32__ | 17 | #ifdef __MINGW32__ |
diff --git a/include/compat/time.h b/include/compat/time.h index d363d42..2712951 100644 --- a/include/compat/time.h +++ b/include/compat/time.h | |||
| @@ -3,14 +3,9 @@ | |||
| 3 | * sys/time.h compatibility shim | 3 | * sys/time.h compatibility shim |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef LIBCRYPTOCOMPAT_TIME_H | ||
| 7 | #define LIBCRYPTOCOMPAT_TIME_H | ||
| 8 | |||
| 9 | #ifdef _MSC_VER | 6 | #ifdef _MSC_VER |
| 10 | #include <../include/time.h> | 7 | #include <../include/time.h> |
| 11 | #define gmtime_r(tp, tm) ((gmtime_s((tm), (tp)) == 0) ? (tm) : NULL) | 8 | #define gmtime_r(tp, tm) ((gmtime_s((tm), (tp)) == 0) ? (tm) : NULL) |
| 12 | #else | 9 | #else |
| 13 | #include_next <time.h> | 10 | #include_next <time.h> |
| 14 | #endif | 11 | #endif |
| 15 | |||
| 16 | #endif | ||
