From f6385ae1dcaa053f119f09ac42defd99df5d9412 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 10 Dec 2021 15:20:55 +0100 Subject: [PATCH] bpo-45723: Use AC_CHECK_TYPES iso. AC_CHECK_TYPE AC_CHECK_TYPE is deprecated. Removed the __uint128_t check, as it is unused. --- configure | 29 ++++++++++++++++------------- configure.ac | 26 +++++++++++++------------- pyconfig.h.in | 8 ++++---- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/configure b/configure index 3c2a9cf0a249dd..6a384219a3f71a 100755 --- a/configure +++ b/configure @@ -9041,14 +9041,10 @@ fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : -$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default" -if test "x$ac_cv_type___uint128_t" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_SSIZE_T 1 +_ACEOF -$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h fi @@ -19908,20 +19904,27 @@ $as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_SOCKET_H + # include + #endif " if test "x$ac_cv_type_socklen_t" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKLEN_T 1 +_ACEOF + + else + $as_echo "#define socklen_t int" >>confdefs.h + fi diff --git a/configure.ac b/configure.ac index fa5e63cf5c3f98..1e69e04e3336f4 100644 --- a/configure.ac +++ b/configure.ac @@ -2392,10 +2392,7 @@ AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is AC_TYPE_SIZE_T AC_TYPE_UID_T -AC_CHECK_TYPE(ssize_t, - AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,) -AC_CHECK_TYPE(__uint128_t, - AC_DEFINE(HAVE_GCC_UINT128_T, 1, [Define if your compiler provides __uint128_t]),,) +AC_CHECK_TYPES([ssize_t]) # Sizes and alignments of various common basic types # ANSI C requires sizeof(char) == 1, so no need to check it @@ -5646,15 +5643,18 @@ if test "$ac_cv_have_size_t_format" != no ; then [Define to printf format modifier for Py_ssize_t]) fi -AC_CHECK_TYPE(socklen_t,, - AC_DEFINE(socklen_t,int, - [Define to `int' if does not define.]),[ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif +AC_CHECK_TYPES([socklen_t], [], [ + AC_DEFINE( + [socklen_t], [int], + [Define to `int' if does not define.] + ) +], [ + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_SOCKET_H + # include + #endif ]) AC_CACHE_CHECK([for broken mbstowcs], [ac_cv_broken_mbstowcs], diff --git a/pyconfig.h.in b/pyconfig.h.in index efad243d0af8aa..e1b8de51501614 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -420,9 +420,6 @@ */ #undef HAVE_GCC_ASM_FOR_X87 -/* Define if your compiler provides __uint128_t */ -#undef HAVE_GCC_UINT128_T - /* Define to 1 if you have the header file. */ #undef HAVE_GDBM_DASH_NDBM_H @@ -1070,13 +1067,16 @@ /* Define if you have the 'socketpair' function. */ #undef HAVE_SOCKETPAIR +/* Define to 1 if the system has the type `socklen_t'. */ +#undef HAVE_SOCKLEN_T + /* Define to 1 if you have the header file. */ #undef HAVE_SPAWN_H /* Define to 1 if you have the `splice' function. */ #undef HAVE_SPLICE -/* Define if your compiler provides ssize_t */ +/* Define to 1 if the system has the type `ssize_t'. */ #undef HAVE_SSIZE_T /* Define to 1 if you have the `statvfs' function. */