From lgautier at gmail.com  Thu Dec 29 19:00:22 2016
From: lgautier at gmail.com (Laurent Gautier)
Date: Thu, 29 Dec 2016 13:00:22 -0500
Subject: [Rd] Definition of uintptr_t in Rinterface.h
In-Reply-To: <3ECD3048-DC04-467B-BD33-787A4E70FE67@r-project.org>
References: <CA+JCgN0pwwmtPZ+p4Yf2fi1uXb2r-0H1jD+hOj1iWi58EiO-_A@mail.gmail.com>
	<3ECD3048-DC04-467B-BD33-787A4E70FE67@r-project.org>
Message-ID: <CA+JCgN20Ezopbu=dEuJjoces9=fS06sYHrgDG=sALfHO=pPSBg@mail.gmail.com>

Thanks for looking at it. Having  HAVE_UINTPTR_T defined in Rconfig.h
should fix the issue. Will the fix make it to R-3.3.3 (if that point
release is planned, or R-3.3.2-patched), or will it only be with R-3.4 ?


L.

PS: I am forwarding a thank you note to the reporter of the problem on the
rpy2 issue tracker.


2016-12-29 10:55 GMT-05:00 Simon Urbanek <simon.urbanek at r-project.org>:

> The problem is elsewhere - Rinterface.h guards the ultima-ratio fallback
> with HAVE_UINTPTR_T but that config flag is not exported in Rconfig.h.
> Should be now fixed in R-devel - please check if that works for you.
>
> Thanks,
> Simon
>
>
>
> > On Dec 26, 2016, at 11:25 PM, Laurent Gautier <lgautier at gmail.com>
> wrote:
> >
> > Hi,
> >
> > I was recently pointed out that a definition in Rinterface.h can be
> conflicting
> > with a definition in stdint.h:
> >
> > /usr/include/R/Rinterface.h has:
> > typedef unsigned long uintptr_t;
> >
> > /usr/include/stdint.h has:
> > typedef unsigned int uintptr_t;
> > (when 32bit platform complete definition is:
> >
> > #if __WORDSIZE == 64
> > # ifndef __intptr_t_defined
> > typedef long int                intptr_t;
> > #  define __intptr_t_defined
> > # endif
> > typedef unsigned long int       uintptr_t;
> > #else
> > # ifndef __intptr_t_defined
> > typedef int                     intptr_t;
> > #  define __intptr_t_defined
> > # endif
> > typedef unsigned int            uintptr_t;
> > #endif
> >
> > )
> >
> > Is this expected ? Shouldn't R rely on the definition in stdint.h
> > rather than define its own ?
> >
> >
> > (report for the issue:
> > https://bitbucket.org/rpy2/rpy2/issues/389/failed-to-
> compile-with-python-360-on-32
> > )
> >
> >
> > Laurent
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
>
>

	[[alternative HTML version deleted]]



[Rd] Definition of uintptr_t in Rinterface.h
Laurent Gautier