Boost logo

Boost :

From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2001-08-30 16:33:20


John Maddock wrote:
> > - Regarding <stdint.h>: Please read my detailed comments
> >at the beginning of boost/stdint.h why I had serious trouble
> >with Linux' <stdint.h>.
>
> I'm still not sure that I completely understand the issue - does this code
> work with non-gcc compilers on linux or not?

I believe it does, but I never tried.

> What are the remaining issues
> if any?

It tries to introduce names into the global namespace
(such as int32_t) which, under ISO C99, are to be introduced
by the standard <stdint.h>. However, some C libraries have
weird include orders / dependencies, so there might be a
C library without a <stdint.h>, but with an int32_t from a
different header. When boost/stdint.h comes along, we have
a potential clash.

> but what about cstdint.hpp -
> shouldn't that work now (with BOOST_HAS_STDINT_H defined)?

boost/cstdint.hpp should work, and it no longer relies
on boost/stdint.h, which is a good thing. If you believe
your <stdint.h> is complete, go ahead and define
BOOST_HAS_STDINT_H (dependent on the library version,
please).

> The version I
> have on Suse linux looks complete to me - what have I missed?

On some versions of glibc, there are slightly different
#ifdef rules whether int64_t gets defined or not in various
header files. I got a clash with a certain include order
from that.

Jens Maurer


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