From patchwork Fri Oct 28 17:35:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 59596 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 920D2384647E for ; Fri, 28 Oct 2022 17:37:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 920D2384647E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666978659; bh=0s2RZc1X7mCgZBn6F5FmisunnyUK3fqdyZmcGs+oNec=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=etkmVhwydk2fM2doybvmUIrl58S6CZbArpq9B0zGKqayMEwkA6Gcej3q4fheCmV3u Kwwxhs81fS1WsbW/oNIDwu9lV2BSbR3tKGRNyVcvGsovJmqpKMgdedOW3+eGXMCKTF Vd5m/Uea5s54ITk5FMU8R2IBwaFZtlHhnH6g4n88= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id 2F3D63858436 for ; Fri, 28 Oct 2022 17:35:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2F3D63858436 Received: by mail-oi1-x22e.google.com with SMTP id l5so6850173oif.7 for ; Fri, 28 Oct 2022 10:35:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0s2RZc1X7mCgZBn6F5FmisunnyUK3fqdyZmcGs+oNec=; b=IxoodzH50hKzu0AuW5sT6VVXUiSfhFnHsxGexsSIZfG0yGuHEOwfQ+PScbxcozKGL2 pADzEQoNb1P6ECMMLnI/FPRvdYzNIPTKkB5Haob5jr7rqVUJpWkKngukc0/bNnzmNOAE 0lEOVyJgsjQ5KVTtV1Qafg0Mw4B7y0HTS8tzh28qTR0VnOCTlC7qsSUlrKsFQsuv1Pou IxCdUYrx7xMNGYt3Okaw1FRoFb1ScWZ4cVPEoKLPKqLOcLVb8i6bLgD4VpmeQnWf5LA/ QIb2JOMvB3dAiGgMqUmKioKd/Ork9o4An60T+UlPpEoyGdd9i4aumGsbK62+8z49uk+C 9vAA== X-Gm-Message-State: ACrzQf0E3Q5aQvkavV7nasmTmnXUdEG21tze7btXUT+3tac60+glzCjm 1KkMtdb0NUjT4AB4MEJnFoZ1GRIyM74RonmI X-Google-Smtp-Source: AMsMyM79Yvu2tY1bh6NIdmGKV8sdcMArVzvZKwRvf1fYHBM2kIjzjrKFIn/HIYojsTvZi/XAHKh6tQ== X-Received: by 2002:a05:6808:f8e:b0:355:5533:d4f4 with SMTP id o14-20020a0568080f8e00b003555533d4f4mr8613182oiw.126.1666978545341; Fri, 28 Oct 2022 10:35:45 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:17c8:6484:1100:1451:7f3f]) by smtp.gmail.com with ESMTPSA id v10-20020a056870b50a00b0012779ba00fesm2434998oap.2.2022.10.28.10.35.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 10:35:45 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 04/11] linux: Move hidden_proto before static inline usage on not-cancel.h Date: Fri, 28 Oct 2022 14:35:25 -0300 Message-Id: <20221028173532.876027-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028173532.876027-1-adhemerval.zanella@linaro.org> References: <20221028173532.876027-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" It is avoid a build failure on clang where it can redeclare function attribute after its first use. Reviewed-by: Fangrui Song --- 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 */