Skip to content

Fix: Don't try to redefine bool on C99 and higher #99

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

Merged
merged 1 commit into from
May 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions extract-xiso.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,7 @@
#endif


#if ! defined( __cplusplus ) && ! defined( bool )
typedef int bool;
enum { false, true };
#endif

#include <stdbool.h>
Copy link
Member

@mborgerson mborgerson May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just drop all the checks and just use stdbool.h? Do we care about supporting ancient C versions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how the situation is on Windows/MSVC, I know it didn't support modernish C versions in the past, so this was the easiest thing to do without having to fire up a Windows installation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI builds on Windows with msvc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it works

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thx


#ifndef nil
#define nil 0
Expand Down