We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4392 - SDL_cpuinfo.h breaks compilation with C bool type
Summary: SDL_cpuinfo.h breaks compilation with C bool type
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: PowerPC Linux
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-20 03:35 UTC by Luke Dashjr
Modified: 2018-11-20 05:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Dashjr 2018-11-20 03:35:11 UTC
Bug 3993 was "fixed" by #undef'ing bool. But this breaks C99's stdbool.h bool too.

For example, mpv's build fails with:

../audio/out/ao_sdl.c:35:5: error: unknown type name ‘bool’

It seems ill-advised to be #undef'ing *anything* here - what if the code including SDL_cpuinfo.h actually wants to use altivec?

I also don't understand why altivec.h is included in this header at all. It doesn't seem to use it?
Comment 1 Sam Lantinga 2018-11-20 05:29:17 UTC
Good points. This is fixed, thanks!
https://hg.libsdl.org/SDL/rev/6da95eef84a2