Skip to content

Commit 50a4e2d

Browse files
Apply pid_t patch (#770)
automerged PR by conda-forge/automerge-action
2 parents ff62f86 + 66ca064 commit 50a4e2d

3 files changed

Lines changed: 83 additions & 6 deletions

File tree

cpython

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 53fb7ef329d078e9bd4b688c5d5951a7d0208031

recipe/meta.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% set ver2 = '.'.join(version.split('.')[0:2]) %}
55
{% set ver2nd = ''.join(version.split('.')[0:2]) %}
66
{% set ver3nd = ''.join(version.split('.')[0:3]) %}
7-
{% set build_number = 0 %}
7+
{% set build_number = 1 %}
88

99
# this makes the linter happy
1010
{% set channel_targets = channel_targets or 'conda-forge main' %}
@@ -75,8 +75,7 @@ source:
7575
{% if 'conda-forge' in channel_targets %}
7676
- patches/0023-Brand-conda-forge.patch
7777
{% endif %}
78-
# not ready yet, see #770
79-
# - patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch
78+
- patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch
8079

8180
build:
8281
number: {{ build_number }}

recipe/patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,90 @@
1-
From aec73a621751170cfeded380fb6bc71e31493441 Mon Sep 17 00:00:00 2001
1+
From 27e9a62dcc30d5713cdb709b93cd455af94a837d Mon Sep 17 00:00:00 2001
22
From: Isuru Fernando <isuruf@gmail.com>
33
Date: Sun, 12 Jan 2025 10:37:29 +0530
44
Subject: [PATCH 24/24] Do not define pid_t as it might conflict with the
55
actual definition
66

77
---
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(-)
1015

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
1188
diff --git a/PC/pyconfig.h.in b/PC/pyconfig.h.in
1289
index 424421f6ff1..2c1b5a5b834 100644
1390
--- a/PC/pyconfig.h.in

0 commit comments

Comments
 (0)