[Rd] Definition of uintptr_t in Rinterface.h
Dirk Eddelbuettel
edd at debian.org
Sun Jan 1 19:29:44 CET 2017
On 1 January 2017 at 13:28, Prof Brian Ripley wrote:
| On 29/12/2016 15:55, Simon Urbanek wrote:
| > 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.
|
| Rconfig.h would be appropriate if Rinterface.h is being included from C
| code using the same compiler as used for R. But as Rinterface.h is
| intended for use by alternative front ends there is no guarantee that
| they use the same compiler (and some use C++).
|
| This was documented in the manual:
|
| 'Note that uintptr_t is a C99 type for which a substitute is defined in
| R, so your code needs to define HAVE_UINTPTR_T appropriately.'
|
| AFAICS if you comply, there will not be a conflict.
|
| Also note that is only an issue if CSTACK_DEFNS is defined, not the
| default and not mentioned here.
Relatedly: Any good way about "using the same compiler as used for R"?
I write one package exposing some internal R API for wider use
in a package (RApiSerialize, used eg by RcppRedis) and like that scheme. I
might do the same for date/time/timezone logic but this hinges on these
settings (among other things).
Any good ideas how to go about this? So far I mostly use 'don't ask don't
tell' and rely on the compiler to actually fail when something doesn't hold.
We can probably do better...
Best wishes to all useRs and devRs in 2017.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the R-devel
mailing list