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 4338

Summary: Add and update include guards
Product: SDL Reporter: janisozaur <janisozaur+libsdl>
Component: buildAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: janisozaur+libsdl
Version: 2.0.9   
Hardware: x86_64   
OS: Linux   
Attachments: 0001-Add-and-update-include-guards.patch
0001-Add-and-update-include-guards.patch
0002-Rename-files-meant-to-be-included-multiple-times.patch

Description janisozaur 2018-10-28 18:53:00 UTC
Created attachment 3406 [details]
0001-Add-and-update-include-guards.patch

Include guards in most changed files were missing, I added them keeping
the same style as other SDL files. In some cases I moved the include
guards around to be the first thing the header has to take advantage of
any possible improvements compiler may have for inclusion guards.
Comment 1 janisozaur 2018-10-28 20:44:37 UTC
Created attachment 3407 [details]
0001-Add-and-update-include-guards.patch

V1 was too eager and guarded too many files. This patch fixes that.
Comment 2 janisozaur 2018-10-28 20:46:16 UTC
Created attachment 3408 [details]
0002-Rename-files-meant-to-be-included-multiple-times.patch

As a way of addressing the need for header files to contain an include guard, but some files need to be explicitly included multiple times, rename such special files to reflect that need.
Comment 3 Sam Lantinga 2018-10-28 21:25:23 UTC
The include guards patch is in:
https://hg.libsdl.org/SDL/rev/c46e72bd9950

The other patch we can evaluate after 2.0.9 ships.
Comment 4 janisozaur 2018-10-28 21:37:21 UTC
Thanks!