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 - Add and update include guards
Summary: Add and update include guards
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.9
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-28 18:53 UTC by janisozaur
Modified: 2018-10-28 21:37 UTC (History)
1 user (show)

See Also:


Attachments
0001-Add-and-update-include-guards.patch (23.92 KB, patch)
2018-10-28 18:53 UTC, janisozaur
Details | Diff
0001-Add-and-update-include-guards.patch (22.40 KB, patch)
2018-10-28 20:44 UTC, janisozaur
Details | Diff
0002-Rename-files-meant-to-be-included-multiple-times.patch (85.09 KB, patch)
2018-10-28 20:46 UTC, janisozaur
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!