public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] sys/_bitset.h: Fix fall-out from commit 5e04571cf3c Date: Fri, 24 Jun 2022 05:43:39 +0000 (GMT) [thread overview] Message-ID: <20220624054339.CDD453854160@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6af6e295529bb2ba9941e7f3d7938799a668e5f6 commit 6af6e295529bb2ba9941e7f3d7938799a668e5f6 Author: Stefan Eßer <se@FreeBSD.org> Date: Wed Dec 8 08:47:42 2021 +0100 sys/_bitset.h: Fix fall-out from commit 5e04571cf3c The changes to the bitset macros allowed sched.h to be included into userland programs without name space pollution due to BIT_* and BITSET_* macros. The definition of a "struct bitset" had been overlooked. This name space pollution caused the build of port print/miktex to fail. This commit makes the definition of struct bitset depend on the same condition as the visibility of the BIT_* and BITSET_* macros, i.e. needs _KERNEL or _WANT_FREEBSD_BITSET to be defined before including sys/_bitset.h. It has been tested with "make universe" since a prior attempt to fix the issue broke the PowerPC64 kernel build. This commit shall be MFCed together with commit 5e04571cf3c. Reported by: arrowd MFC after: 1 month Diff: --- newlib/libc/sys/rtems/include/sys/_bitset.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/newlib/libc/sys/rtems/include/sys/_bitset.h b/newlib/libc/sys/rtems/include/sys/_bitset.h index 1c167daf3..70b9713ff 100644 --- a/newlib/libc/sys/rtems/include/sys/_bitset.h +++ b/newlib/libc/sys/rtems/include/sys/_bitset.h @@ -52,7 +52,7 @@ struct _t { \ /* * Helper to declare a bitset without it's size being a constant. * - * Sadly we cannot declare a bitset struct with '__bits[]', because it's + * Sadly we cannot declare a bitset struct with 'bits[]', because it's * the only member of the struct and the compiler complains. */ #define __BITSET_DEFINE_VAR(_t) __BITSET_DEFINE(_t, 1) @@ -61,11 +61,12 @@ struct _t { \ * Define a default type that can be used while manually specifying size * to every call. */ -__BITSET_DEFINE(bitset, 1); #if defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET) +__BITSET_DEFINE(bitset, 1); + #define BITSET_DEFINE(_t, _s) __BITSET_DEFINE(_t, _s) #define BITSET_DEFINE_VAR(_t) __BITSET_DEFINE_VAR(_t) -#endif +#endif /* defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET) */ #endif /* !_SYS__BITSET_H_ */
next reply other threads:[~2022-06-24 5:43 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-24 5:43 Sebastian Huber [this message] -- strict thread matches above, loose matches on Subject: below -- 2022-06-24 5:43 Sebastian Huber 2022-06-24 5:43 Sebastian Huber
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220624054339.CDD453854160@sourceware.org \ --to=sh@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).