Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f0400ba

Browse files
committed
Fix for r84195: add HAVE_ALLOCA_H to configure and only include alloca.h if it's available
1 parent 5678539 commit f0400ba

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

Modules/_ctypes/callproc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@
7070

7171
#include <ffi.h>
7272
#include "ctypes.h"
73+
#ifdef HAVE_ALLOCA_H
74+
/* AIX needs alloca.h for alloca() */
7375
#include <alloca.h>
76+
#endif
7477

7578
#if defined(_DEBUG) || defined(__MINGW32__)
7679
/* Don't use structured exception handling on Windows if this is defined.

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6928,7 +6928,7 @@ sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
69286928
sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
69296929
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
69306930
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
6931-
bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
6931+
bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
69326932
do :
69336933
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
69346934
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
15261526
sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
15271527
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
15281528
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
1529-
bluetooth/bluetooth.h linux/tipc.h spawn.h util.h)
1529+
bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h)
15301530
CPPFLAGS=$ac_save_cppflags
15311531
AC_HEADER_DIRENT
15321532
AC_HEADER_MAJOR

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
/* Define to 1 if you have the `alarm' function. */
5050
#undef HAVE_ALARM
5151

52+
/* Define to 1 if you have the <alloca.h> header file. */
53+
#undef HAVE_ALLOCA_H
54+
5255
/* Define this if your time.h defines altzone. */
5356
#undef HAVE_ALTZONE
5457

0 commit comments

Comments
 (0)