Skip to content

Use stdbool.h for booleans#660

Merged
smcv merged 1 commit intocontainers:mainfrom
smcv:stdbool
Oct 8, 2024
Merged

Use stdbool.h for booleans#660
smcv merged 1 commit intocontainers:mainfrom
smcv:stdbool

Conversation

@smcv
Copy link
Collaborator

@smcv smcv commented Oct 3, 2024

We don't need to reinvent these, especially in a confusing form (bool type like stdbool.h, but TRUE and FALSE constants like GLib). stdbool.h was available in the gcc 4.6 that is the default compiler in Ubuntu 12.04, more than a decade ago, so it seems sufficiently ubiquitous.

cc @refi64

@swick
Copy link
Contributor

swick commented Oct 7, 2024

Don't see any problem with it.

We don't need to reinvent these, especially in a confusing form
(bool type like stdbool.h, but TRUE and FALSE constants like GLib).
stdbool.h was available in the gcc 4.6 that is the default compiler in
Ubuntu 12.04, more than a decade ago, so it seems sufficiently
ubiquitous.

Signed-off-by: Simon McVittie <[email protected]>
@smcv smcv merged commit 50cdea6 into containers:main Oct 8, 2024
smcv pushed a commit to rhendric/bubblewrap that referenced this pull request Oct 15, 2024
This commit adds --overlay, --tmp-overlay, --ro-overlay, and
--overlay-src options to enable bubblewrap to create overlay mounts.
These options are only permitted when bubblewrap is not installed
setuid.

Resolves: containers#412
Co-authored-by: William Manley <[email protected]>
Signed-off-by: Ryan Hendrickson <[email protected]>
[smcv: Fix merge conflicts with containers#660]
Signed-off-by: Simon McVittie <[email protected]>
rhendric added a commit to rhendric/bubblewrap that referenced this pull request Oct 15, 2024
This commit adds --overlay, --tmp-overlay, --ro-overlay, and
--overlay-src options to enable bubblewrap to create overlay mounts.
These options are only permitted when bubblewrap is not installed
setuid.

Resolves: containers#412
Co-authored-by: William Manley <[email protected]>
Signed-off-by: Ryan Hendrickson <[email protected]>
[smcv: Fix merge conflicts with containers#660]
Signed-off-by: Simon McVittie <[email protected]>
rhendric added a commit to rhendric/bubblewrap that referenced this pull request Oct 15, 2024
This commit adds --overlay, --tmp-overlay, --ro-overlay, and
--overlay-src options to enable bubblewrap to create overlay mounts.
These options are only permitted when bubblewrap is not installed
setuid.

Resolves: containers#412
Co-authored-by: William Manley <[email protected]>
Signed-off-by: Ryan Hendrickson <[email protected]>
[smcv: Fix merge conflicts with containers#660]
Signed-off-by: Simon McVittie <[email protected]>
markyang92 added a commit to markyang92/meta-openembedded that referenced this pull request Apr 8, 2025
* backport fix from:
  containers/bubblewrap#660
  But patch rework for this version.
  In gcc 15, bool became a reserved keyword in C23, causing conflicts with our custom bool definition.

  See also, https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212

* to fix:
  http://errors.yoctoproject.org/Errors/Details/851183/
  ../bubblewrap-0.10.0/utils.h:46:13: error: 'bool' cannot be defined via 'typedef'
   46 | typedef int bool;
      |             ^~~~
Signed-off-by: mark.yang <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Apr 8, 2025
* backport fix from:
  containers/bubblewrap#660
  But patch rework for this version.
  In gcc 15, bool became a reserved keyword in C23, causing conflicts with our custom bool definition.

  See also, https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212

* to fix:
  http://errors.yoctoproject.org/Errors/Details/851183/
  ../bubblewrap-0.10.0/utils.h:46:13: error: 'bool' cannot be defined via 'typedef'
   46 | typedef int bool;
      |             ^~~~

Signed-off-by: mark.yang <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants