From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id A70AE28E97 for ; Mon, 26 Feb 2024 03:17:45 +0100 (CET) Received: (qmail 31746 invoked by uid 550); 26 Feb 2024 02:14:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 30687 invoked from network); 26 Feb 2024 02:14:12 -0000 Date: Sun, 25 Feb 2024 21:17:50 -0500 From: Rich Felker To: Jules Maselbas Cc: musl@lists.openwall.com Message-ID: <20240226021749.GG4163@brightrain.aerifal.cx> References: <20240125141440.13906-1-jmaselbas@zdiv.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240125141440.13906-1-jmaselbas@zdiv.net> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH v2] prevent from redefining __STDC_UTF_{16,32}__ macros On Thu, Jan 25, 2024 at 03:14:40PM +0100, Jules Maselbas wrote: > Undefine any previous __STDC_UTF_{16,32}__ macros before defining > them to prenvent any warnings of redefining macros. > > --- > v2: > - changed `#if !define(...)` guard to `#undef`, as suggested by Rich Felker > > I encountered this "issue" trying to compile a program with the -isystem > option to override toolchain/installed musl headers with one from source. > > include/stdc-predef.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/stdc-predef.h b/include/stdc-predef.h > index af1a2799..5ccd884d 100644 > --- a/include/stdc-predef.h > +++ b/include/stdc-predef.h > @@ -7,7 +7,10 @@ > #define __STDC_IEC_559__ 1 > #endif > > +#undef __STDC_UTF_16__ > #define __STDC_UTF_16__ 1 > + > +#undef __STDC_UTF_32__ > #define __STDC_UTF_32__ 1 > > #endif > -- > 2.43.0 I merged this, but now gcc warns about undefining them if system header warnings aren't suppressed. I'm not sure what the justification is for that... *sigh* Rich