]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix test for uintptr_t. Fixes #1568842.
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 2 Oct 2006 14:56:30 +0000 (14:56 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 2 Oct 2006 14:56:30 +0000 (14:56 +0000)
Misc/NEWS
configure
configure.in
pyconfig.h.in

index 69d75604a79c144a3c98e27d0551216cc8b2f73c..e094dcbf2b0b0dd69c82a8acb484292de8dc01e0 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -210,6 +210,8 @@ Tools/Demos
 Build
 -----
 
+- Bug #1568842: Fix test for uintptr_t.
+
 - Bug #1439538: Drop usage of test -e in configure as it is not portable.
 
 - Bug #1502728: Correctly link against librt library on HP-UX.
index d106c82c596a3fea6c2c28f42db1928244ef03ec..69a3da90dd50e2fa497a6f5df2a460cdc25e71c4 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 46609 .
+# From configure.in Revision: 52044 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for python 2.4.
 #
@@ -1514,7 +1514,7 @@ case $ac_sys_system/$ac_sys_release in
   # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
   # disables platform specific features beyond repair.
   # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
-  # has no effect, don't bother defineing them
+  # has no effect, don't bother defining them
   Darwin/[78].*)
     define_xopen_source=no
     ;;
@@ -9457,20 +9457,26 @@ _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking for uintptr_t support" >&5
-echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
-have_uintptr_t=no
-cat >conftest.$ac_ext <<_ACEOF
+echo "$as_me:$LINENO: checking for uintptr_t" >&5
+echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
+if test "${ac_cv_type_uintptr_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <stdint.h>
 
 int
 main ()
 {
-uintptr_t x; x = (uintptr_t)0;
+if ((uintptr_t *) 0)
+  return 0;
+if (sizeof (uintptr_t))
+  return 0;
   ;
   return 0;
 }
@@ -9497,23 +9503,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
-
-  have_uintptr_t=yes
-
+  ac_cv_type_uintptr_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_cv_type_uintptr_t=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
-echo "${ECHO_T}$have_uintptr_t" >&6
-if test "$have_uintptr_t" = yes ; then
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
+echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
+if test $ac_cv_type_uintptr_t = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINTPTR_T 1
+_ACEOF
+
 echo "$as_me:$LINENO: checking for uintptr_t" >&5
 echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
 if test "${ac_cv_type_uintptr_t+set}" = set; then
@@ -9930,6 +9936,8 @@ _ACEOF
 
 fi
 
+
+
 # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
 echo "$as_me:$LINENO: checking size of off_t" >&5
 echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
index f5499e00edda5c67b204be00d3e3aa85fe60d8f2..d5edd3d36b80579b3d9a5652eae827d6e4debc37 100644 (file)
@@ -1100,16 +1100,10 @@ if test "$have_long_long" = yes ; then
 AC_CHECK_SIZEOF(long long, 8)
 fi
 
-AC_MSG_CHECKING(for uintptr_t support)
-have_uintptr_t=no
-AC_TRY_COMPILE([], [uintptr_t x; x = (uintptr_t)0;], [
-  AC_DEFINE(HAVE_UINTPTR_T, 1, [Define this if you have the type uintptr_t.]) 
-  have_uintptr_t=yes
-])
-AC_MSG_RESULT($have_uintptr_t)
-if test "$have_uintptr_t" = yes ; then
-AC_CHECK_SIZEOF(uintptr_t, 4)
-fi
+AC_CHECK_TYPES(uintptr_t, 
+   [AC_CHECK_SIZEOF(uintptr_t, 4)], 
+   [], [#include <stdint.h>])
+
 
 # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
 AC_MSG_CHECKING(size of off_t)
index db2543de1c728e98509bd0fb82a80e0699ec6c84..4103369b8214d5c8467bb9ed0433f0c570243d93 100644 (file)
 /* Define this if you have tcl and TCL_UTF_MAX==6 */
 #undef HAVE_UCS4_TCL
 
-/* Define this if you have the type uintptr_t. */
+/* Define to 1 if the system has the type `uintptr_t'. */
 #undef HAVE_UINTPTR_T
 
 /* Define to 1 if you have the `uname' function. */