diff options
author | Brent Cook <bcook@openbsd.org> | 2015-10-14 23:53:52 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-10-15 09:16:38 -0500 |
commit | 4298ac9305d89cadf90ebb01f0e85bb74fea2c1e (patch) | |
tree | e58171fce41da919e0005b167fab19185c4d002d /include | |
parent | 1dd79f5d8f617afdb0f5d51ac0278d7b4f84b82f (diff) | |
download | portable-4298ac9305d89cadf90ebb01f0e85bb74fea2c1e.tar.gz portable-4298ac9305d89cadf90ebb01f0e85bb74fea2c1e.tar.bz2 portable-4298ac9305d89cadf90ebb01f0e85bb74fea2c1e.zip |
include timegm fallback
Diffstat (limited to 'include')
-rw-r--r-- | include/compat/limits.h | 5 | ||||
-rw-r--r-- | include/compat/time.h | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/include/compat/limits.h b/include/compat/limits.h index ca96125..18cabf1 100644 --- a/include/compat/limits.h +++ b/include/compat/limits.h | |||
@@ -3,9 +3,6 @@ | |||
3 | * limits.h compatibility shim | 3 | * limits.h compatibility shim |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef LIBCRYPTOCOMPAT_LIMITS_H | ||
7 | #define LIBCRYPTOCOMPAT_LIMITS_H | ||
8 | |||
9 | #ifdef _MSC_VER | 6 | #ifdef _MSC_VER |
10 | #if _MSC_VER >= 1900 | 7 | #if _MSC_VER >= 1900 |
11 | #include <../ucrt/limits.h> | 8 | #include <../ucrt/limits.h> |
@@ -22,5 +19,3 @@ | |||
22 | #define PATH_MAX MAXPATHLEN | 19 | #define PATH_MAX MAXPATHLEN |
23 | #endif | 20 | #endif |
24 | #endif | 21 | #endif |
25 | |||
26 | #endif | ||
diff --git a/include/compat/time.h b/include/compat/time.h index 3ef3bad..3a87548 100644 --- a/include/compat/time.h +++ b/include/compat/time.h | |||
@@ -14,6 +14,10 @@ | |||
14 | #include_next <time.h> | 14 | #include_next <time.h> |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #ifdef _WIN32 | 17 | #ifndef HAVE_TIMEGM |
18 | #ifdef HAVE__MKGMTIME | ||
18 | #define timegm(tm) _mkgmtime(tm) | 19 | #define timegm(tm) _mkgmtime(tm) |
20 | #else | ||
21 | time_t timegm(struct tm *tm); | ||
22 | #endif | ||
19 | #endif | 23 | #endif |