[ python-Bugs-1568842 ] Test for uintptr_t seems to be incorrect

SourceForge.net noreply at sourceforge.net
Mon Oct 2 16:57:48 CEST 2006


Bugs item #1568842, was opened at 2006-10-01 20:10
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1568842&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 6
Submitted By: Ronald Oussoren (ronaldoussoren)
Assigned to: Nobody/Anonymous (nobody)
Summary: Test for uintptr_t seems to be incorrect

Initial Comment:

Someone reported on the pythonmac list that HAVE_UINTPTR_T wasn't 
defined in pyconfig.h while it should have been defined. I'm looking into 
this and am now wondering whether the configure snipped below is 
correct:

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, 1, [Define this if you have the type 
uintptr_t.])
  have_uintptr_t=yes
])
AC_MSG_RESULT($have_uintptr_t)
if test "$have_uintptr_t" = yes ; then
AC_CHECK_SIZEOF(uintptr_t, 4)
fi

This seems to check for uintptr_t as a builtin type. Isn't one supposed to 
include <stdint.h> to get this type?

Chaning the AC_TRY_COMPILE line to the line below fixes the issue for me 
on OSX and Linux:

AC_TRY_COMPILE([#include <stdint.h>], [uintptr_t x; x = (uintptr_t)0;], [


BTW. This issue is also present in Python 2.4.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2006-10-02 16:57

Message:
Logged In: YES 
user_id=21627

Thanks for the report. fixed in r52086, 52087, 52088.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1568842&group_id=5470


More information about the Python-bugs-list mailing list