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

Summary: Android codebase is not C89 clean which makes it harder to build (Fix patch included)
Product: SDL Reporter: Eric wing <ewmailing>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.4   
Hardware: All   
OS: Android (All)   

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.