-
Notifications
You must be signed in to change notification settings - Fork 212
Define _POSIX_C_SOURCE globally and detect supported warnings #402
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
Conversation
Other Sway projects have switched to this approach.
Let's not require the C compiler to support specific warnings, especially if half the flags are used to turn off the warnings anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fwiw, on OpenBSD i had to revert this/drop the define from meson.build, as having POSIX_SOURCE defined disables |
#325 is not merged. |
see https://github.com/swaywm/swaylock/releases/tag/v1.8.1 and https://github.com/swaywm/swaylock/releases/tag/v1.8.2 drop -D_POSIX_C_SOURCE=200809L from CFLAGS as it disables __BSD_VISIBLE which hides explicit_bzero(). cf swaywm/swaylock#402
i know, it stalled. I'm just saying that this PR creates issues with it :) |
The OpenBSD backend should use |
@kennylevinsen thanks, that also works. I'll try to unstall #325 someday.. |
see https://github.com/swaywm/swaylock/releases/tag/v1.8.1 and https://github.com/swaywm/swaylock/releases/tag/v1.8.2 drop -D_POSIX_C_SOURCE=200809L from CFLAGS as it disables __BSD_VISIBLE which hides explicit_bzero(). cf swaywm/swaylock#402
Define _POSIX_C_SOURCE globally
Other Sway projects have switched to this approach.
build: use cc.get_supported_arguments() for warnings
Let's not require the C compiler to support specific warnings,
especially if half the flags are used to turn off the warnings
anyways.