-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Dillo strictly compliant with C90, C++11 and POSIX-2001 #232
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ae0e243
to
0fac879
Compare
0d55a54
to
f59f883
Compare
e316ebd
to
a60b13a
Compare
Reviewed-by: dogma
Reviewed-by: dogma
It is used by nanosvg library Reviewed-by: dogma
Reviewed-by: dogma
Reviewed-by: dogma
Reviewed-by: dogma
Reviewed-by: dogma
Reviewed-by: dogma
Reviewed-by: dogma
Instead use inet_addr("127.0.0.1") which is POSIX 2001 and also more clear. Reviewed-by: dogma
The strdup function is not available in POSIX-2001, so we use our own implementation in dlib: dStrdup. Reviewed-by: dogma
Reviewed-by: dogma
Reviewed-by: dogma
Reviewed-by: dogma Tested-by: Alex (on OpenBSD)
Also add missing hyphens on previous entries.
While we still require C++11 for the macros, there is no need to add another dependency for this case. Reported-by: dogma
01c6dfa
to
d6e9b4e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes the default flags in CFLAGS and CXXFLAGS to enable pedantic warnings and making Dillo strictly compliant with C90, C++11 and POSIX-2001.
Several non-portable code had to be modified to either use dlib functions or alternative portable functions.
Additionally, in the CI we enable
-Werror
so any pedantic warning makes the pipeline fail. It is important to allow other compilers to add pedantic warnings without breaking the build for users.We can lower the C++11 to C++03 by getting rid of the macros, but it doesn't seem to be worth it for now.
Fixes #217 #218