Change time_t to 64-bit by default
In order to avoid the year 2038 problem, define time_t to a signed integer with at least 64-bits. The type for time_t can be forced to long with the --enable-newlib-long-time_t configure option or with the _USE_LONG_TIME_T system configuration define. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
@ -186,7 +186,11 @@ typedef void *_iconv_t;
|
||||
|
||||
typedef _CLOCK_T_ __clock_t;
|
||||
|
||||
#define _TIME_T_ long /* time() */
|
||||
#if defined(_USE_LONG_TIME_T) || __LONG_MAX__ > 0x7fffffffL
|
||||
#define _TIME_T_ long
|
||||
#else
|
||||
#define _TIME_T_ __int_least64_t
|
||||
#endif
|
||||
typedef _TIME_T_ __time_t;
|
||||
|
||||
#define _CLOCKID_T_ unsigned long
|
||||
|
@ -283,6 +283,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WANT_USE_LONG_TIME_T
|
||||
#ifndef _USE_LONG_TIME_T
|
||||
#define _USE_LONG_TIME_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* If _MB_EXTENDED_CHARSETS_ALL is set, we want all of the extended
|
||||
charsets. The extended charsets add a few functions and a couple
|
||||
of tables of a few K each. */
|
||||
|
Reference in New Issue
Block a user