From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 1077E3858020 for ; Fri, 10 Dec 2021 17:07:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1077E3858020 Received: by mail-wr1-x431.google.com with SMTP id c4so15989228wrd.9 for ; Fri, 10 Dec 2021 09:07:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:subject:message-id:date:cc:to; bh=i2+zjXe/lhawZjw6LAg2PddKGL4J18NIAxUKsaN0VNs=; b=zw584qo8lPGXz4IutQvLpQtTRdy2CmC9b/Iv8/D+We8JooPbmzzhLA0RT4bhQPwXOg 4ywjleW87i9ct8YT1BgNs+xl3HW+gbReU3ANG8MnxdsSlhJi2WDcBcEm0HBaUbHEZfPT dEKsEukllpw16ZFfTeA952wS/NGu7zdMGmd0yeWHgziSChTlrMXDKxa6rZwLIbGQzoCm CWGScIrmhlDtR8jK52ynpshZ/v/yK8xbMEx0tnhs3qlYzhfg94cWW8x9pu3okYv6XhO+ FLZSaSEYnY1dknts3dHbUyuwdp3ky4CFYNXnihGjTuzRsxXAGTCRnosE5echMebLOGmZ xD8g== X-Gm-Message-State: AOAM533T6DVrTkGzDv6hhd3o1dqIxPCDVbal0jEfLdehJh+pY+CbW4TJ rX4nG3pn1eMckjVQRemUXuW6ZNiWp/qtsEB3 X-Google-Smtp-Source: ABdhPJzol7WOi+x1KJpnQ39idW5hVFr9QRoDxUaYlWgP0elxSSxv+7U2SbWSazOc8tjyf0joDarsrg== X-Received: by 2002:adf:f7c7:: with SMTP id a7mr265167wrq.701.1639156019020; Fri, 10 Dec 2021 09:06:59 -0800 (PST) Received: from smtpclient.apple ([2a02:2ab8:224:1:5018:c84a:9614:761d]) by smtp.gmail.com with ESMTPSA id h13sm3035942wrx.82.2021.12.10.09.06.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Dec 2021 09:06:58 -0800 (PST) From: Olivier Hainque Content-Type: multipart/mixed; boundary="Apple-Mail=_D8F7FC57-2C1F-4084-A3BC-DE99A67EE8D4" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: [PATCH] #undef isblank before def or decl in libstdc++ headers Message-Id: Date: Fri, 10 Dec 2021 18:06:58 +0100 Cc: Olivier Hainque To: libstdc++ , gcc-patches X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2021 17:07:01 -0000 --Apple-Mail=_D8F7FC57-2C1F-4084-A3BC-DE99A67EE8D4 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Hello, The attached patch helps fix a build failure of libstdc++ on some variants of VxWorks where the system headers expose an "isblank" macro. I understand this kind of thing normally is handled through fixincludes, however fixincludes on VxWorks is very tricky and we already have libstdc++-v3/include/c_global/cctype:#undef isblank libstdc++-v3/include/tr1/cctype:#undef isblank so the suggestion here is to simply do the same in a couple more places. I checked that it gets us through the observed build failure for VxWorks, then bootstrapped and regtested on native 64bit linux. Ok to commit? Thanks in advance, With Kind Regards, Olivier 2021-12-07 Olivier Hainque libstdc++-v3/ * include/bits/locale_facets.h: #undef isblank before providing a definition. * libstdc++-v3/include/bits/localefwd.h: Likewise. --Apple-Mail=_D8F7FC57-2C1F-4084-A3BC-DE99A67EE8D4 Content-Disposition: attachment; filename=0001-Add-undef-isblank-before-definition-or-decl-in-bits-.patch Content-Type: application/octet-stream; x-unix-mode=0640; name="0001-Add-undef-isblank-before-definition-or-decl-in-bits-.patch" Content-Transfer-Encoding: quoted-printable =46rom=206e2b18025476ba5acf929eb7a313305ff282efe3=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Olivier=20Hainque=20=0A= Date:=20Fri,=2019=20Nov=202021=2015:20:45=20+0000=0ASubject:=20[PATCH]=20= Add=20#undef=20isblank=20before=20definition=20or=20decl=20in=20bits=20= headers=0A=0AAs=20already=20done=20in=0A=0A=20=20= libstdc++-v3/include/c_global/cctype:#undef=20isblank=0A=20=20= libstdc++-v3/include/tr1/cctype:#undef=20isblank=0A=0AFixes=20build=20= failures=20for=20old=20VxWorks=20variants=20where=20the=20system=0A= headers=20provide=20a=20macro=20version=20(observed=20on=206.9).=0A=0A= 2021-12-07=20=20Olivier=20Hainque=20=20=0A=0A= libstdc++-v3/=0A=0A=09*=20include/bits/locale_facets.h:=20#undef=20= isblank=20before=0A=09providing=20a=20definition.=0A=09*=20= libstdc++-v3/include/bits/localefwd.h:=20Likewise.=0A=0APart=20of=20= UB12-004=20(vxworks=20ports=20transition=20to=20gcc-11)=0A=0AChange-Id:=20= Ib682f663a833d02e814c3ac9905e81096c361601=0A(cherry=20picked=20from=20= commit=206bad427c07cb22983b419a85cf9116f03e954d47)=0A---=0A=20= libstdc++-v3/include/bits/locale_facets.h=20|=201=20+=0A=20= libstdc++-v3/include/bits/localefwd.h=20=20=20=20=20|=201=20+=0A=202=20= files=20changed,=202=20insertions(+)=0A=0Adiff=20--git=20= a/libstdc++-v3/include/bits/locale_facets.h=20= b/libstdc++-v3/include/bits/locale_facets.h=0Aindex=20= 5ca431e1a25..9e1d33f84e7=20100644=0A---=20= a/libstdc++-v3/include/bits/locale_facets.h=0A+++=20= b/libstdc++-v3/include/bits/locale_facets.h=0A@@=20-2663,6=20+2663,7=20= @@=20_GLIBCXX_END_NAMESPACE_LDBL=0A=20=0A=20#if=20__cplusplus=20>=3D=20= 201103L=0A=20=20=20///=20Convenience=20interface=20to=20= ctype.is(ctype_base::blank,=20__c).=0A+=20=20#undef=20isblank=0A=20=20=20= template=0A=20=20=20=20=20inline=20bool=0A=20=20=20=20= =20isblank(_CharT=20__c,=20const=20locale&=20__loc)=0Adiff=20--git=20= a/libstdc++-v3/include/bits/localefwd.h=20= b/libstdc++-v3/include/bits/localefwd.h=0Aindex=20= 9bc35e9761e..8d86386d2e5=20100644=0A---=20= a/libstdc++-v3/include/bits/localefwd.h=0A+++=20= b/libstdc++-v3/include/bits/localefwd.h=0A@@=20-108,6=20+108,7=20@@=20= _GLIBCXX_BEGIN_NAMESPACE_VERSION=0A=20=20=20=20=20isgraph(_CharT,=20= const=20locale&);=0A=20=0A=20#if=20__cplusplus=20>=3D=20201103L=0A+=20=20= #undef=20isblank=0A=20=20=20template=0A=20=20=20=20=20= bool=0A=20=20=20=20=20isblank(_CharT,=20const=20locale&);=0A--=20=0A= 2.25.1=0A=0A= --Apple-Mail=_D8F7FC57-2C1F-4084-A3BC-DE99A67EE8D4--