Skip to content

Commit a44a16c

Browse files
committed
Use a private name for the macro
1 parent 8feae85 commit a44a16c

5 files changed

Lines changed: 8 additions & 9 deletions

File tree

‎Python/ceval.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ _Py_ReachedRecursionLimitWithMargin(PyThreadState *tstate, int margin_count)
7070
# define Py_C_STACK_SIZE 4000000
7171
#endif
7272

73-
#ifdef HAVE_UNRELIABLE_PTHREAD_GETATTR_NP
73+
#ifdef _Py_HAVE_UNRELIABLE_PTHREAD_GETATTR_NP
7474
#ifdef HAVE_SYS_RESOURCE_H
7575
# include <sys/resource.h>
7676
#endif
@@ -119,7 +119,7 @@ hardware_stack_limits(uintptr_t *base, uintptr_t *top, uintptr_t sp)
119119
err |= pthread_attr_destroy(&attr);
120120
}
121121
if (err == 0) {
122-
# ifdef HAVE_UNRELIABLE_PTHREAD_GETATTR_NP
122+
# ifdef _Py_HAVE_UNRELIABLE_PTHREAD_GETATTR_NP
123123
/* pthread_getattr_np on the main thread of a musl process reports a
124124
* stack size based on the current stack rather than RLIMIT_STACK.
125125
* New threads are reported correctly even on musl, so this fallback

‎Tools/build/check_capi_macros_ignored.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,6 @@ HAVE_UNAME
608608
HAVE_UNISTD_H
609609
HAVE_UNLINKAT
610610
HAVE_UNLOCKPT
611-
HAVE_UNRELIABLE_PTHREAD_GETATTR_NP
612611
HAVE_UNSHARE
613612
HAVE_USABLE_WCHAR_T
614613
HAVE_UTIL_H

‎configure‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5855,7 +5855,7 @@ int main(void) {
58555855
[ac_cv_unreliable_pthread_getattr_np=yes],
58565856
[ac_cv_unreliable_pthread_getattr_np=no])])
58575857
AS_VAR_IF([ac_cv_unreliable_pthread_getattr_np], [yes],
5858-
[AC_DEFINE([HAVE_UNRELIABLE_PTHREAD_GETATTR_NP], [1],
5858+
[AC_DEFINE([_Py_HAVE_UNRELIABLE_PTHREAD_GETATTR_NP], [1],
58595859
[Define if pthread_getattr_np under-reports the main thread's stack size (musl behaviour).])])])
58605860

58615861
# os.statx uses Linux's statx function. AIX also has a function named statx,

‎pyconfig.h.in‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,10 +1654,6 @@
16541654
/* Define to 1 if you have the 'unlockpt' function. */
16551655
#undef HAVE_UNLOCKPT
16561656

1657-
/* Define if pthread_getattr_np under-reports the main thread's stack size
1658-
(musl behaviour). */
1659-
#undef HAVE_UNRELIABLE_PTHREAD_GETATTR_NP
1660-
16611657
/* Define to 1 if you have the 'unshare' function. */
16621658
#undef HAVE_UNSHARE
16631659

@@ -2178,6 +2174,10 @@
21782174
/* Define if you have the 'tanpi' function. */
21792175
#undef _Py_HAVE_TANPI
21802176

2177+
/* Define if pthread_getattr_np under-reports the main thread's stack size
2178+
(musl behaviour). */
2179+
#undef _Py_HAVE_UNRELIABLE_PTHREAD_GETATTR_NP
2180+
21812181
/* Thread stack size set by the linker (in bytes). */
21822182
#undef _Py_LINKER_THREAD_STACK_SIZE
21832183

0 commit comments

Comments
 (0)