From patchwork Fri Jun 25 11:41:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 44021 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B4ABE39BECED for ; Fri, 25 Jun 2021 11:42:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4ABE39BECED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1624621374; bh=erbNZBcHYH6eAQsuBQpEEWCOXHhCHxSA9k5pCGqsh0Q=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=WKftn1i8WhGqXQD00jQ7w5sG4admmprIYXTFSwlQlvS32NCDDYi7daeyy1W2OZXHf QRHGSmylR2+RL1G1hQ2/PeemIXqur1qmK9P7n4rbYutnmvMk0lvDE7O66rgCq8jblY NOrB4Drfh8I6vWjNDoozwlir2Ao3/Ak/0VlKen44= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 5CDFE39BDDDE for ; Fri, 25 Jun 2021 11:41:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5CDFE39BDDDE Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-Wh7xk4PWP46cdQaJelm3vg-1; Fri, 25 Jun 2021 07:41:44 -0400 X-MC-Unique: Wh7xk4PWP46cdQaJelm3vg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 13AEA100A450 for ; Fri, 25 Jun 2021 11:41:43 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-228.ams2.redhat.com [10.36.112.228]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3674F26E74 for ; Fri, 25 Jun 2021 11:41:42 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 1/6] Linux: Define TIMER_T_WAS_INT_COMPAT in kernel-posix-timers.h In-Reply-To: References: X-From-Line: 763ced0d05e0f0087d0dce3f509246778250ec94 Mon Sep 17 00:00:00 2001 Message-Id: <763ced0d05e0f0087d0dce3f509246778250ec94.1624620992.git.fweimer@redhat.com> Date: Fri, 25 Jun 2021 13:41:40 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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. Reviewed-by: Carlos O'Donell --- .../sysv/linux/alpha/timer_t_was_int_compat.h | 19 ++++++++++++++++++ .../sysv/linux/ia64/timer_t_was_int_compat.h | 19 ++++++++++++++++++ sysdeps/unix/sysv/linux/kernel-posix-timers.h | 4 ++++ .../powerpc64/timer_t_was_int_compat.h | 19 ++++++++++++++++++ .../s390/s390-64/timer_t_was_int_compat.h | 19 ++++++++++++++++++ .../sparc/sparc64/timer_t_was_int_compat.h | 19 ++++++++++++++++++ .../unix/sysv/linux/timer_t_was_int_compat.h | 20 +++++++++++++++++++ .../linux/x86_64/64/timer_t_was_int_compat.h | 19 ++++++++++++++++++ 8 files changed, 138 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/timer_t_was_int_compat.h create mode 100644 sysdeps/unix/sysv/linux/ia64/timer_t_was_int_compat.h create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_t_was_int_compat.h create mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/timer_t_was_int_compat.h create mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/timer_t_was_int_compat.h create mode 100644 sysdeps/unix/sysv/linux/timer_t_was_int_compat.h create mode 100644 sysdeps/unix/sysv/linux/x86_64/64/timer_t_was_int_compat.h diff --git a/sysdeps/unix/sysv/linux/alpha/timer_t_was_int_compat.h b/sysdeps/unix/sysv/linux/alpha/timer_t_was_int_compat.h new file mode 100644 index 0000000000..92840d92aa --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/timer_t_was_int_compat.h @@ -0,0 +1,19 @@ +/* timer_t/int compatibility transition. 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 . */ + +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/ia64/timer_t_was_int_compat.h b/sysdeps/unix/sysv/linux/ia64/timer_t_was_int_compat.h new file mode 100644 index 0000000000..eb7e08c7cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/timer_t_was_int_compat.h @@ -0,0 +1,19 @@ +/* timer_t/int compatibility transition. 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 . */ + +#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..86aa8a2ded 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. */ +#include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_t_was_int_compat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_t_was_int_compat.h new file mode 100644 index 0000000000..dbb52c13d9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_t_was_int_compat.h @@ -0,0 +1,19 @@ +/* timer_t/int compatibility transition. 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 . */ + +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/timer_t_was_int_compat.h b/sysdeps/unix/sysv/linux/s390/s390-64/timer_t_was_int_compat.h new file mode 100644 index 0000000000..4ec28a2f9d --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/s390-64/timer_t_was_int_compat.h @@ -0,0 +1,19 @@ +/* timer_t/int compatibility transition. 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 . */ + +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/timer_t_was_int_compat.h b/sysdeps/unix/sysv/linux/sparc/sparc64/timer_t_was_int_compat.h new file mode 100644 index 0000000000..f4bacb63bb --- /dev/null +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/timer_t_was_int_compat.h @@ -0,0 +1,19 @@ +/* timer_t/int compatibility transition. 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 . */ + +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/timer_t_was_int_compat.h b/sysdeps/unix/sysv/linux/timer_t_was_int_compat.h new file mode 100644 index 0000000000..b1c7dd7354 --- /dev/null +++ b/sysdeps/unix/sysv/linux/timer_t_was_int_compat.h @@ -0,0 +1,20 @@ +/* timer_t/int compatibility transition. Generic 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 . */ + +/* timer_t did not change size (from int to a pointer type). */ +#define TIMER_T_WAS_INT_COMPAT 0 diff --git a/sysdeps/unix/sysv/linux/x86_64/64/timer_t_was_int_compat.h b/sysdeps/unix/sysv/linux/x86_64/64/timer_t_was_int_compat.h new file mode 100644 index 0000000000..9071028624 --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/64/timer_t_was_int_compat.h @@ -0,0 +1,19 @@ +/* timer_t/int compatibility transition. 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 . */ + +#define TIMER_T_WAS_INT_COMPAT 1