Skip to content
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

gh-108765: Remove old prototypes from pyport.h #108782

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 1, 2023

Move prototypes of gethostname(), _getpty() and struct termios from pyport.h to the C code using them: posixmodule.c, socketmodule.c and termios.c.

Replace "#ifdef SOLARIS" with "#ifdef __sun".

Move prototypes of gethostname(), _getpty() and struct termios from
pyport.h to the C code using them: posixmodule.c, socketmodule.c and
termios.c.

Replace "#ifdef SOLARIS" with "#ifdef __sun".
@vstinner
Copy link
Member Author

vstinner commented Sep 2, 2023

Buildbots are happy with this change: #108784

@vstinner vstinner merged commit 1f3e797 into python:main Sep 2, 2023
22 checks passed
@vstinner vstinner deleted the prototypes branch September 2, 2023 13:46
@vstinner
Copy link
Member Author

vstinner commented Sep 2, 2023

@kulikjak: It would be nice if you can double check the Solaris change:

Replace "#ifdef SOLARIS" with "#ifdef __sun".

@kulikjak
Copy link
Contributor

kulikjak commented Sep 2, 2023

Hi @vstinner, can you, please, remove this part completely? There is already and issue and PR for this that is forgotten a little:
#63760
#23208

As mentioned there, gethostname() is defined now and both Oracle Solaris and OpenSolaris forks remove it:
https://github.com/oracle/solaris-userland/blob/master/components/python/python37/patches/15-gethostname.patch
https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/python/python37/patches/15-gethostname.patch
https://github.com/omniosorg/omnios-build/blob/master/build/python27/patches/24-gethostname.patch

As for the define guard, if defined(__sun) && defined(__SVR4) is the best way to detect Solaris. (Although I guess there isn't that many people running 30+ years old pre SRV4 SunOS systems and building latest Python :))

@kulikjak
Copy link
Contributor

kulikjak commented Sep 2, 2023

I just realized that it's merged already - I rebased that older PR to remove it.
#23208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants