From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id 36DE73857C76; Thu, 7 Oct 2021 20:13:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 36DE73857C76 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/maskray/clang] not-cancel.h: Move hidden_proto before first use X-Act-Checkin: glibc X-Git-Author: Fangrui Song X-Git-Refname: refs/heads/maskray/clang X-Git-Oldrev: 3ca29febed1959af84aa0a5f34d87c2161d41120 X-Git-Newrev: e2ca1aaf29cf8e067683a795c573b5c19a18eebf Message-Id: <20211007201349.36DE73857C76@sourceware.org> Date: Thu, 7 Oct 2021 20:13:49 +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: Thu, 07 Oct 2021 20:13:49 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e2ca1aaf29cf8e067683a795c573b5c19a18eebf commit e2ca1aaf29cf8e067683a795c573b5c19a18eebf Author: Fangrui Song Date: Sun Aug 22 22:36:44 2021 -0700 not-cancel.h: Move hidden_proto before first use This fixes `error: cannot apply asm label to function after its first use` for Clang. Diff: --- sysdeps/unix/sysv/linux/not-cancel.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h index 82798df4b4..7d34d3b66b 100644 --- a/sysdeps/unix/sysv/linux/not-cancel.h +++ b/sysdeps/unix/sysv/linux/not-cancel.h @@ -51,6 +51,21 @@ __typeof (__write) __write_nocancel; /* Uncancelable close. */ __typeof (__close) __close_nocancel; +/* Uncancelable fcntl. */ +__typeof (__fcntl) __fcntl64_nocancel; + +#if IS_IN (libc) || IS_IN (rtld) +hidden_proto (__open_nocancel) +hidden_proto (__open64_nocancel) +hidden_proto (__openat_nocancel) +hidden_proto (__openat64_nocancel) +hidden_proto (__read_nocancel) +hidden_proto (__pread64_nocancel) +hidden_proto (__write_nocancel) +hidden_proto (__close_nocancel) +hidden_proto (__fcntl64_nocancel) +#endif + /* Non cancellable close syscall that does not also set errno in case of failure. */ static inline void @@ -67,19 +82,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt) INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt); } -/* Uncancelable fcntl. */ -__typeof (__fcntl) __fcntl64_nocancel; - -#if IS_IN (libc) || IS_IN (rtld) -hidden_proto (__open_nocancel) -hidden_proto (__open64_nocancel) -hidden_proto (__openat_nocancel) -hidden_proto (__openat64_nocancel) -hidden_proto (__read_nocancel) -hidden_proto (__pread64_nocancel) -hidden_proto (__write_nocancel) -hidden_proto (__close_nocancel) -hidden_proto (__fcntl64_nocancel) -#endif - #endif /* NOT_CANCEL_H */