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 3264 - Android codebase is not C89 clean which makes it harder to build (Fix patch included)
Summary: Android codebase is not C89 clean which makes it harder to build (Fix patch i...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.4
Hardware: All Android (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-18 23:31 UTC by Eric wing
Modified: 2016-02-19 05:34 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 Eric wing 2016-02-18 23:31:16 UTC
Building Android is a PITA. A recent thread on the mailing list came up about this.
[SDL] SDL2 + CMake + Android (on Windows)

The crux is that the Android code base has C99-isms and isn't C89 clean. There might have been a compile-warnings-as-errors flag added recently to the CMakeLists.txt which might be why nobody cared before. 

But the real problem is that gcc with Android still defaults to C89 mode. And often people are hacking the build system to get Android working, so this issue might keep coming up over and over.

I propose we just fix the codebase to be C89 clean.
Here is a link to a repo I made with a cleaned up codebase:
https://bitbucket.org/ewing/sdl_androidclean

I request it be mainlined.
Comment 1 Ryan C. Gordon 2016-02-19 05:34:57 UTC
This is now https://hg.libsdl.org/SDL/rev/426de7645465 plus a few merge commits, thanks!

--ryan.