# define Py_NO_INLINE
#endif
-/**************************************************************************
-Prototypes that are missing from the standard include files on some systems
-(and possibly only some versions of such systems.)
-
-Please be conservative with adding new ones, document them and enclose them
-in platform-specific #ifdefs.
-**************************************************************************/
-
-#ifdef SOLARIS
-/* Unchecked */
-extern int gethostname(char *, int);
-#endif
-
-#ifdef HAVE__GETPTY
-#include <sys/types.h> /* we need to import mode_t */
-extern char * _getpty(int *, int, mode_t, int);
-#endif
-
-/* 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
-
-
/* On 4.4BSD-descendants, ctype functions serves the whole range of
* wchar_t character set rather than single byte code points only.
* This characteristic can break some operations of string object
#include <stdio.h> // ctermid()
#include <stdlib.h> // system()
+// SGI apparently needs this forward declaration
+#ifdef HAVE__GETPTY
+# include <sys/types.h> // mode_t
+ extern char * _getpty(int *, int, mode_t, int);
+#endif
+
+
/*
* A number of APIs are available on macOS from a certain macOS version.
* To support building with a new SDK while deploying to older versions
#include "pycore_fileutils.h" // _Py_set_inheritable()
#include "pycore_moduleobject.h" // _PyModule_GetState
+// gethostname() prototype missing from Solaris standard header files
+#ifdef __sun
+extern int gethostname(char *, int);
+#endif
#ifdef _Py_MEMORY_SANITIZER
-# include <sanitizer/msan_interface.h>
+# include <sanitizer/msan_interface.h>
#endif
/* Socket object documentation */
#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)