Skip to content
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

Macro housekeeping #448

Closed

Conversation

notpeelz
Copy link
Contributor

@notpeelz notpeelz commented May 7, 2024

  1. I removed feature test macro definitions (i.e _GNU_SOURCE/_XOPEN_SOURCE) from polkitbackend because _GNU_SOURCE is already defined in the root meson.build.
    Explicitly defining _XOPEN_SOURCE is redundant because _GNU_SOURCE implies _XOPEN_SOURCE 700 (according to the comments in glibc's features.h)

  2. I simplified the handling of config.h; instead of having #include "config.h" in every file, we can use the compiler's -include option to do that for us
    I had to bump the meson version requirement to >=1.4.0 to use the file.full_path() API.

  3. I moved the -std=c99 flag to the project's default_options, as it appears to have been fixed (Make compilers list per subproject mesonbuild/meson#10170)

@notpeelz notpeelz force-pushed the dont-redefine-feature-test-macros branch 2 times, most recently from 57d7d97 to 8df0908 Compare May 7, 2024 21:12
@notpeelz notpeelz changed the title Don't redefine feature test macros in polkitbackend Macro housekeeping May 7, 2024
@notpeelz notpeelz force-pushed the dont-redefine-feature-test-macros branch from 8df0908 to e39276e Compare May 7, 2024 21:45
- Don't redefine _GNU_SOURCE/_XOPEN_SOURCE in polkitbackend
- Define _GNU_SOURCE via compiler options (instead of config.h)
- Include config.h globally via compiler options
- Bump meson version requirement to >= 1.4.0
@notpeelz notpeelz force-pushed the dont-redefine-feature-test-macros branch from e39276e to 9a38d32 Compare May 9, 2024 18:04
@vmihalko
Copy link
Collaborator

Hello, thank you for your contributions! Could you please create a separate PR for each change (item in your description)?

@notpeelz
Copy link
Contributor Author

I initially had them as separate commits, but decided to squash them because the changes are tightly coupled.
I'll try to split them into stacked PRs.

@notpeelz notpeelz closed this May 17, 2024
@notpeelz notpeelz deleted the dont-redefine-feature-test-macros branch May 17, 2024 17:09
@notpeelz
Copy link
Contributor Author

Change #2 split into #454
Change #1 split into #455 (depends on #454)

I'll make a new PR for change #3 once #454 is merged, so to avoid unnecessary merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants