From 01c04013a79555ce82dcaab7dc0907f3b4b28034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 11 Nov 2002 14:58:44 +0000 Subject: [PATCH] Use new-style CHECK_TYPE to avoid modifying confdefs.h. Include sys/types.h Fixes #636431. --- configure | 32 +++++++++++--------------------- configure.in | 23 +++++++---------------- pyconfig.h.in | 2 +- 3 files changed, 19 insertions(+), 38 deletions(-) diff --git a/configure b/configure index 3c902f8c3fe..0638270d9b2 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.366 . +# From configure.in Revision: 1.367 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. # @@ -16525,13 +16525,6 @@ _ACEOF fi -# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! -# Add sys/socket.h to confdefs.h -cat >> confdefs.h <<\EOF -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -EOF echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${ac_cv_type_socklen_t+set}" = set; then @@ -16540,7 +16533,15 @@ else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -$ac_includes_default + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + + #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -16584,24 +16585,13 @@ if test $ac_cv_type_socklen_t = yes; then : else -cat >>confdefs.h <<_ACEOF +cat >>confdefs.h <<\_ACEOF #define socklen_t int _ACEOF fi -#AC_MSG_CHECKING(for Modules/Setup) -#if test ! -f Modules/Setup ; then -# if test ! -d Modules ; then -# mkdir Modules -# fi -# cp "$srcdir/Modules/Setup.dist" Modules/Setup -# AC_MSG_RESULT(creating) -#else -# AC_MSG_RESULT(already exists) -#fi - for h in `(cd $srcdir;echo Python/thread_*.h)` diff --git a/configure.in b/configure.in index 07f452dd1b8..2bfe8c37c79 100644 --- a/configure.in +++ b/configure.in @@ -2445,25 +2445,16 @@ then [Define if WINDOW in curses.h offers a field _flags.]) fi -# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! -# Add sys/socket.h to confdefs.h -cat >> confdefs.h <<\EOF +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 -EOF -AC_CHECK_TYPE(socklen_t, int) - -#AC_MSG_CHECKING(for Modules/Setup) -#if test ! -f Modules/Setup ; then -# if test ! -d Modules ; then -# mkdir Modules -# fi -# cp "$srcdir/Modules/Setup.dist" Modules/Setup -# AC_MSG_RESULT(creating) -#else -# AC_MSG_RESULT(already exists) -#fi +]) AC_SUBST(THREADHEADERS) diff --git a/pyconfig.h.in b/pyconfig.h.in index a6f7e83e396..e612494ad24 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -842,7 +842,7 @@ /* Define to `unsigned' if does not define. */ #undef size_t -/* Define to `int' if does not define. */ +/* Define to `int' if does not define. */ #undef socklen_t /* Define to `int' if doesn't define. */