Added test for uintptr_t, the C9X acceptable way to spell "type to
which I can cast void* to and back again without losing information". In pyport.h, we typedef Py_uintptr_t to mean this thing, which if the platform supports, will be uintptr_t (otherwise, other accomodations are made).
This commit is contained in:
parent
e736177d5b
commit
bc7c7f991c
|
@ -124,6 +124,9 @@
|
|||
/* Define this if you have the type long long */
|
||||
#undef HAVE_LONG_LONG
|
||||
|
||||
/* Define this if you have the type uintptr_t */
|
||||
#undef HAVE_UINTPTR_T
|
||||
|
||||
/* Define if your compiler supports function prototypes */
|
||||
#undef HAVE_PROTOTYPES
|
||||
|
||||
|
@ -254,6 +257,9 @@
|
|||
/* The number of bytes in a short. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The number of bytes in a uintptr_t. */
|
||||
#undef SIZEOF_UINTPTR_T
|
||||
|
||||
/* The number of bytes in a void *. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
|
|
|
@ -399,6 +399,14 @@ if test "$have_long_long" = yes ; then
|
|||
AC_CHECK_SIZEOF(long long)
|
||||
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) have_uintptr_t=yes)
|
||||
AC_MSG_RESULT($have_uintptr_t)
|
||||
if test "$have_uintptr_t" = yes ; then
|
||||
AC_CHECK_SIZEOF(uintptr_t)
|
||||
fi
|
||||
|
||||
# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
|
||||
AC_MSG_CHECKING(size of off_t)
|
||||
AC_CACHE_VAL(ac_cv_sizeof_off_t,
|
||||
|
|
Loading…
Reference in New Issue