From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 B8B0C385E445 for ; Sun, 27 Jun 2021 21:38:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B8B0C385E445 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-523--X0TnWgRONqWNfDtA-Ir8w-1; Sun, 27 Jun 2021 17:38:17 -0400 X-MC-Unique: -X0TnWgRONqWNfDtA-Ir8w-1 Received: by mail-qv1-f70.google.com with SMTP id m11-20020ad45dcb0000b029027aeaa8ae9dso15947953qvh.12 for ; Sun, 27 Jun 2021 14:38:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=aeN6Nz8QntyWOq1RfTSg1o9es6/zq6+XuRrkWkay5vw=; b=LTNa12mG05/IWgCO/SL9N7UY5/yTgXKKEzNSzwQ9WKue89qf/IDavL/Dca913VbGD/ znUUVcYrAbJ3b/aOibk1rpNuKhSfAVGIeHB3No4g9wVuiO998hMAd4u2+E8iHstTmnxe p0F1JYYCDlJhk4MODIlJrlUKVw3KW40tUHBYxkgzVDOPMVizk7Xr64oSi9hSLrt/wCec OOYXRuW79JF3MuyDkK4XzVu5g8hFukHbzTeq9M1N3+UAm8IOydGgifUhRZPSwDYav4RV IevLqfBOPlsOtLRC8+BnF10KQNATuMOixCi2vsqmaJdi/fc2eWsJOsJH524VyhF7c0R1 ArEw== X-Gm-Message-State: AOAM533i0RzZ19aQP0mGdVW2rWFXgU2nbSwYpUOXge5Y4XGhj9TTXh6e qUxHBil569FJBaI9VijghEFSIqke0ita8TwRp8BVN3j8na0nrV+71pMBpkX6yxAGk2PkRk4ShHd UERiIE7uNsirafARGpVdV8NMB2GzKknhXGBuDl9r7iHwyqPiOZjLqXOjiWqKjwpweocG5bg== X-Received: by 2002:ae9:ed4c:: with SMTP id c73mr194814qkg.37.1624829896215; Sun, 27 Jun 2021 14:38:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ3wnGYB4DSP5hLM0rp87t+rv/1i1Z+IlM53seV0Xig9sPpdEQCg1I9DEswYaDsVyPDl0jdQ== X-Received: by 2002:ae9:ed4c:: with SMTP id c73mr194800qkg.37.1624829895987; Sun, 27 Jun 2021 14:38:15 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id t185sm9311672qkh.95.2021.06.27.14.38.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 14:38:15 -0700 (PDT) Subject: Re: [PATCH 1/6] Linux: Define TIMER_T_WAS_INT_COMPAT in kernel-posix-timers.h To: Florian Weimer , libc-alpha@sourceware.org References: <763ced0d05e0f0087d0dce3f509246778250ec94.1624620992.git.fweimer@redhat.com> From: Carlos O'Donell Organization: Red Hat Message-ID: <8b687879-d956-cf2e-6ade-159bcec26a81@redhat.com> Date: Sun, 27 Jun 2021 17:38:14 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <763ced0d05e0f0087d0dce3f509246778250ec94.1624620992.git.fweimer@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, 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-List-Received-Date: Sun, 27 Jun 2021 21:38:20 -0000 On 6/25/21 7:41 AM, Florian Weimer via Libc-alpha wrote: > 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. Thanks. It's a shame that the untransitioned targets make this conditional more work to create than just simply using SHLIB_COMPAT. I don't san any easier way forward than what you've done here. At least it's clean. 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. OK. > + 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 OK. > 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 OK. > 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 OK. > 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 OK. > 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 OK. > 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 OK. > 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 OK. Default. > 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 > OK. -- Cheers, Carlos.