-
Notifications
You must be signed in to change notification settings - Fork 130
FreeBSD: Gate GNU-only API #1183
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,7 +136,7 @@ func spawnExecutable( | |
| // standardized in POSIX.1-2024 (see https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_spawn_file_actions_adddup2.html | ||
| // and https://www.austingroupbugs.net/view.php?id=411). | ||
| _ = posix_spawn_file_actions_adddup2(fileActions, fd, fd) | ||
| #if canImport(Glibc) | ||
| #if canImport(Glibc) && !os(FreeBSD) && !os(OpenBSD) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think of some DeMorgan?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's equivalent. ¯\_(ツ)_/¯
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's here is how I would have typed it. Although now it's annoying me and I'd probably rewrite the whole line as
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then you might have issues for musl platforms :) In any event: given the 6.2 branch has this problem as well, I'd suggest improving the form of the conditional in a separate pr may be more pragmatic, however.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't win!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With CMake, we can ask it to tell us if the symbol is available and define the macro that way. https://cmake.org/cmake/help/v4.1/module/CheckSymbolExists.html
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's probably not worth the effort—this is mostly me griping about the module name. |
||
| if _slowPath(glibcVersion.major < 2 || (glibcVersion.major == 2 && glibcVersion.minor < 29)) { | ||
| // This system is using an older version of glibc that does not | ||
| // implement FD_CLOEXEC clearing in posix_spawn_file_actions_adddup2(), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.