aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/timer_getoverr.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-06-28 09:51:00 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-06-28 09:51:00 +0200
commitdf6d227e69082c5cab33b60aa676aebf08b7585e (patch)
tree691811c64b55d6705a433064beee645ac61c386c /sysdeps/unix/sysv/linux/timer_getoverr.c
parent273a2a2ae8b097672cdc8e9888548b134955af42 (diff)
downloadglibc-df6d227e69082c5cab33b60aa676aebf08b7585e.tar
glibc-df6d227e69082c5cab33b60aa676aebf08b7585e.tar.gz
glibc-df6d227e69082c5cab33b60aa676aebf08b7585e.tar.bz2
glibc-df6d227e69082c5cab33b60aa676aebf08b7585e.zip
Linux: Move timer_getoverrun from librt to libc
The symbol was moved using scripts/move-symbol-to-libc.py. The way the ABI intransition is implemented is changed with this commit: the implementation is now consolidated in one file with a TIMER_T_WAS_INT_COMPAT check. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/timer_getoverr.c')
-rw-r--r--sysdeps/unix/sysv/linux/timer_getoverr.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/timer_getoverr.c b/sysdeps/unix/sysv/linux/timer_getoverr.c
index 9c7ba3acad..18467c4059 100644
--- a/sysdeps/unix/sysv/linux/timer_getoverr.c
+++ b/sysdeps/unix/sysv/linux/timer_getoverr.c
@@ -20,17 +20,33 @@
#include <time.h>
#include <sysdep.h>
#include "kernel-posix-timers.h"
-
-
-#ifdef timer_getoverrun_alias
-# define timer_getoverrun timer_getoverrun_alias
-#endif
-
+#include <shlib-compat.h>
int
-timer_getoverrun (timer_t timerid)
+___timer_getoverrun (timer_t timerid)
{
-#undef timer_getoverrun
kernel_timer_t ktimerid = timerid_to_kernel_timer (timerid);
return INLINE_SYSCALL_CALL (timer_getoverrun, ktimerid);
}
+versioned_symbol (libc, ___timer_getoverrun, timer_getoverrun, GLIBC_2_34);
+libc_hidden_ver (___timer_getoverrun, __timer_getoverrun)
+
+#if TIMER_T_WAS_INT_COMPAT
+# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_3_3, GLIBC_2_34)
+compat_symbol (librt, ___timer_getoverrun, timer_getoverrun, GLIBC_2_3_3);
+# endif
+
+# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3)
+int
+__timer_getoverrun_old (int timerid)
+{
+ return __timer_getoverrun (__timer_compat_list[timerid]);
+}
+compat_symbol (librt, __timer_getoverrun_old, timer_getoverrun, GLIBC_2_2);
+# endif /* OTHER_SHLIB_COMPAT */
+
+#else /* !TIMER_T_WAS_INT_COMPAT */
+# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (librt, ___timer_getoverrun, timer_getoverrun, GLIBC_2_2);
+# endif
+#endif /* !TIMER_T_WAS_INT_COMPAT */