mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH v2] prevent from redefining __STDC_UTF_{16,32}__ macros
@ 2024-01-25 14:14 Jules Maselbas
  0 siblings, 0 replies; only message in thread
From: Jules Maselbas @ 2024-01-25 14:14 UTC (permalink / raw)
  To: musl; +Cc: Jules Maselbas

Undefine any previous __STDC_UTF_{16,32}__ macros before defining
them to prenvent any warnings of redefining macros.

 - 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
+#undef __STDC_UTF_16__
 #define __STDC_UTF_16__ 1
+#undef __STDC_UTF_32__
 #define __STDC_UTF_32__ 1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-25 14:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25 14:14 [musl] [PATCH v2] prevent from redefining __STDC_UTF_{16,32}__ macros Jules Maselbas

Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).