|
1 | | -From aec73a621751170cfeded380fb6bc71e31493441 Mon Sep 17 00:00:00 2001 |
| 1 | +From 27e9a62dcc30d5713cdb709b93cd455af94a837d Mon Sep 17 00:00:00 2001 |
2 | 2 | From: Isuru Fernando <isuruf@gmail.com> |
3 | 3 | Date: Sun, 12 Jan 2025 10:37:29 +0530 |
4 | 4 | Subject: [PATCH 24/24] Do not define pid_t as it might conflict with the |
5 | 5 | actual definition |
6 | 6 |
|
7 | 7 | --- |
8 | | - PC/pyconfig.h.in | 2 -- |
9 | | - 1 file changed, 2 deletions(-) |
| 8 | + Modules/_testcapi/long.c | 4 ++++ |
| 9 | + Modules/_testcapimodule.c | 4 ++++ |
| 10 | + Modules/_testlimitedcapi/long.c | 4 ++++ |
| 11 | + Modules/clinic/posixmodule.c.h | 4 ++++ |
| 12 | + Modules/posixmodule.c | 1 + |
| 13 | + PC/pyconfig.h.in | 2 -- |
| 14 | + 6 files changed, 17 insertions(+), 2 deletions(-) |
10 | 15 |
|
| 16 | +diff --git a/Modules/_testcapi/long.c b/Modules/_testcapi/long.c |
| 17 | +index 769c3909ea3..242636c7cc4 100644 |
| 18 | +--- a/Modules/_testcapi/long.c |
| 19 | ++++ b/Modules/_testcapi/long.c |
| 20 | +@@ -6,6 +6,10 @@ |
| 21 | + #include "util.h" |
| 22 | + #include "clinic/long.c.h" |
| 23 | + |
| 24 | ++#ifdef _MSC_VER |
| 25 | ++typedef int pid_t; |
| 26 | ++#endif |
| 27 | ++ |
| 28 | + /*[clinic input] |
| 29 | + module _testcapi |
| 30 | + [clinic start generated code]*/ |
| 31 | +diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c |
| 32 | +index 01b6bd89d13..a811ed8d493 100644 |
| 33 | +--- a/Modules/_testcapimodule.c |
| 34 | ++++ b/Modules/_testcapimodule.c |
| 35 | +@@ -23,6 +23,10 @@ |
| 36 | + # include <sys/wait.h> // W_STOPCODE |
| 37 | + #endif |
| 38 | + |
| 39 | ++#ifdef _MSC_VER |
| 40 | ++typedef int pid_t; |
| 41 | ++#endif |
| 42 | ++ |
| 43 | + #ifdef bool |
| 44 | + # error "The public headers should not include <stdbool.h>, see gh-48924" |
| 45 | + #endif |
| 46 | +diff --git a/Modules/_testlimitedcapi/long.c b/Modules/_testlimitedcapi/long.c |
| 47 | +index 5953009b6ef..299ea06d8f5 100644 |
| 48 | +--- a/Modules/_testlimitedcapi/long.c |
| 49 | ++++ b/Modules/_testlimitedcapi/long.c |
| 50 | +@@ -8,6 +8,10 @@ |
| 51 | + #include "util.h" |
| 52 | + #include "clinic/long.c.h" |
| 53 | + |
| 54 | ++#ifdef _MSC_VER |
| 55 | ++typedef int pid_t; |
| 56 | ++#endif |
| 57 | ++ |
| 58 | + /*[clinic input] |
| 59 | + module _testlimitedcapi |
| 60 | + [clinic start generated code]*/ |
| 61 | +diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h |
| 62 | +index 14a6efb9ac9..7b67d867778 100644 |
| 63 | +--- a/Modules/clinic/posixmodule.c.h |
| 64 | ++++ b/Modules/clinic/posixmodule.c.h |
| 65 | +@@ -10,6 +10,10 @@ preserve |
| 66 | + #include "pycore_long.h" // _PyLong_UnsignedInt_Converter() |
| 67 | + #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() |
| 68 | + |
| 69 | ++#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)) |
| 70 | ++typedef int pid_t; |
| 71 | ++#endif |
| 72 | ++ |
| 73 | + PyDoc_STRVAR(os_stat__doc__, |
| 74 | + "stat($module, /, path, *, dir_fd=None, follow_symlinks=True)\n" |
| 75 | + "--\n" |
| 76 | +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c |
| 77 | +index 51e34b5f4b7..9ab26125548 100644 |
| 78 | +--- a/Modules/posixmodule.c |
| 79 | ++++ b/Modules/posixmodule.c |
| 80 | +@@ -42,6 +42,7 @@ |
| 81 | + # if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) |
| 82 | + # define HAVE_SYMLINK |
| 83 | + # endif /* MS_WINDOWS_DESKTOP | MS_WINDOWS_SYSTEM */ |
| 84 | ++typedef int pid_t; |
| 85 | + #endif |
| 86 | + |
| 87 | + #ifndef MS_WINDOWS |
11 | 88 | diff --git a/PC/pyconfig.h.in b/PC/pyconfig.h.in |
12 | 89 | index 424421f6ff1..2c1b5a5b834 100644 |
13 | 90 | --- a/PC/pyconfig.h.in |
|
0 commit comments