Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-09-24 06:45:12


Jens,

>Oh, and I've extended boost/stdint.h to make 64 bit types available
>with gcc as well, because gcc uses ULONG_LONG_MAX instead of
>ULLONG_MAX for the relevant preprocessor define.

>I've also updated integer_traits_test.cpp with the new
>BOOST_NO_INT64_T #define.

That broke Borland/Mircosoft and gcc support on Win32!

I've uploaded fixes for these plus the changes required by the INTXX_C
macros, for now 64-bit integer support on Win32/gcc is disabled - if anyone
can see how to fix this I'd appreciate it (it can't preprosess 64-bit
int's).

changes:

cstdint.hpp
~~~~~~~
Moved inclusion of <boost/stdint.h> outside of include guards (required for
the behaviour described below).

stdint.h
~~~~
Added INTXX_C macros, these are in a separate section at the end such that:
including stdint.h or cstdint.hpp when __STDC_CONSTANT_MACROS is defined
results in the INTXX_C macros being defined even when stdint.h has already
been included.
Including stdint.h or cstdint.hpp when __STDC_CONSTANT_MACROS is not
defined results in the INTXX_C macros not being defined, even if stdint.h
was previously included with __STDC_CONSTANT_MACROS defined.

cstdint_tests.cpp
~~~~~~~~~~~
extended tests to cover the INTXX_C macros, and 64-bit integer support.

integer_traits_test.cpp
~~~~~~~~~~~~~~
Broken under Borland/MS compilers (these can't define 64-bit member
constants even though they have 64-bit integral types), now fixed.

Jens I'll try your revised random code with Builder when I get a chance, in
the mean time:

>I've fixed that where possible, but I think I cannot fix that for
>literals exceeding the maximum long. Suggestion?

use the INT64_C(value) macro, it will append the correct suffix for you.

- John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk