diff options
author | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2017-09-06 10:00:42 +0200 |
---|---|---|
committer | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-04-12 20:51:09 +0200 |
commit | 770d46d8c50d005670a4e2be21cf0fe54340e846 (patch) | |
tree | e799bbe5265c10ee2dffec2aedcd2ee37cb49713 /time/bits/types/struct_timeval.h | |
parent | cd93d2ea709d1e41108159312a2bd9233f1426f8 (diff) | |
download | glibc-770d46d8c50d005670a4e2be21cf0fe54340e846.tar.gz |
Y2038: add _TIME_BITS supportaaribaud/y2038-2.26-rfc-2-candidate
This makes all previously defined Y2038-proof API types, functions and
implementations the default when _TIME_BITS==64 and __WORDSIZE==32 (so
that 64-bit architectures are unaffected).
Note: it is assumed that the API is consistent, i.e. for each API type
which is enabled here, all API functions which depend on this type are
enabled and mapped to Y2038-proof implementations.
Diffstat (limited to 'time/bits/types/struct_timeval.h')
-rw-r--r-- | time/bits/types/struct_timeval.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/time/bits/types/struct_timeval.h b/time/bits/types/struct_timeval.h index 70394ce886..85e0cb5996 100644 --- a/time/bits/types/struct_timeval.h +++ b/time/bits/types/struct_timeval.h @@ -5,9 +5,18 @@ /* A time value that is accurate to the nearest microsecond but also has a range of years. */ +#ifdef __USE_TIME_BITS64 +struct timeval +{ + __time64_t tv_sec; /* Seconds. */ + __uint64_t tv_usec; /* Microseconds. */ +}; +#else struct timeval { __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ }; #endif + +#endif |