Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stdbool.h istead of redefining bool #1053

Merged
merged 1 commit into from
Jan 6, 2021

Conversation

xyproto
Copy link
Contributor

@xyproto xyproto commented Jan 5, 2021

Hi,

I'm maintaining the geany-plugins package for Arch Linux.

When compiling the latest version of geany-plugins, I get this error:

PrettyPrinter.h:55:22: error: two or more data types in declaration specifiers
   55 | typedef unsigned int bool;
      |                      ^~~~

Including <stdbool.h> and removing the typdef for bool solves this issue.

Tested on GCC 10.2.0.

Thanks for creating and maintaining Geany and Geany Plugins! They are both pretty sweet and usually unproblematic to package.

Fixes #1023

Redefining bool causes errors when used together with ie. GCC 10.2.0
@elextr
Copy link
Member

elextr commented Jan 5, 2021

Seems reasonable to me, stdbool.h is a C99 header and HACKING says use C99, although I am curious what just changed that made it suddenly not compile?

@b4n what say you oh ancient C guru?

@codebrainz
Copy link
Member

codebrainz commented Jan 5, 2021

I believe this is a dupe of is a fix for #1023.

[Apologies for the edits, was trying to get the keyword link to work, needs to be in description as above]

@frlan frlan merged commit 7c540bf into geany:master Jan 6, 2021
@xyproto xyproto deleted the no-redefine-bool branch January 6, 2021 12:42
g4s8 added a commit to g4s8/void-packages that referenced this pull request Oct 15, 2021
g4s8 added a commit to g4s8/void-packages that referenced this pull request Oct 16, 2021
Applied patch from PR geany/geany-plugins#1053
to fix compilation issue void-linux#33568

Fixes: void-linux#33568
q66 pushed a commit to void-linux/void-packages that referenced this pull request Oct 16, 2021
Applied patch from PR geany/geany-plugins#1053
to fix compilation issue #33568

Fixes: #33568
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build error with 1.37 release
4 participants