From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id CDD453854160; Fri, 24 Jun 2022 05:43:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDD453854160 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] sys/_bitset.h: Fix fall-out from commit 5e04571cf3c X-Act-Checkin: newlib-cygwin X-Git-Author: =?utf-8?q?Stefan_E=C3=9Fer?= X-Git-Refname: refs/heads/master X-Git-Oldrev: 3af17aef2b0391a9b58f03f7e37e14aed4f9cdfd X-Git-Newrev: 6af6e295529bb2ba9941e7f3d7938799a668e5f6 Message-Id: <20220624054339.CDD453854160@sourceware.org> Date: Fri, 24 Jun 2022 05:43:39 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2022 05:43:39 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D6af6e295529= bb2ba9941e7f3d7938799a668e5f6 commit 6af6e295529bb2ba9941e7f3d7938799a668e5f6 Author: Stefan E=C3=9Fer Date: Wed Dec 8 08:47:42 2021 +0100 sys/_bitset.h: Fix fall-out from commit 5e04571cf3c =20 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. =20 The definition of a "struct bitset" had been overlooked. This name space pollution caused the build of port print/miktex to fail. =20 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. =20 It has been tested with "make universe" since a prior attempt to fix the issue broke the PowerPC64 kernel build. =20 This commit shall be MFCed together with commit 5e04571cf3c. =20 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); =20 #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) */ =20 #endif /* !_SYS__BITSET_H_ */