Skip to content

Commit f6385ae

Browse files
author
Erlend E. Aasland
committed
bpo-45723: Use AC_CHECK_TYPES iso. AC_CHECK_TYPE
AC_CHECK_TYPE is deprecated. Removed the __uint128_t check, as it is unused.
1 parent 74b23c9 commit f6385ae

File tree

3 files changed

+33
-30
lines changed

3 files changed

+33
-30
lines changed

configure

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9041,14 +9041,10 @@ fi
90419041
ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
90429042
if test "x$ac_cv_type_ssize_t" = xyes; then :
90439043

9044-
$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
9045-
9046-
fi
9047-
9048-
ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
9049-
if test "x$ac_cv_type___uint128_t" = xyes; then :
9044+
cat >>confdefs.h <<_ACEOF
9045+
#define HAVE_SSIZE_T 1
9046+
_ACEOF
90509047

9051-
$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
90529048

90539049
fi
90549050

@@ -19908,20 +19904,27 @@ $as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
1990819904
fi
1990919905

1991019906
ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
19911-
#ifdef HAVE_SYS_TYPES_H
19912-
#include <sys/types.h>
19913-
#endif
19914-
#ifdef HAVE_SYS_SOCKET_H
19915-
#include <sys/socket.h>
19916-
#endif
19907+
#ifdef HAVE_SYS_TYPES_H
19908+
# include <sys/types.h>
19909+
#endif
19910+
#ifdef HAVE_SYS_SOCKET_H
19911+
# include <sys/socket.h>
19912+
#endif
1991719913

1991819914
"
1991919915
if test "x$ac_cv_type_socklen_t" = xyes; then :
1992019916

19917+
cat >>confdefs.h <<_ACEOF
19918+
#define HAVE_SOCKLEN_T 1
19919+
_ACEOF
19920+
19921+
1992119922
else
1992219923

19924+
1992319925
$as_echo "#define socklen_t int" >>confdefs.h
1992419926

19927+
1992519928
fi
1992619929

1992719930

configure.ac

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,10 +2392,7 @@ AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is
23922392
AC_TYPE_SIZE_T
23932393
AC_TYPE_UID_T
23942394

2395-
AC_CHECK_TYPE(ssize_t,
2396-
AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,)
2397-
AC_CHECK_TYPE(__uint128_t,
2398-
AC_DEFINE(HAVE_GCC_UINT128_T, 1, [Define if your compiler provides __uint128_t]),,)
2395+
AC_CHECK_TYPES([ssize_t])
23992396

24002397
# Sizes and alignments of various common basic types
24012398
# 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
56465643
[Define to printf format modifier for Py_ssize_t])
56475644
fi
56485645

5649-
AC_CHECK_TYPE(socklen_t,,
5650-
AC_DEFINE(socklen_t,int,
5651-
[Define to `int' if <sys/socket.h> does not define.]),[
5652-
#ifdef HAVE_SYS_TYPES_H
5653-
#include <sys/types.h>
5654-
#endif
5655-
#ifdef HAVE_SYS_SOCKET_H
5656-
#include <sys/socket.h>
5657-
#endif
5646+
AC_CHECK_TYPES([socklen_t], [], [
5647+
AC_DEFINE(
5648+
[socklen_t], [int],
5649+
[Define to `int' if <sys/socket.h> does not define.]
5650+
)
5651+
], [
5652+
#ifdef HAVE_SYS_TYPES_H
5653+
# include <sys/types.h>
5654+
#endif
5655+
#ifdef HAVE_SYS_SOCKET_H
5656+
# include <sys/socket.h>
5657+
#endif
56585658
])
56595659

56605660
AC_CACHE_CHECK([for broken mbstowcs], [ac_cv_broken_mbstowcs],

pyconfig.h.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,6 @@
420420
*/
421421
#undef HAVE_GCC_ASM_FOR_X87
422422

423-
/* Define if your compiler provides __uint128_t */
424-
#undef HAVE_GCC_UINT128_T
425-
426423
/* Define to 1 if you have the <gdbm-ndbm.h> header file. */
427424
#undef HAVE_GDBM_DASH_NDBM_H
428425

@@ -1070,13 +1067,16 @@
10701067
/* Define if you have the 'socketpair' function. */
10711068
#undef HAVE_SOCKETPAIR
10721069

1070+
/* Define to 1 if the system has the type `socklen_t'. */
1071+
#undef HAVE_SOCKLEN_T
1072+
10731073
/* Define to 1 if you have the <spawn.h> header file. */
10741074
#undef HAVE_SPAWN_H
10751075

10761076
/* Define to 1 if you have the `splice' function. */
10771077
#undef HAVE_SPLICE
10781078

1079-
/* Define if your compiler provides ssize_t */
1079+
/* Define to 1 if the system has the type `ssize_t'. */
10801080
#undef HAVE_SSIZE_T
10811081

10821082
/* Define to 1 if you have the `statvfs' function. */

0 commit comments

Comments
 (0)