Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-89886: Use AC_CHECK_TYPES iso. AC_CHECK_TYPE #30029

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2648,10 +2648,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
Expand Down Expand Up @@ -6050,15 +6047,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 <sys/socket.h> does not define.]),[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
AC_CHECK_TYPES([socklen_t], [], [
AC_DEFINE(
[socklen_t], [int],
[Define to `int' if <sys/socket.h> does not define.]
)
], [
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])

AC_CACHE_CHECK([for broken mbstowcs], [ac_cv_broken_mbstowcs],
Expand Down
8 changes: 4 additions & 4 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,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 <gdbm-ndbm.h> header file. */
#undef HAVE_GDBM_DASH_NDBM_H

Expand Down Expand Up @@ -1097,13 +1094,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 <spawn.h> 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. */
Expand Down