Message380584
I think this code should be removed.
It was added in its current form more than 20 years ago with the intention to add function declarations missing from system include files:
https://github.com/python/cpython/commit/1e0c2f4bee43728930bd5f4dc77283f09c4ba004
Today, every Solaris system should have gethostname() available in unistd.h. I am not sure when exactly was it added, but it was available in the OpenSolaris since the first commit (year 2005):
https://github.com/illumos/illumos-gate/blame/master/usr/src/head/unistd.h#L344
Also, AFAIK, 'SOLARIS' macro is not predefined on Solaris systems in compiler preprocessors today *; hence, unless compiled with `-DSOLARIS`, this code has no effect.
*) I tested this with several GCC [7|9|10] and Solaris studio and neither of those defined it. It seems like it might have worked many years ago, but it certainly isn't a way to #ifdef Solaris today. |
|
Date |
User |
Action |
Args |
2020-11-09 13:17:23 | kulikjak | set | recipients:
+ kulikjak, jcea, r.david.murray, wiz, python-dev, risto3, jbeck |
2020-11-09 13:17:23 | kulikjak | set | messageid: <1604927843.65.0.194853213092.issue19561@roundup.psfhosted.org> |
2020-11-09 13:17:23 | kulikjak | link | issue19561 messages |
2020-11-09 13:17:22 | kulikjak | create | |
|