Pass POSIX_C_SOURCE for std::alligned_alloc try_compile checks#1896
Pass POSIX_C_SOURCE for std::alligned_alloc try_compile checks#1896Dead2 merged 1 commit intozlib-ng:developfrom
Conversation
WalkthroughThe pull request updates the build configuration in Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1896 +/- ##
===========================================
+ Coverage 82.85% 83.42% +0.56%
===========================================
Files 144 144
Lines 12946 12950 +4
Branches 2855 2858 +3
===========================================
+ Hits 10727 10804 +77
+ Misses 1248 1198 -50
+ Partials 971 948 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Actually, this should be changed in Configure as well, so they are kept in sync. @cvijdea-bd Would you mind adding the defines to Configure as well? Line 730 in e88471f Line 751 in e88471f |
On FreeBSD 11, definining POSIX_C_SOURCE to a lower level has the efect of inhibiting the language level (__ISO_C_VISIBLE ) to be lower than C11, even in the presence of -std=c11 Since the check_symbol_exists runs without setting POSIX_C_SOURCE, this means that we will spuriously define HAVE_ALIGNED_ALLOC, while in the actual build it is not going to be defined ref: https://github.com/freebsd/freebsd-src/blob/stable/11/sys/sys/cdefs.h#L738
ca4e85a to
0a2c0cc
Compare
|
Yes that makes sense, I pushed the modified commit |
On FreeBSD 11, defining POSIX_C_SOURCE to a lower level has the efect of inhibiting the language level (__ISO_C_VISIBLE) to be lower than C11, even in the presence of -std=c11
Since the check_symbol_exists runs without setting POSIX_C_SOURCE, this means that we will spuriously define HAVE_ALIGNED_ALLOC, while in the actual build it is not going to be defined
ref: https://github.com/freebsd/freebsd-src/blob/stable/11/sys/sys/cdefs.h#L738
Summary by CodeRabbit
Our system's build process has been updated to improve compatibility and stability regarding memory allocation handling.