Skip to content

Commit c6b10c8

Browse files
erlend-aaslandLukasWoodtli
authored andcommitted
pythongh-115765: Don't use deprecated AC_CHECK_TYPE macro in configure.ac (python#115792)
Instead use AC_CHECK_TYPES.
1 parent 39bfa52 commit c6b10c8

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

configure

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+8-17
Original file line numberDiff line numberDiff line change
@@ -2910,12 +2910,10 @@ AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is
29102910
AC_TYPE_SIZE_T
29112911
AC_TYPE_UID_T
29122912

2913-
AC_CHECK_TYPE([ssize_t],
2914-
AC_DEFINE([HAVE_SSIZE_T], [1],
2915-
[Define if your compiler provides ssize_t]), [], [])
2916-
AC_CHECK_TYPE([__uint128_t],
2917-
AC_DEFINE([HAVE_GCC_UINT128_T], [1],
2918-
[Define if your compiler provides __uint128_t]), [], [])
2913+
AC_CHECK_TYPES([ssize_t])
2914+
AC_CHECK_TYPES([__uint128_t],
2915+
[AC_DEFINE([HAVE_GCC_UINT128_T], [1],
2916+
[Define if your compiler provides __uint128_t])])
29192917

29202918
# Sizes and alignments of various common basic types
29212919
# ANSI C requires sizeof(char) == 1, so no need to check it
@@ -6153,11 +6151,7 @@ AS_VAR_IF([with_readline], [no], [
61536151
])
61546152
61556153
# in readline as well as newer editline (April 2023)
6156-
AC_CHECK_TYPE([rl_compdisp_func_t],
6157-
[AC_DEFINE([HAVE_RL_COMPDISP_FUNC_T], [1],
6158-
[Define if readline supports rl_compdisp_func_t])],
6159-
[],
6160-
[readline_includes])
6154+
AC_CHECK_TYPES([rl_compdisp_func_t], [], [], [readline_includes])
61616155
61626156
m4_undefine([readline_includes])
61636157
])dnl WITH_SAVE_ENV()
@@ -6555,12 +6549,9 @@ then
65556549
LIBS="$LIBS -framework CoreFoundation"
65566550
fi
65576551

6558-
AC_CHECK_TYPE(
6559-
[socklen_t], [],
6560-
[AC_DEFINE(
6561-
[socklen_t], [int],
6562-
[Define to `int' if <sys/socket.h> does not define.]
6563-
)], [
6552+
AC_CHECK_TYPES([socklen_t], [],
6553+
[AC_DEFINE([socklen_t], [int],
6554+
[Define to 'int' if <sys/socket.h> does not define.])], [
65646555
#ifdef HAVE_SYS_TYPES_H
65656556
#include <sys/types.h>
65666557
#endif

pyconfig.h.in

+9-3
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@
10091009
/* Define if you can turn off readline's signal handling. */
10101010
#undef HAVE_RL_CATCH_SIGNAL
10111011

1012-
/* Define if readline supports rl_compdisp_func_t */
1012+
/* Define to 1 if the system has the type `rl_compdisp_func_t'. */
10131013
#undef HAVE_RL_COMPDISP_FUNC_T
10141014

10151015
/* Define if you have readline 2.2 */
@@ -1195,13 +1195,16 @@
11951195
/* Define if you have the 'socketpair' function. */
11961196
#undef HAVE_SOCKETPAIR
11971197

1198+
/* Define to 1 if the system has the type `socklen_t'. */
1199+
#undef HAVE_SOCKLEN_T
1200+
11981201
/* Define to 1 if you have the <spawn.h> header file. */
11991202
#undef HAVE_SPAWN_H
12001203

12011204
/* Define to 1 if you have the `splice' function. */
12021205
#undef HAVE_SPLICE
12031206

1204-
/* Define if your compiler provides ssize_t */
1207+
/* Define to 1 if the system has the type `ssize_t'. */
12051208
#undef HAVE_SSIZE_T
12061209

12071210
/* Define to 1 if you have the `statvfs' function. */
@@ -1568,6 +1571,9 @@
15681571
/* Define to 1 if you have the `_getpty' function. */
15691572
#undef HAVE__GETPTY
15701573

1574+
/* Define to 1 if the system has the type `__uint128_t'. */
1575+
#undef HAVE___UINT128_T
1576+
15711577
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
15721578
*/
15731579
#undef MAJOR_IN_MKDEV
@@ -1956,7 +1962,7 @@
19561962
/* Define to `unsigned int' if <sys/types.h> does not define. */
19571963
#undef size_t
19581964

1959-
/* Define to `int' if <sys/socket.h> does not define. */
1965+
/* Define to 'int' if <sys/socket.h> does not define. */
19601966
#undef socklen_t
19611967

19621968
/* Define to `int' if <sys/types.h> doesn't define. */

0 commit comments

Comments
 (0)