# include <sys/time.h>
# include <time-clockid.h>
# include <sys/time.h>
+# include <stdint.h>
extern __typeof (strftime_l) __strftime_l;
libc_hidden_proto (__strftime_l)
actual clock ID. */
#define CLOCK_IDFIELD_SIZE 3
-/* Check whether T fits in time_t. */
+/* Check whether T fits in int32_t, assume all usages are for
+ sizeof(time_t) == 32. */
static inline bool
in_time_t_range (__time64_t t)
{
- time_t s = t;
+ int32_t s = t;
return s == t;
}
and suseconds_t. */
struct __timeval32
{
- __int32_t tv_sec; /* Seconds. */
- __int32_t tv_usec; /* Microseconds. */
+ int32_t tv_sec; /* Seconds. */
+ int32_t tv_usec; /* Microseconds. */
};
/* Conversion functions for converting to/from __timeval32 */
/* Linux does not provide 64 bit time_t support for getitimer and
setitimer on architectures with 32 bit time_t support. */
- if (sizeof (__time_t) == 8)
+ if (__KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64)
{
TEST_COMPARE (setitimer (timers[i], &it, NULL), 0);
TEST_COMPARE (setitimer (timers[i], &(struct itimerval) { 0 },
it.it_interval.tv_usec = 20;
it.it_value.tv_sec = 30;
it.it_value.tv_usec = 40;
- if (sizeof (__time_t) == 8)
+ if (__KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64)
{
TEST_COMPARE (setitimer (timers[i], &it, NULL), 0);