From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 2B1B83857B99; Fri, 28 Oct 2022 17:38:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B1B83857B99 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666978692; bh=RSJivVBmDbV1dRc194SVev3hz8LJUZqsEYxp6AFHsPY=; h=From:To:Subject:Date:From; b=aTQQgxpm7SLeK4Hl2X3yfGR1hAFHHdruXyr+W0IQ18oZEijMB3Zt7cFJCUVARFdKM O3YjjsUXUjLG4+3DLY86N3z/UJqJlbjNHia+rPRVCzQHfHMN4iJdkCTzLm5reMvTYF VMccpsbUYGzs175ttDmRLEwuMxdIUDvHmYBahoX4= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] linux: Move hidden_proto before static inline usage on not-cancel.h X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 66a1757257c025ffbc261c1570703d8020e51986 X-Git-Newrev: 2c4ec1509fb2bfca7fa9960687727ae423f8963a Message-Id: <20221028173812.2B1B83857B99@sourceware.org> Date: Fri, 28 Oct 2022 17:38:12 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2c4ec1509fb2bfca7fa9960687727ae423f8963a commit 2c4ec1509fb2bfca7fa9960687727ae423f8963a Author: Adhemerval Zanella Date: Mon Oct 24 16:12:15 2022 -0300 linux: Move hidden_proto before static inline usage on not-cancel.h It is avoid a build failure on clang where it can redeclare function attribute after its first use. 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 93615de681..d4f1e0fbde 100644 --- a/sysdeps/unix/sysv/linux/not-cancel.h +++ b/sysdeps/unix/sysv/linux/not-cancel.h @@ -52,6 +52,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 @@ -80,19 +95,4 @@ __poll_infinity_nocancel (struct pollfd *fds, nfds_t nfds) return INLINE_SYSCALL_CALL (ppoll, fds, nfds, NULL, NULL, 0); } -/* 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 */