Skip to content

Commit 98a8483

Browse files
committed
gh-108765: Include explicitly <unistd.h> in signalmodule.c
unistd.h is needed by alarm() and pause().
1 parent 9a2f2f4 commit 98a8483

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,8 @@ Porting to Python 3.13
11201120
* ``Python.h`` no longer includes the ``<unistd.h>`` standard header file. If
11211121
needed, it should now be included explicitly. For example, it provides the
11221122
functions: ``read()``, ``write()``, ``close()``, ``isatty()``, ``lseek()``,
1123-
``getpid()``, ``getcwd()``, ``sysconf()`` and ``getpagesize()``.
1123+
``getpid()``, ``getcwd()``, ``sysconf()``, ``getpagesize()``, ``alarm()`` and
1124+
``pause()``.
11241125
As a consequence, ``_POSIX_SEMAPHORES`` and ``_POSIX_THREADS`` macros are no
11251126
longer defined by ``Python.h``. The ``HAVE_UNISTD_H`` and ``HAVE_PTHREAD_H``
11261127
macros defined by ``Python.h`` can be used to decide if ``<unistd.h>`` and

Modules/signalmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# include "socketmodule.h" // SOCKET_T
2222
#endif
2323

24+
#include <unistd.h> // alarm()
2425
#ifdef MS_WINDOWS
2526
# ifdef HAVE_PROCESS_H
2627
# include <process.h>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy