aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/Python.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-09-02 16:50:18 +0200
committerGitHub <noreply@github.com>2023-09-02 16:50:18 +0200
commit594b00057e667e0d8d4e41748be056cdd829e919 (patch)
treeb970b7d385d30e9bb423a30bc3029cc94fe4ca4b /Include/Python.h
parent4f9b706c6f5d4422a398146bfd011daedaef1851 (diff)
downloadcpython-594b00057e667e0d8d4e41748be056cdd829e919.tar.gz
cpython-594b00057e667e0d8d4e41748be056cdd829e919.zip
gh-108765: Python.h no longer includes <unistd.h> (#108783)
Diffstat (limited to 'Include/Python.h')
-rw-r--r--Include/Python.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/Include/Python.h b/Include/Python.h
index 002a79dbdc9..4cc72bb23ce 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -26,14 +26,13 @@
#ifdef HAVE_STDDEF_H
# include <stddef.h> // size_t
#endif
-#ifndef MS_WINDOWS
-# include <unistd.h> // sysconf()
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> // ssize_t
#endif
-// errno.h, stdio.h, stdlib.h and string.h headers are no longer used by Python
-// headers, but kept for backward compatibility (no introduce new compiler
-// warnings). They are not included by the limited C API version 3.11 and
-// above.
+// errno.h, stdio.h, stdlib.h and string.h headers are no longer used by
+// Python, but kept for backward compatibility (avoid compiler warnings).
+// They are no longer included by limited C API version 3.11 and newer.
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
# include <errno.h> // errno
# include <stdio.h> // FILE*