stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: migrating tr1 headers for c++0x
Date Thu, 29 May 2008 15:15:46 GMT
Travis Vitek wrote:
> I've run into a problem while migrating the cstdint/stdint.h headers to
> their new home in the include/ansi directory for 4.3.x.
> 
[...]
> The problem is that the system /usr/include/stdint.h defines the
> appropriate types [int8_t, uint8_t, ...], but it only defines the limit
> macros [PTRDIFF_MAX, ...] if compiling as C or if __STDC_LIMIT_MACROS is
> defined. So we get into the final block, include the system header, but
> none of the macros come through. At the very least this causes a bunch
> of failed assertions in the test, but due to some minor issues with the
> test it actually fails to compile when these macros aren't defined.
> 
> Now I could easily just #define __STDC_LIMIT_MACROS for gcc before
> including /usr/include/stdint.h [or in rw/_config-gcc.h], but that
> wouldn't help much if the user included the system header before our
> header.

How could they do that?

Martin

> 
> The other option is to put things back the way they were and always use
> our definitions from ansi/cstdint. But then there is the possibility
> that we would define a type or macro differently than the system include
> does, which is what we were trying to avoid in the first place.
> 
> What do you think?
> 
> Travis


Mime
View raw message