From b9d9eeda2ad0155c2bb1ce6601f5b311d411f848 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 6 Sep 2016 13:33:56 -0700 Subject: [PATCH] require uintptr_t to exist --- Include/pyport.h | 21 --------------------- configure | 45 --------------------------------------------- configure.ac | 5 ----- pyconfig.h.in | 6 ------ 4 files changed, 77 deletions(-) diff --git a/Include/pyport.h b/Include/pyport.h index eff7b54e5f..2f780527da 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -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. diff --git a/configure b/configure index 91d0a2fdb7..5858af654a 100755 --- a/configure +++ b/configure @@ -8471,51 +8471,6 @@ _ACEOF fi -ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include - #include -" -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]];'. diff --git a/configure.ac b/configure.ac index 29d5527d32..9358f0a83a 100644 --- a/configure.ac +++ b/configure.ac @@ -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 - #include ]) - AC_CHECK_SIZEOF(off_t, [], [ #ifdef HAVE_SYS_TYPES_H #include diff --git a/pyconfig.h.in b/pyconfig.h.in index 565ff188f8..a7c12bfc6c 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1134,9 +1134,6 @@ /* 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 @@ -1311,9 +1308,6 @@ /* 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 -- 2.40.0