mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-108765: Remove old prototypes from pyport.h (#108782)
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".
This commit is contained in:
parent
5141b1ebe0
commit
1f3e797dc0
4 changed files with 22 additions and 30 deletions
|
|
@ -6,10 +6,17 @@
|
|||
|
||||
#include "Python.h"
|
||||
|
||||
/* Apparently, on SGI, termios.h won't define CTRL if _XOPEN_SOURCE
|
||||
is defined, so we define it here. */
|
||||
// On QNX 6, struct termio must be declared by including sys/termio.h
|
||||
// if TCGETA, TCSETA, TCSETAW, or TCSETAF are used. sys/termio.h must
|
||||
// be included before termios.h or it will generate an error.
|
||||
#if defined(HAVE_SYS_TERMIO_H) && !defined(__hpux)
|
||||
# include <sys/termio.h>
|
||||
#endif
|
||||
|
||||
// Apparently, on SGI, termios.h won't define CTRL if _XOPEN_SOURCE
|
||||
// is defined, so we define it here.
|
||||
#if defined(__sgi)
|
||||
#define CTRL(c) ((c)&037)
|
||||
# define CTRL(c) ((c)&037)
|
||||
#endif
|
||||
|
||||
#if defined(__sun)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue