]> granicus.if.org Git - python/commitdiff
require uintptr_t to exist
authorBenjamin Peterson <benjamin@python.org>
Tue, 6 Sep 2016 20:33:56 +0000 (13:33 -0700)
committerBenjamin Peterson <benjamin@python.org>
Tue, 6 Sep 2016 20:33:56 +0000 (13:33 -0700)
Include/pyport.h
configure
configure.ac
pyconfig.h.in

index eff7b54e5f51bbd669e8473843c9c0c2ded65f2b..2f780527dab48e42d871640d4b026738d8d75dca 100644 (file)
@@ -23,10 +23,6 @@ Py_DEBUG
 Meaning:  Extra checks compiled in for debug mode.
 Used in:  Py_SAFE_DOWNCAST
 
-HAVE_UINTPTR_T
-Meaning:  The C9X type uintptr_t is supported by the compiler
-Used in:  Py_uintptr_t
-
 **************************************************************************/
 
 /* typedefs for some C9X-defined synonyms for integral types.
@@ -90,26 +86,9 @@ Used in:  Py_uintptr_t
  * without loss of information.  Similarly for intptr_t, wrt a signed
  * integral type.
  */
-#ifdef HAVE_UINTPTR_T
 typedef uintptr_t       Py_uintptr_t;
 typedef intptr_t        Py_intptr_t;
 
-#elif SIZEOF_VOID_P <= SIZEOF_INT
-typedef unsigned int    Py_uintptr_t;
-typedef int             Py_intptr_t;
-
-#elif SIZEOF_VOID_P <= SIZEOF_LONG
-typedef unsigned long   Py_uintptr_t;
-typedef long            Py_intptr_t;
-
-#elif SIZEOF_VOID_P <= SIZEOF_LONG_LONG
-typedef unsigned long long   Py_uintptr_t;
-typedef long long            Py_intptr_t;
-
-#else
-#   error "Python needs a typedef for Py_uintptr_t in pyport.h."
-#endif /* HAVE_UINTPTR_T */
-
 /* Py_ssize_t is a signed integral type such that sizeof(Py_ssize_t) ==
  * sizeof(size_t).  C99 doesn't define such a thing directly (size_t is an
  * unsigned integral type).  See PEP 353 for details.
index 91d0a2fdb71cf3dac6c1e1ce22a04eb266dbcd19..5858af654ac0ab7a1d4010fea504f4c8f3522f7b 100755 (executable)
--- a/configure
+++ b/configure
@@ -8471,51 +8471,6 @@ _ACEOF
 
 fi
 
-ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <stdint.h>
-        #include <inttypes.h>
-"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
-$as_echo_n "checking size of uintptr_t... " >&6; }
-if ${ac_cv_sizeof_uintptr_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_uintptr_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (uintptr_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_uintptr_t=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
-$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
-_ACEOF
-
-
-fi
-
-
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
index 29d5527d32309841a2d53527c8b3bf66e23232b1..9358f0a83af9dad8b93b08a4b91ff9d1f2568aa3 100644 (file)
@@ -2101,11 +2101,6 @@ if test "$have_c99_bool" = yes ; then
 AC_CHECK_SIZEOF(_Bool, 1)
 fi
 
-AC_CHECK_TYPES(uintptr_t,
-   [AC_CHECK_SIZEOF(uintptr_t, 4)],
-   [], [#include <stdint.h>
-        #include <inttypes.h>])
-
 AC_CHECK_SIZEOF(off_t, [], [
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
index 565ff188f89934939101fd70f8373bb1b0abcfb7..a7c12bfc6c93e848b21553e831a87aa2007ee53b 100644 (file)
 /* Define this if you have tcl and TCL_UTF_MAX==6 */
 #undef HAVE_UCS4_TCL
 
-/* Define to 1 if the system has the type `uintptr_t'. */
-#undef HAVE_UINTPTR_T
-
 /* Define to 1 if you have the `uname' function. */
 #undef HAVE_UNAME
 
 /* The size of `time_t', as computed by sizeof. */
 #undef SIZEOF_TIME_T
 
-/* The size of `uintptr_t', as computed by sizeof. */
-#undef SIZEOF_UINTPTR_T
-
 /* The size of `void *', as computed by sizeof. */
 #undef SIZEOF_VOID_P