diff options
| author | Werner Koch <[email protected]> | 2023-10-26 07:59:40 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2023-10-26 10:39:43 +0000 |
| commit | 164c687cb6a1cafe6c1c47456a1837046a3f00f1 (patch) | |
| tree | d7725ee9b929afccbce2c16412469668bffd08eb /common/mischelp.h | |
| parent | sm: Flag Brainpool curves as compliant for all other operations. (diff) | |
| download | gnupg-164c687cb6a1cafe6c1c47456a1837046a3f00f1.tar.gz gnupg-164c687cb6a1cafe6c1c47456a1837046a3f00f1.zip | |
common: New functions timegm_u64, isotime2epoch_u64.
* common/mischelp.c (timegm): Move to ...
* common/gettime.c (timegm): here. On Windows use timegm_u32.
(timegm_u32): New.
(isotime2epoch): Factor code out to ...
(isotime_make_tm): new helper.
(isotime2epoch_u64): New.
(_win32_timegm): Remove duplicated code.
(parse_timestamp): Use of timegm.
(scan_isodatestr): Fallback to isotime2epoch_u64.
--
This mainly helps on 32 bit Windows. For Unix we assume everyone is
using 64 bit or shall wait until the libc hackers finally provide a
time64_t.
GnuPG-bug-id: 6736
Diffstat (limited to 'common/mischelp.h')
| -rw-r--r-- | common/mischelp.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/common/mischelp.h b/common/mischelp.h index bdee5a443..7359ec29e 100644 --- a/common/mischelp.h +++ b/common/mischelp.h @@ -38,12 +38,6 @@ int same_file_p (const char *name1, const char *name2); -#ifndef HAVE_TIMEGM -#include <time.h> -time_t timegm (struct tm *tm); -#endif /*!HAVE_TIMEGM*/ - - #define DIM(v) (sizeof(v)/sizeof((v)[0])) #define DIMof(type,member) DIM(((type *)0)->member) |
