This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kulikjak
Recipients jbeck, jcea, kulikjak, python-dev, r.david.murray, risto3, wiz
Date 2020-11-09.13:17:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604927843.65.0.194853213092.issue19561@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-11-09 13:17:23kulikjaksetrecipients: + kulikjak, jcea, r.david.murray, wiz, python-dev, risto3, jbeck
2020-11-09 13:17:23kulikjaksetmessageid: <1604927843.65.0.194853213092.issue19561@roundup.psfhosted.org>
2020-11-09 13:17:23kulikjaklinkissue19561 messages
2020-11-09 13:17:22kulikjakcreate