From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id B172B3857BBF; Tue, 1 Nov 2022 13:08:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B172B3857BBF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667308119; bh=4soGIZHcmX1MCxf4FYgg+WBspahnfKUv3PUW7Rhxcmg=; h=From:To:Subject:Date:From; b=QRwqGDyaOExD5VDGg31nkqtY05LSgyjWfpIDKSQsnkQnYBaN/Y88Kqw43c6mzM0Cj oJ2K7fXoBp9e6X9oZ4FglyMIDFQBHSlur/LOcLRfo1mw8t9IQBI3ix8Gu+3FrGJWtB d7CuVXsYI93KDts8LiUOJ5/1mkYOwCWZpmn6tPvo= 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] Apply asm redirection in not-cancel before first use X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: d08dec4ea7c9f8b1d734cc1ba80c7f70df2f2c25 X-Git-Newrev: d227fd53cbbc9ae7e5604da3669d04b6ccb53aa1 Message-Id: <20221101130839.B172B3857BBF@sourceware.org> Date: Tue, 1 Nov 2022 13:08:39 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d227fd53cbbc9ae7e5604da3669d04b6ccb53aa1 commit d227fd53cbbc9ae7e5604da3669d04b6ccb53aa1 Author: Adhemerval Zanella Date: Mon Oct 24 16:12:15 2022 -0300 Apply asm redirection in not-cancel before first use It is avoid a build failure on clang where it can not redeclare function attribute after its first use. Reviewed-by: Fangrui Song 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 */