Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b9d9eed

Browse files
committed
require uintptr_t to exist
1 parent d982c8f commit b9d9eed

4 files changed

Lines changed: 0 additions & 77 deletions

File tree

Include/pyport.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ Py_DEBUG
2323
Meaning: Extra checks compiled in for debug mode.
2424
Used in: Py_SAFE_DOWNCAST
2525
26-
HAVE_UINTPTR_T
27-
Meaning: The C9X type uintptr_t is supported by the compiler
28-
Used in: Py_uintptr_t
29-
3026
**************************************************************************/
3127

3228
/* typedefs for some C9X-defined synonyms for integral types.
@@ -90,26 +86,9 @@ Used in: Py_uintptr_t
9086
* without loss of information. Similarly for intptr_t, wrt a signed
9187
* integral type.
9288
*/
93-
#ifdef HAVE_UINTPTR_T
9489
typedef uintptr_t Py_uintptr_t;
9590
typedef intptr_t Py_intptr_t;
9691

97-
#elif SIZEOF_VOID_P <= SIZEOF_INT
98-
typedef unsigned int Py_uintptr_t;
99-
typedef int Py_intptr_t;
100-
101-
#elif SIZEOF_VOID_P <= SIZEOF_LONG
102-
typedef unsigned long Py_uintptr_t;
103-
typedef long Py_intptr_t;
104-
105-
#elif SIZEOF_VOID_P <= SIZEOF_LONG_LONG
106-
typedef unsigned long long Py_uintptr_t;
107-
typedef long long Py_intptr_t;
108-
109-
#else
110-
# error "Python needs a typedef for Py_uintptr_t in pyport.h."
111-
#endif /* HAVE_UINTPTR_T */
112-
11392
/* Py_ssize_t is a signed integral type such that sizeof(Py_ssize_t) ==
11493
* sizeof(size_t). C99 doesn't define such a thing directly (size_t is an
11594
* unsigned integral type). See PEP 353 for details.

configure

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8471,51 +8471,6 @@ _ACEOF
84718471

84728472
fi
84738473

8474-
ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <stdint.h>
8475-
#include <inttypes.h>
8476-
"
8477-
if test "x$ac_cv_type_uintptr_t" = xyes; then :
8478-
8479-
cat >>confdefs.h <<_ACEOF
8480-
#define HAVE_UINTPTR_T 1
8481-
_ACEOF
8482-
8483-
# The cast to long int works around a bug in the HP C Compiler
8484-
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8485-
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8486-
# This bug is HP SR number 8606223364.
8487-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8488-
$as_echo_n "checking size of uintptr_t... " >&6; }
8489-
if ${ac_cv_sizeof_uintptr_t+:} false; then :
8490-
$as_echo_n "(cached) " >&6
8491-
else
8492-
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8493-
8494-
else
8495-
if test "$ac_cv_type_uintptr_t" = yes; then
8496-
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8497-
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8498-
as_fn_error 77 "cannot compute sizeof (uintptr_t)
8499-
See \`config.log' for more details" "$LINENO" 5; }
8500-
else
8501-
ac_cv_sizeof_uintptr_t=0
8502-
fi
8503-
fi
8504-
8505-
fi
8506-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8507-
$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8508-
8509-
8510-
8511-
cat >>confdefs.h <<_ACEOF
8512-
#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8513-
_ACEOF
8514-
8515-
8516-
fi
8517-
8518-
85198474
# The cast to long int works around a bug in the HP C Compiler
85208475
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
85218476
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.

configure.ac

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,11 +2101,6 @@ if test "$have_c99_bool" = yes ; then
21012101
AC_CHECK_SIZEOF(_Bool, 1)
21022102
fi
21032103

2104-
AC_CHECK_TYPES(uintptr_t,
2105-
[AC_CHECK_SIZEOF(uintptr_t, 4)],
2106-
[], [#include <stdint.h>
2107-
#include <inttypes.h>])
2108-
21092104
AC_CHECK_SIZEOF(off_t, [], [
21102105
#ifdef HAVE_SYS_TYPES_H
21112106
#include <sys/types.h>

pyconfig.h.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,9 +1134,6 @@
11341134
/* Define this if you have tcl and TCL_UTF_MAX==6 */
11351135
#undef HAVE_UCS4_TCL
11361136

1137-
/* Define to 1 if the system has the type `uintptr_t'. */
1138-
#undef HAVE_UINTPTR_T
1139-
11401137
/* Define to 1 if you have the `uname' function. */
11411138
#undef HAVE_UNAME
11421139

@@ -1311,9 +1308,6 @@
13111308
/* The size of `time_t', as computed by sizeof. */
13121309
#undef SIZEOF_TIME_T
13131310

1314-
/* The size of `uintptr_t', as computed by sizeof. */
1315-
#undef SIZEOF_UINTPTR_T
1316-
13171311
/* The size of `void *', as computed by sizeof. */
13181312
#undef SIZEOF_VOID_P
13191313

0 commit comments

Comments
 (0)