From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 29/34] Linux: Define TIMER_T_WAS_INT_COMPAT in kernel-posix-timers.h
Date: Thu, 17 Jun 2021 20:59:31 +0200 [thread overview]
Message-ID: <2f9bd5a3dabea786c943c4a000ac6a1022685e84.1623956058.git.fweimer@redhat.com> (raw)
In-Reply-To: <cover.1623956057.git.fweimer@redhat.com>
This is almost equivalent to __WORDSIZE == 64
&& OTHER_SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3_3), except
that this expression is true for mips64/n64 targets as well,
even though those did not undergo the timer_t transition.
For the architecture-specific override to work, it is necessary
to switch from "..." includes to <...> includes.
---
.../sysv/linux/alpha/kernel-posix-timers.h | 22 +++++++++++++++++++
.../sysv/linux/ia64/kernel-posix-timers.h | 22 +++++++++++++++++++
sysdeps/unix/sysv/linux/kernel-posix-timers.h | 4 ++++
.../powerpc/powerpc64/kernel-posix-timers.h | 22 +++++++++++++++++++
.../linux/s390/s390-64/kernel-posix-timers.h | 22 +++++++++++++++++++
.../linux/sparc/sparc64/kernel-posix-timers.h | 22 +++++++++++++++++++
sysdeps/unix/sysv/linux/timer_create.c | 2 +-
sysdeps/unix/sysv/linux/timer_delete.c | 2 +-
sysdeps/unix/sysv/linux/timer_getoverr.c | 2 +-
sysdeps/unix/sysv/linux/timer_gettime.c | 2 +-
sysdeps/unix/sysv/linux/timer_routines.c | 2 +-
sysdeps/unix/sysv/linux/timer_settime.c | 2 +-
.../linux/x86_64/64/kernel-posix-timers.h | 22 +++++++++++++++++++
.../unix/sysv/linux/x86_64/timer_gettime.c | 2 +-
.../unix/sysv/linux/x86_64/timer_settime.c | 2 +-
15 files changed, 144 insertions(+), 8 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/alpha/kernel-posix-timers.h
create mode 100644 sysdeps/unix/sysv/linux/ia64/kernel-posix-timers.h
create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel-posix-timers.h
create mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/kernel-posix-timers.h
create mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/kernel-posix-timers.h
create mode 100644 sysdeps/unix/sysv/linux/x86_64/64/kernel-posix-timers.h
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/alpha/kernel-posix-timers.h
new file mode 100644
index 0000000000..e84dfb97e5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/kernel-posix-timers.h
@@ -0,0 +1,22 @@
+/* POSIX timers support functionality. alpha version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+#include <sysdeps/unix/sysv/linux/kernel-posix-timers.h>
+
+#undef TIMER_T_WAS_INT_COMPAT
+#define TIMER_T_WAS_INT_COMPAT 1
diff --git a/sysdeps/unix/sysv/linux/ia64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/ia64/kernel-posix-timers.h
new file mode 100644
index 0000000000..fb00698cf7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/ia64/kernel-posix-timers.h
@@ -0,0 +1,22 @@
+/* POSIX timers support functionality. ia64 version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+#include <sysdeps/unix/sysv/linux/kernel-posix-timers.h>
+
+#undef TIMER_T_WAS_INT_COMPAT
+#define TIMER_T_WAS_INT_COMPAT 1
diff --git a/sysdeps/unix/sysv/linux/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/kernel-posix-timers.h
index 17fc32d48f..874b809eba 100644
--- a/sysdeps/unix/sysv/linux/kernel-posix-timers.h
+++ b/sysdeps/unix/sysv/linux/kernel-posix-timers.h
@@ -103,3 +103,7 @@ timerid_to_kernel_timer (timer_t timerid)
else
return (kernel_timer_t) ((uintptr_t) timerid);
}
+
+/* New targets use int instead of timer_t. The difference only
+ matters on 64-bit targets. */
+#define TIMER_T_WAS_INT_COMPAT 0
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel-posix-timers.h
new file mode 100644
index 0000000000..718750db92
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel-posix-timers.h
@@ -0,0 +1,22 @@
+/* POSIX timers support functionality. powerpc64 version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+#include <sysdeps/unix/sysv/linux/kernel-posix-timers.h>
+
+#undef TIMER_T_WAS_INT_COMPAT
+#define TIMER_T_WAS_INT_COMPAT 1
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/s390/s390-64/kernel-posix-timers.h
new file mode 100644
index 0000000000..c8870c2dc1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/kernel-posix-timers.h
@@ -0,0 +1,22 @@
+/* POSIX timers support functionality. s390x version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+#include <sysdeps/unix/sysv/linux/kernel-posix-timers.h>
+
+#undef TIMER_T_WAS_INT_COMPAT
+#define TIMER_T_WAS_INT_COMPAT 1
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel-posix-timers.h
new file mode 100644
index 0000000000..b8485379ca
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel-posix-timers.h
@@ -0,0 +1,22 @@
+/* POSIX timers support functionality. sparc64 version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+#include <sysdeps/unix/sysv/linux/kernel-posix-timers.h>
+
+#undef TIMER_T_WAS_INT_COMPAT
+#define TIMER_T_WAS_INT_COMPAT 1
diff --git a/sysdeps/unix/sysv/linux/timer_create.c b/sysdeps/unix/sysv/linux/timer_create.c
index b21b0ca949..3dcd5455fc 100644
--- a/sysdeps/unix/sysv/linux/timer_create.c
+++ b/sysdeps/unix/sysv/linux/timer_create.c
@@ -25,7 +25,7 @@
#include <sysdep.h>
#include <internaltypes.h>
#include <pthreadP.h>
-#include "kernel-posix-timers.h"
+#include <kernel-posix-timers.h>
#include "kernel-posix-cpu-timers.h"
diff --git a/sysdeps/unix/sysv/linux/timer_delete.c b/sysdeps/unix/sysv/linux/timer_delete.c
index a7a183591e..ee8c364d95 100644
--- a/sysdeps/unix/sysv/linux/timer_delete.c
+++ b/sysdeps/unix/sysv/linux/timer_delete.c
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <time.h>
#include <sysdep.h>
-#include "kernel-posix-timers.h"
+#include <kernel-posix-timers.h>
#ifdef timer_delete_alias
diff --git a/sysdeps/unix/sysv/linux/timer_getoverr.c b/sysdeps/unix/sysv/linux/timer_getoverr.c
index 9c7ba3acad..b997290768 100644
--- a/sysdeps/unix/sysv/linux/timer_getoverr.c
+++ b/sysdeps/unix/sysv/linux/timer_getoverr.c
@@ -19,7 +19,7 @@
#include <errno.h>
#include <time.h>
#include <sysdep.h>
-#include "kernel-posix-timers.h"
+#include <kernel-posix-timers.h>
#ifdef timer_getoverrun_alias
diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c
index 193fe3b140..0b31324da7 100644
--- a/sysdeps/unix/sysv/linux/timer_gettime.c
+++ b/sysdeps/unix/sysv/linux/timer_gettime.c
@@ -21,7 +21,7 @@
#include <time.h>
#include <sysdep.h>
#include <kernel-features.h>
-#include "kernel-posix-timers.h"
+#include <kernel-posix-timers.h>
int
__timer_gettime64 (timer_t timerid, struct __itimerspec64 *value)
diff --git a/sysdeps/unix/sysv/linux/timer_routines.c b/sysdeps/unix/sysv/linux/timer_routines.c
index 8d8c1a1e76..fc3aa894ab 100644
--- a/sysdeps/unix/sysv/linux/timer_routines.c
+++ b/sysdeps/unix/sysv/linux/timer_routines.c
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <sysdep-cancel.h>
#include <pthreadP.h>
-#include "kernel-posix-timers.h"
+#include <kernel-posix-timers.h>
/* List of active SIGEV_THREAD timers. */
diff --git a/sysdeps/unix/sysv/linux/timer_settime.c b/sysdeps/unix/sysv/linux/timer_settime.c
index f8bb16a4c2..b8326e36a4 100644
--- a/sysdeps/unix/sysv/linux/timer_settime.c
+++ b/sysdeps/unix/sysv/linux/timer_settime.c
@@ -21,7 +21,7 @@
#include <time.h>
#include <sysdep.h>
#include <kernel-features.h>
-#include "kernel-posix-timers.h"
+#include <kernel-posix-timers.h>
int
__timer_settime64 (timer_t timerid, int flags,
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/x86_64/64/kernel-posix-timers.h
new file mode 100644
index 0000000000..db0beb5920
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/64/kernel-posix-timers.h
@@ -0,0 +1,22 @@
+/* POSIX timers support functionality. x86_64 version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+#include <sysdeps/unix/sysv/linux/kernel-posix-timers.h>
+
+#undef TIMER_T_WAS_INT_COMPAT
+#define TIMER_T_WAS_INT_COMPAT 1
diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
index 3f3ae12d6b..107b1f97c7 100644
--- a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
+++ b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
@@ -18,7 +18,7 @@
#include <shlib-compat.h>
#include <sysdep.h>
-#include "kernel-posix-timers.h"
+#include <kernel-posix-timers.h>
#include "compat-timer.h"
int
diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c
index 14a05965a3..f987cd16d3 100644
--- a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c
+++ b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c
@@ -18,7 +18,7 @@
#include <shlib-compat.h>
#include <sysdep.h>
-#include "kernel-posix-timers.h"
+#include <kernel-posix-timers.h>
#include "compat-timer.h"
int
--
2.31.1
next prev parent reply other threads:[~2021-06-17 18:59 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 18:56 [PATCH v2 00/34] Move librt into libc Florian Weimer
2021-06-17 18:56 ` [PATCH 01/34] rt: Lexicographically sort Versions file; librt-routines in Makefile Florian Weimer
2021-06-17 18:56 ` [PATCH 02/34] Fix librt-routines-var issues for !PTHREAD_IN_LIBC Florian Weimer
2021-06-17 18:56 ` [PATCH 03/34] rt: Replace generic stub of shm_open with the posix version Florian Weimer
2021-06-17 18:57 ` [PATCH 04/34] rt: Replace generic stub of shm_unlink " Florian Weimer
2021-06-17 18:57 ` [PATCH 05/34] rt: Move shm_open into libc Florian Weimer
2021-06-17 18:57 ` [PATCH 06/34] rt: Move shm_unlink " Florian Weimer
2021-06-17 18:57 ` [PATCH 07/34] rt: Move generic implementation from sysdeps/pthread to rt Florian Weimer
2021-06-21 18:37 ` Adhemerval Zanella
2021-06-17 18:57 ` [PATCH 08/34] nptl: Move pthreadP.h into sysdeps directory Florian Weimer
2021-06-22 0:57 ` Adhemerval Zanella
2021-06-17 18:57 ` [PATCH 09/34] Add hidden prototypes for fsync, fdatasync Florian Weimer
2021-06-22 0:58 ` Adhemerval Zanella
2021-06-17 18:57 ` [PATCH 10/34] Linux: Move aio_init from librt into libc Florian Weimer
2021-06-23 13:22 ` Adhemerval Zanella
2021-06-17 18:57 ` [PATCH 11/34] Linux: Move aio_cancel, aio_cancel64 " Florian Weimer
2021-06-23 17:26 ` Adhemerval Zanella
2021-06-17 18:57 ` [PATCH 12/34] Linux: Move aio_error, aio_error64 " Florian Weimer
2021-06-23 17:43 ` Adhemerval Zanella
2021-06-17 18:57 ` [PATCH 13/34] Linux: Move aio_fsync, aio_fsync64 " Florian Weimer
2021-06-23 17:46 ` Adhemerval Zanella
2021-06-17 18:58 ` [PATCH 14/34] Linux: Move aio_read, aio_read64 " Florian Weimer
2021-06-23 17:51 ` Adhemerval Zanella
2021-06-25 9:53 ` Florian Weimer
2021-06-25 12:36 ` Adhemerval Zanella
2021-06-17 18:58 ` [PATCH 15/34] Linux: Move aio_return, aio_return64 " Florian Weimer
2021-06-23 19:44 ` Adhemerval Zanella
2021-06-17 18:58 ` [PATCH 16/34] Linux: Move aio_suspend, aio_suspend64, __aio_suspend_time64 to libc Florian Weimer
2021-06-23 19:52 ` Adhemerval Zanella
2021-06-23 19:59 ` Florian Weimer
2021-06-17 18:58 ` [PATCH 17/34] Linux: Move aio_write, aio_write64 into libc Florian Weimer
2021-06-23 20:02 ` Adhemerval Zanella
2021-06-17 18:58 ` [PATCH 18/34] rt: Rework lio_listio implementation Florian Weimer
2021-06-23 20:10 ` Adhemerval Zanella
2021-06-17 18:58 ` [PATCH 19/34] Linux: Move lio_listio, lio_listio64 from librt to libc Florian Weimer
2021-06-23 20:12 ` Adhemerval Zanella
2021-06-17 18:58 ` [PATCH 20/34] Linux: Move mq_close " Florian Weimer
2021-06-24 14:00 ` Adhemerval Zanella
2021-06-17 18:58 ` [PATCH 21/34] Linux: Move mq_setattr " Florian Weimer
2021-06-24 14:02 ` Adhemerval Zanella
2021-06-25 10:02 ` Florian Weimer
2021-06-17 18:58 ` [PATCH 22/34] Linux: Move mq_getattr " Florian Weimer
2021-06-24 14:02 ` Adhemerval Zanella
2021-06-17 18:58 ` [PATCH 23/34] Linux: Move mq_notify " Florian Weimer
2021-06-24 14:05 ` Adhemerval Zanella
2021-06-25 11:37 ` Florian Weimer
2021-06-17 18:59 ` [PATCH 24/34] Linux: Move mq_open, __mq_open_2 " Florian Weimer
2021-06-24 14:07 ` Adhemerval Zanella
2021-06-17 18:59 ` [PATCH 25/34] Linux: Move mq_receive, mq_timedreceive, __mq_timedreceive_time64 " Florian Weimer
2021-06-24 14:14 ` Adhemerval Zanella
2021-06-17 18:59 ` [PATCH 26/34] Linux: Move mq_send, mq_timedsend, __mq_timedsend_time64 " Florian Weimer
2021-06-24 14:22 ` Adhemerval Zanella
2021-06-17 18:59 ` [PATCH 27/34] Linux: Move mq_unlink from librt " Florian Weimer
2021-06-24 14:31 ` Adhemerval Zanella
2021-06-17 18:59 ` [PATCH 28/34] Linux: Move timer helper routines " Florian Weimer
2021-06-24 14:41 ` Adhemerval Zanella
2021-06-25 11:38 ` Florian Weimer
2021-06-17 18:59 ` Florian Weimer [this message]
2021-06-24 16:21 ` [PATCH 29/34] Linux: Define TIMER_T_WAS_INT_COMPAT in kernel-posix-timers.h Adhemerval Zanella
2021-06-17 18:59 ` [PATCH 30/34] Linux: Move timer_create, timer_delete from librt to libc Florian Weimer
2021-06-24 17:18 ` Adhemerval Zanella
2021-06-17 18:59 ` [PATCH 31/34] Linux: Move timer_getoverrun " Florian Weimer
2021-06-24 17:26 ` Adhemerval Zanella
2021-06-24 17:38 ` Adhemerval Zanella
2021-06-17 18:59 ` [PATCH 32/34] Linux: Move timer_gettime, __timer_gettime64 " Florian Weimer
2021-06-24 17:36 ` Adhemerval Zanella
2021-06-17 18:59 ` [PATCH 33/34] Linux: Move timer_settime, __timer_settime64 " Florian Weimer
2021-06-24 17:42 ` Adhemerval Zanella
2021-06-17 19:00 ` [PATCH 34/34] Linux: Cleanups after librt move Florian Weimer
2021-06-24 17:45 ` Adhemerval Zanella
2021-06-25 8:53 ` Florian Weimer
2021-06-24 17:49 ` [PATCH v2 00/34] Move librt into libc Adhemerval Zanella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2f9bd5a3dabea786c943c4a000ac6a1022685e84.1623956058.git.fweimer@redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).