From patchwork Wed Nov 6 12:49:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 2007522 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=O9K03xkg; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xk4np0q08z1xyW for ; Wed, 6 Nov 2024 23:51:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3B273858D34 for ; Wed, 6 Nov 2024 12:51:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id E07DF3858404 for ; Wed, 6 Nov 2024 12:49:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E07DF3858404 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E07DF3858404 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730897403; cv=none; b=UgN9ouAG6pS48AvRHj8DyPb/gmqFuQjMM7keutwS47XTRvaZDAi+UmIWaW1LaDUFaIzjsYyXzteAZ1vJlEoHs0z8TNzbAoqhQqYGclFRartOpSQbP1sVWuzQL0e+BCUhc2urqF1i1YEgWJBXY8XaPkZauQ/uFoCHoLNJLTM+Yws= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730897403; c=relaxed/simple; bh=w5jKRmhtxoQhO/WSyh7AYs9bjs3gwYEeTyEYSZcbIf0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=cazkC8vfWfyw0s099a/uziK6foQQPEOj9l1G2VX+YIPvBlARXHntTo4XdkCN51YXu2qNuBvrMvLM/Fx3KRq09zGMm18bCzjoRjxtYRHLLyIiBqnNT4zhupsKjamOu40eFOGIrlvH6PLYHrNoG7CcIEAQt3pCv+dF0IBKo2u6O4A= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730897394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1WA8bIYUzLqEoqZ8dmGNC6KmCdUgq+4Tn6CvrrZBsaM=; b=O9K03xkg8BqFZI2s8449uXtYeFUirgvtp+frCU3L1XKiZkcKp0/9V8gnJqYZvMnVFYdAYK Y+j1Q2JgJBc0IFnBCER7HzYqj8WMwY+l5MKww0y/n/yAPx8FsTqkhGEKKQT3n391JmXR5c JzlBExSXY4BJID6kk8DqlBXaZXH3+Qc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-294-IuiY2-TjON6w6jbyhcxiMg-1; Wed, 06 Nov 2024 07:49:51 -0500 X-MC-Unique: IuiY2-TjON6w6jbyhcxiMg-1 X-Mimecast-MFC-AGG-ID: IuiY2-TjON6w6jbyhcxiMg Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 84146195608D; Wed, 6 Nov 2024 12:49:50 +0000 (UTC) Received: from localhost (unknown [10.42.28.185]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 879751956088; Wed, 6 Nov 2024 12:49:49 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Move include guards to start of headers Date: Wed, 6 Nov 2024 12:49:29 +0000 Message-ID: <20241106124948.338064-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: OnVdbJr25rZh7NijnybzGGnTH8l39dbPF2q7r3c_BB4_1730897390 X-Mimecast-Originator: redhat.com X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org libstdc++-v3/ChangeLog: * include/c_compatibility/complex.h (_GLIBCXX_COMPLEX_H): Move include guard to start of the header. * include/c_global/ctgmath (_GLIBCXX_CTGMATH): Likewise. --- Tested x86_64-linux. Pushed to trunk. libstdc++-v3/include/c_compatibility/complex.h | 6 +++--- libstdc++-v3/include/c_global/ctgmath | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/include/c_compatibility/complex.h b/libstdc++-v3/include/c_compatibility/complex.h index 605d1f30e06..a3102d9fce3 100644 --- a/libstdc++-v3/include/c_compatibility/complex.h +++ b/libstdc++-v3/include/c_compatibility/complex.h @@ -26,6 +26,9 @@ * This is a Standard C++ Library header. */ +#ifndef _GLIBCXX_COMPLEX_H +#define _GLIBCXX_COMPLEX_H 1 + #include #if __cplusplus >= 201103L @@ -42,7 +45,4 @@ # endif #endif -#ifndef _GLIBCXX_COMPLEX_H -#define _GLIBCXX_COMPLEX_H 1 - #endif diff --git a/libstdc++-v3/include/c_global/ctgmath b/libstdc++-v3/include/c_global/ctgmath index 79c1a029f41..39c17668f16 100644 --- a/libstdc++-v3/include/c_global/ctgmath +++ b/libstdc++-v3/include/c_global/ctgmath @@ -26,13 +26,13 @@ * This is a Standard C++ Library header. */ +#ifndef _GLIBCXX_CTGMATH +#define _GLIBCXX_CTGMATH 1 + #ifdef _GLIBCXX_SYSHDR #pragma GCC system_header #endif -#ifndef _GLIBCXX_CTGMATH -#define _GLIBCXX_CTGMATH 1 - #if __cplusplus < 201103L # include #else