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 3200 - CMAKE: STDC_HEADERS is not defined except for msvc [patch]
Summary: CMAKE: STDC_HEADERS is not defined except for msvc [patch]
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.1
Hardware: All All
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.4
Depends on:
Blocks:
 
Reported: 2015-12-06 10:29 UTC by Martin Gerhardy
Modified: 2016-01-01 06:06 UTC (History)
1 user (show)

See Also:


Attachments
the patch for the cmake file (617 bytes, patch)
2015-12-06 10:29 UTC, Martin Gerhardy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Gerhardy 2015-12-06 10:29:52 UTC
Created attachment 2330 [details]
the patch for the cmake file

This leads to all kind of weird issues - but on most platforms to compile errors in SDL_stdinc.h because wchar_t is defined in stddef.h
Comment 1 Ryan C. Gordon 2015-12-29 05:30:17 UTC
This is defined for non-MSVC targets in the else() block:

check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" STDC_HEADERS)

What platform was this failing on? I could see this failing for, say, MingW, which I presume doesn't offer dlfcn.h.

--ryan.
Comment 2 Ryan C. Gordon 2015-12-29 06:00:34 UTC
(In reply to Ryan C. Gordon from comment #1)
> What platform was this failing on? I could see this failing for, say, MingW,
> which I presume doesn't offer dlfcn.h.

Just discovered from Bug #3194 that this was probably an Android problem, right? We might just need to special-case that list of headers. I don't think we want to turn on STDC_HEADERS universally.

--ryan.
Comment 3 Martin Gerhardy 2015-12-29 06:27:57 UTC
yes. was an android issue
Comment 4 Ryan C. Gordon 2015-12-31 08:17:58 UTC
(In reply to Martin Gerhardy from comment #3)
> yes. was an android issue

Is it float.h that's missing?

--ryan.
Comment 5 Martin Gerhardy 2015-12-31 10:14:17 UTC
Weird, but i'm not able to reproduce this anymore. I've tried mingw64_32, emscripten and android ndk. Unfortunately I didn't document which version and which platform it was - so I retested all of them. But i've updated emscripten and the ndk in the meanwhile. So I would say, just close this one and if I ever encounter it again, I will document the stuff properly.
Comment 6 Ryan C. Gordon 2016-01-01 06:06:16 UTC
Marking fixed, then...reopen if it pops up again!

--ryan.