Uh oh!
There was an error while loading. Please reload this page.
gh-123797: Check for runtime availability of ptsname_r on macos - #123806
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| #else | ||
| // unknown error: | ||
| // both ptsname_r and ptsname are not available for some reason. | ||
| ret = -1; |
There was a problem hiding this comment.
This is a "cannot happen" case: ptsname is available on all versions of macOS where configure detects ptsname_r.
I'd either drop drop the guard for the block above or replace this bit by an #error.
(And regardless ret = -1 is wrong, the value should be an errno value such as ENOSYS).
There was a problem hiding this comment.
Done, thanks for the review! 👍
There was a problem hiding this comment.
This is a "cannot happen" case: ptsname is available on all versions of macOS where configure detects ptsname_r.
Is there a macOS or iOS platform where ptsname() and ptsname_r() are not available?
There was a problem hiding this comment.
Is there a macOS or iOS platform where ptsname() and ptsname_r() are not available?
In short, no.
ptsname_r() is available on macOS 10.13.4 and iOS 11.3 (and later), ptsname() has been available from the start. Or at least, there are no availability annotations in Apple's headers which is a good indication that the API was available from the start.
When you're done making the requested changes, leave the comment: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Done, thanks a lot, @vstinner, for the helpful suggestions! 👍 |
sobolevn
commented
Sep 10, 2024
I will wait for @ronaldoussoren's feedback for a ~week and then merge 👍 |
sobolevn
commented
Sep 20, 2024
One week has passed (why the time is so fast?), so I am merging this. |
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…os (pythonGH-123806) (cherry picked from commit 3e36e5a) Co-authored-by: sobolevn <mail@sobolevn.me>
GH-124270 is a backport of this pull request to the 3.13 branch. |
I took the version info from https://github.com/xybp888/iOS-SDKs/blob/d7f1be9f5b79cffcfb547bbd930f92ec0fc35038/iPhoneOS13.0.sdk/usr/include/stdlib.h#L224
ptsname_ris not checked at runtime on macOS #123797