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,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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 5BEC2246A0 for ; Thu, 25 Jan 2024 15:07:22 +0100 (CET) Received: (qmail 25909 invoked by uid 550); 25 Jan 2024 14:05:10 -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 25874 invoked from network); 25 Jan 2024 14:05:09 -0000 Date: Thu, 25 Jan 2024 09:07:25 -0500 From: Rich Felker To: Jules Maselbas Cc: musl@lists.openwall.com Message-ID: <20240125140724.GH4163@brightrain.aerifal.cx> References: <20240125120954.13578-1-jmaselbas@zdiv.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240125120954.13578-1-jmaselbas@zdiv.net> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH] prevent from redefining __STDC_UTF_{16,32}__ macros On Thu, Jan 25, 2024 at 01:09:54PM +0100, Jules Maselbas wrote: > --- > 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 | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/stdc-predef.h b/include/stdc-predef.h > index af1a2799..642bad2d 100644 > --- a/include/stdc-predef.h > +++ b/include/stdc-predef.h > @@ -7,7 +7,12 @@ > #define __STDC_IEC_559__ 1 > #endif > > +#if !defined(__STDC_UTF_16__) > #define __STDC_UTF_16__ 1 > +#endif > + > +#if !defined(__STDC_UTF_32__) > #define __STDC_UTF_32__ 1 > +#endif > > #endif > -- > 2.43.0 This should probably be #undef rather than #if !defined, so we ensure that they have the correct values even if something was done to mess them up. I'm kinda confused how this happened though. With -isystem rather than -I, they should still be treated as system headers immune to warnings. But it may be a good change anyway since redefinition is disallowed by the language. Rich