aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sys/timex.h
diff options
context:
space:
mode:
authorAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2017-09-06 10:00:42 +0200
committerAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-10-24 12:53:27 +0200
commit3500dd283b8e5d8a4916423855514cdbfee36eac (patch)
tree1a4a7a09096f94d446db94617b86b5b10ebe4ea7 /sysdeps/unix/sysv/linux/sys/timex.h
parentf1869e11225d9aa054fb11474887d8f109af0949 (diff)
downloadglibc-aaribaud/y2038.tar
glibc-aaribaud/y2038.tar.gz
glibc-aaribaud/y2038.tar.bz2
glibc-aaribaud/y2038.zip
Y2038: add _TIME_BITS supportaaribaud/y2038
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 'sysdeps/unix/sysv/linux/sys/timex.h')
-rw-r--r--sysdeps/unix/sysv/linux/sys/timex.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h
index fd459297ab..d4ddb33e6d 100644
--- a/sysdeps/unix/sysv/linux/sys/timex.h
+++ b/sysdeps/unix/sysv/linux/sys/timex.h
@@ -68,15 +68,43 @@ struct __ntptimeval64
__BEGIN_DECLS
extern int __adjtimex (struct timex *__ntx) __THROW;
+
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern time_t __REDIRECT (adjtimex, (struct timex *__ntx),
+ __adjtimex64) __THROW;
+# else
+# define adjtimex __adjtimex64
+# endif
+#endif
extern int adjtimex (struct timex *__ntx) __THROW;
-#ifdef __REDIRECT_NTH
+#if __WORDSIZE > 32 || ! defined(__USE_TIME_BITS64)
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
ntp_gettimex);
-#else
+# else
extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
+# define ntp_gettime ntp_gettimex
+# endif
+#else
+# if defined(__REDIRECT)
+extern time_t __REDIRECT (ntp_gettimex, (struct ntptimeval *__ntv),
+ __ntp_gettimex64) __THROW;
+# else
+# define ntp_gettimex __ntp_gettimex64
+# endif
# define ntp_gettime ntp_gettimex
#endif
+
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (ntp_adjtime, (struct timex *__tntx),
+ __ntp_adjtime64) __THROW;
+# else
+# define ntp_adjtime __ntp_adjtime64
+# endif
+#endif
extern int ntp_adjtime (struct timex *__tntx) __THROW;
__END_DECLS