diff options
author | Ron Yorston <rmy@pobox.com> | 2024-08-14 12:52:56 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-08-14 13:10:19 +0100 |
commit | 6481bb22b5e6d60909d09cf6179412c4f34b9b3c (patch) | |
tree | 63265600738004f99ad1afcae54d209405bc604d /include/libbb.h | |
parent | 6e82b6c6a0b55fdc156f7065d177e530e417520c (diff) | |
download | busybox-w32-6481bb22b5e6d60909d09cf6179412c4f34b9b3c.tar.gz busybox-w32-6481bb22b5e6d60909d09cf6179412c4f34b9b3c.tar.bz2 busybox-w32-6481bb22b5e6d60909d09cf6179412c4f34b9b3c.zip |
win32: use 64-bit time on 32-bit platforms
To avoid problems with dates in 2038 and beyond use 64-bit time
values on 32-bit platforms.
- Mostly this just requires a few preprocessor macros to choose
the appropriate functions, structs and typedefs.
- We have our own implementations of nanosleep(), clock_gettime()
and clock_settime(). Omit the Windows include file that declares
them.
- Apply the hack for struct timeval in the 'ts' applet on 32-bit.
Adds 1624 bytes on 32-bit, none on 64-bit.
(GitHub issue #446)
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index e5000831f..17fb6fae6 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -10,6 +10,12 @@ | |||
10 | #ifndef LIBBB_H | 10 | #ifndef LIBBB_H |
11 | #define LIBBB_H 1 | 11 | #define LIBBB_H 1 |
12 | 12 | ||
13 | #if ENABLE_PLATFORM_MINGW32 | ||
14 | /* We have our own nanosleep(), clock_gettime() and clock_settime(). */ | ||
15 | /* Skip the Windows include file that declares them. */ | ||
16 | # define WIN_PTHREADS_TIME_H | ||
17 | #endif | ||
18 | |||
13 | #include "platform.h" | 19 | #include "platform.h" |
14 | 20 | ||
15 | #include <ctype.h> | 21 | #include <ctype.h> |