From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id B82723857420; Fri, 6 Aug 2021 08:51:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B82723857420 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc] Linux: Fix fcntl, ioctl, prctl redirects for _TIME_BITS=64 (bug 28182) X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/master X-Git-Oldrev: fb89489636766532902d4a02a08dbb72efed4faf X-Git-Newrev: c87fcacc50505d550f1bb038382bcc7ea73a5926 Message-Id: <20210806085107.B82723857420@sourceware.org> Date: Fri, 6 Aug 2021 08:51:07 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Aug 2021 08:51:07 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c87fcacc50505d550f1bb038382bcc7ea73a5926 commit c87fcacc50505d550f1bb038382bcc7ea73a5926 Author: Florian Weimer Date: Fri Aug 6 09:51:38 2021 +0200 Linux: Fix fcntl, ioctl, prctl redirects for _TIME_BITS=64 (bug 28182) __REDIRECT and __THROW are not compatible with C++ due to the ordering of the __asm__ alias and the throw specifier. __REDIRECT_NTH has to be used instead. Fixes commit 8a40aff86ba5f64a3a84883e539cb67b ("io: Add time64 alias for fcntl"), commit 82c395d91ea4f69120d453aeec398e30 ("misc: Add time64 alias for ioctl"), commit b39ffab860cd743a82c91946619f1b8158 ("Linux: Add time64 alias for prctl"). Reviewed-by: Carlos O'Donell Diff: --- io/fcntl.h | 8 ++++---- misc/sys/ioctl.h | 4 ++-- sysdeps/unix/sysv/linux/sys/prctl.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/io/fcntl.h b/io/fcntl.h index 8917a73b42..1c96f98f4d 100644 --- a/io/fcntl.h +++ b/io/fcntl.h @@ -187,10 +187,10 @@ extern int fcntl64 (int __fd, int __cmd, ...); # endif #else /* __USE_TIME_BITS64 */ # ifdef __REDIRECT -extern int __REDIRECT (fcntl, (int __fd, int __request, ...), - __fcntl_time64) __THROW; -extern int __REDIRECT (fcntl64, (int __fd, int __request, ...), - __fcntl_time64) __THROW; +extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...), + __fcntl_time64); +extern int __REDIRECT_NTH (fcntl64, (int __fd, int __request, ...), + __fcntl_time64); # else extern int __fcntl_time64 (int __fd, int __request, ...) __THROW; # define fcntl64 __fcntl_time64 diff --git a/misc/sys/ioctl.h b/misc/sys/ioctl.h index 6884d9925f..9945c1e918 100644 --- a/misc/sys/ioctl.h +++ b/misc/sys/ioctl.h @@ -42,8 +42,8 @@ __BEGIN_DECLS extern int ioctl (int __fd, unsigned long int __request, ...) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...), - __ioctl_time64) __THROW; +extern int __REDIRECT_NTH (ioctl, (int __fd, unsigned long int __request, ...), + __ioctl_time64); # else extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW; # define ioctl __ioctl_time64 diff --git a/sysdeps/unix/sysv/linux/sys/prctl.h b/sysdeps/unix/sysv/linux/sys/prctl.h index db88938b3a..f0e0d2f27f 100644 --- a/sysdeps/unix/sysv/linux/sys/prctl.h +++ b/sysdeps/unix/sysv/linux/sys/prctl.h @@ -42,7 +42,7 @@ __BEGIN_DECLS extern int prctl (int __option, ...) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW; +extern int __REDIRECT_NTH (prctl, (int __option, ...), __prctl_time64); # else extern int __prctl_time64 (int __option,d ...) __THROW; # define ioctl __prctl_time64