diff options
author | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-06-13 18:36:02 +0200 |
---|---|---|
committer | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-06-20 08:24:43 +0200 |
commit | 8caea0647f2ccf4e4028283247e6f1fb37784dc6 (patch) | |
tree | 0cccc33365f53ca8515df72a6c6b8a942054d1a6 /include | |
parent | f2857da7cdb65bfad75ee30981f5b2fde5bbb1dc (diff) | |
download | glibc-8caea0647f2ccf4e4028283247e6f1fb37784dc6.tar.gz |
Y2038: Add 64-bit time for all architectures
* Add macro __TIMESIZE equal to the bit size of time_t.
It equals the architecture __WORDSIZE except for x32
where it equals 64.
* Add type __time64_t which is always 64-bit. On 64-bit
architectures and on x32, it is #defined as time_t.
On other architectures, it has its own type.
* Replace all occurrences of internal_time_t with
__time64_t.
The __time64_t type is public so that the public time_t type
can be a typedef or #define of __time64_t when we switch the
public API to 64-bit time.
Diffstat (limited to 'include')
-rw-r--r-- | include/time.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/time.h b/include/time.h index 23d2580528..828e886395 100644 --- a/include/time.h +++ b/include/time.h @@ -3,6 +3,7 @@ #ifndef _ISOMAC # include <bits/types/locale_t.h> +# include <errno.h> extern __typeof (strftime_l) __strftime_l; libc_hidden_proto (__strftime_l) @@ -26,10 +27,6 @@ extern __typeof (clock_getcpuclockid) __clock_getcpuclockid; /* Now define the internal interfaces. */ struct tm; -/* time_t variant for representing time zone data, independent of - time_t. */ -typedef __int64_t internal_time_t; - /* Defined in mktime.c. */ extern const unsigned short int __mon_yday[2][13] attribute_hidden; @@ -43,7 +40,7 @@ extern int __use_tzfile attribute_hidden; extern void __tzfile_read (const char *file, size_t extra, char **extrap) attribute_hidden; -extern void __tzfile_compute (internal_time_t timer, int use_localtime, +extern void __tzfile_compute (__time64_t timer, int use_localtime, long int *leap_correct, int *leap_hit, struct tm *tp) attribute_hidden; extern void __tzfile_default (const char *std, const char *dst, @@ -101,7 +98,6 @@ extern char * __strptime_internal (const char *rp, const char *fmt, extern double __difftime (time_t time1, time_t time0); - /* Use in the clock_* functions. Size of the field representing the actual clock ID. */ #define CLOCK_IDFIELD_SIZE 3 |