Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-09-25 13:07:41


At 07:51 AM 9/25/2000 -0700, Thomas Matelich wrote:

>Since discussions are going on regarding stdint again, I wanted to
re-bring
>up
>that fact that HPUX has the basic stdint.h types defined in it. I will
>quote
>my message from April regarding this subject in hopes that maybe someone
>will
>think this worth dealing with.
>
>I wrote:
>
> In porting some of my code to HP-UX 10.20, I discovered
> <sys/_inttypes.h>. This file appears to get included at some point
> by
> limits.h or perhaps by the compiler (gcc 2.95.2). In any case,
> _inttypes has all the typedefs that would be in stdint.h. So I've
> added
> the following code to config.hpp:
>
> // begin platform specific portion
> ------------------------------------------//
> # if hpux
> # define BOOST_SYSTEM_HAS__INTTYPES_H
> # endif //HPUX
>
> // end of platform specific portion
> -----------------------------------------//

I'm certainly willing to put config.hpp code for C++ compilers on HP-UX.

But I'd like to do it properly by testing for the specific C++ compiler
version, and defining all the applicable BOOST_ names so that as much boost
code as possible will work on that platform.

So if you would like to do so Thomas, please develop the code, test it,
then email it to me for integration.

> and changed boost/stdint.h like so:
>
> #ifdef BOOST_SYSTEM_HAS_STDINT_H
> #include <stdint.h>
>
> #elif defined BOOST_SYSTEM_HAS__INTTYPES_H
> #include <sys/_inttypes.h>
>
> #else
> .
> .
> .
>
> My other thought was that we could make a macro to represent the
> include
> for the file with the typedefs we're looking for?

That might be a good way to do it. I am under the impression that some
UNIX systems use the name inttypes.h (not to be confused with the C99
header of that name). We could call it BOOST_STDINT_H_OR_EQUIVALENT or
similar.

--Beman


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