[Python-checkins] cpython: require uintptr_t to exist
benjamin.peterson
python-checkins at python.org
Tue Sep 6 16:34:20 EDT 2016
https://hg.python.org/cpython/rev/83529ca38833
changeset: 103140:83529ca38833
user: Benjamin Peterson <benjamin at python.org>
date: Tue Sep 06 13:33:56 2016 -0700
summary:
require uintptr_t to exist
files:
Include/pyport.h | 21 ----------------
configure | 45 ------------------------------------
configure.ac | 5 ----
pyconfig.h.in | 6 ----
4 files changed, 0 insertions(+), 77 deletions(-)
diff --git a/Include/pyport.h b/Include/pyport.h
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -23,10 +23,6 @@
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 @@
* 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
--- a/configure
+++ b/configure
@@ -8471,51 +8471,6 @@
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]];'.
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -2101,11 +2101,6 @@
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>
diff --git a/pyconfig.h.in b/pyconfig.h.in
--- 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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list