Skip to content

Android codebase is not C89 clean which makes it harder to build (Fix patch included) #2103

@SDLBugzilla

Description

@SDLBugzilla

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.4
Reported for operating system, platform: Android (All), All

Comments on the original bug report:

On 2016-02-18 23:31:16 +0000, Eric wing wrote:

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.

On 2016-02-19 05:34:57 +0000, Ryan C. Gordon wrote:

This is now https://hg.libsdl.org/SDL/rev/426de7645465 plus a few merge commits, thanks!

--ryan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions