Uh oh!
There was an error while loading. Please reload this page.
gh-78469: Declare missing sethostname for Solaris 10 - #109447
Conversation
| #ifdef _AIX | ||
| /* issue #18259, not declared in any useful header file */ | ||
| #if defined(_AIX) || (defined(__sun) && defined(__SVR4) && SUNOS_VERSION == 510) |
There was a problem hiding this comment.
wow, that's very spefic. It was available before and after, but not at version 510? :-)
| # in most compilers, so we define one here. | ||
| SUNOS_VERSION=`echo $ac_sys_release | tr -d '.'` | ||
| AC_DEFINE_UNQUOTED([SUNOS_VERSION], [$SUNOS_VERSION], | ||
| [The version of SunOS/Solaris as reported by `uname -r' without the dot.]) |
There was a problem hiding this comment.
How do you distinguish Solaris 5.10 and Solaris 51.0?
Maybe multiply the major version by 100 or 1000? or use a shift of 8 bits? The usage would be:
major = VERSION >> 8
minor = VERSION & 255
The disavantage is the need to write versions in hexadecimal :-(
There was a problem hiding this comment.
@erlend-aasland: Should we prefix new pyconfig.h constants by Py_ ? see: capi-workgroup/problems#46
There was a problem hiding this comment.
I think we should follow the PEP-7 recommendations: https://peps.python.org/pep-0007/#naming-conventions
There was a problem hiding this comment.
How do you distinguish Solaris 5.10 and Solaris 51.0?
I see what you mean, but that's not happening. The leading 5 was dropped from the name 25 years ago and while e.g. uname and compilation targets still use it, nobody today calls it Solaris/SunOS 5.10; only Solaris 10. If we ever release Solaris 51, uname -r should report it as 5.51.
That said, I am not strongly against changing it if you still prefer your suggestion.
I think we should follow the PEP-7 recommendations: https://peps.python.org/pep-0007/#naming-conventions
Thanks, I missed that. It's fixed now.
vstinner
commented
Sep 15, 2023
When was Solaris 10 release? Is it still supported? Does this change better to forks of Solaris? |
kulikjak
commented
Oct 5, 2023
Sorry for such a long delay. As mentioned in the issue, Solaris 10, while in the "extended support stage" intended mostly for critical fixes, is still supported (ATM at least until January 2025). There are still people using it and possibly installing newer Python onto it. As for the Solaris forks, this doesn't affect those because the first open version was Solaris 11. |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <vstinner@python.org>
erlend-aasland
commented
Oct 6, 2023
Is this a bug-fix? If so, we should backport it and add a NEWS entry. |
vstinner
commented
Oct 6, 2023
Do you use "make regen-configure"? See: https://docs.python.org/dev/using/configure.html#generated-files @kulikjak: Anyway, I push directly into your branch to fix the configure script (regenerate it). |
Uh oh!
There was an error while loading. Please reload this page.
vstinner
commented
Oct 6, 2023
@kulikjak: I also replaced |
Sigh, sorry. Normally, I do, but this time I thought that I could quickly edit it myself, ... and I was wrong. Thanks for fixing it.
I guess it is (fixing a build on Solaris <= 10). I can add a NEWS entry, although now there is a Other than that, the build failure doesn't seem to be related, so that's good. |
miss-islington
commented
Oct 9, 2023
GH-110580 is a backport of this pull request to the 3.12 branch. |
GH-110581 is a backport of this pull request to the 3.11 branch. |
bedevere-bot
commented
Oct 9, 2023
|
…9447) Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
As discussed in the issue,
sethostnameis missing from Solaris 10 headers but is available on Solaris 11.And because there isn't an OS version specific macro for Solaris, I had to "create" one.