From a635f753a4887f702c40a9157b78b3c94fef7ed3 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Thu, 20 Sep 2001 19:25:35 +0000 Subject: [PATCH] port cstdint.hpp to HP-UX [SVN r11175] --- include/boost/cstdint.hpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/include/boost/cstdint.hpp b/include/boost/cstdint.hpp index 2fdc9c9..619f78b 100644 --- a/include/boost/cstdint.hpp +++ b/include/boost/cstdint.hpp @@ -28,8 +28,8 @@ // The following #include is an implementation artifact; not part of interface. # ifdef __hpux -// HP-UX has a nice in a non-standard location -# include +// HP-UX has a vaguely nice in a non-standard location +# include # ifdef __STDC_32_MODE__ // this is triggered with GCC, because it defines __cplusplus < 199707L # define BOOST_NO_INT64_T @@ -147,8 +147,14 @@ namespace boost # if !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \ (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) -# if (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) +# if defined(__hpux) + // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) // 2**64 - 1 +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + typedef long long intmax_t; typedef unsigned long long uintmax_t; typedef long long int64_t; @@ -157,9 +163,7 @@ namespace boost typedef unsigned long long uint64_t; typedef unsigned long long uint_least64_t; typedef unsigned long long uint_fast64_t; -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif + # elif ULONG_MAX != 0xffffffff # if ULONG_MAX == 18446744073709551615 // 2**64 - 1 @@ -268,15 +272,17 @@ BOOST_HAS_STDINT_H is defined (John Maddock). // 64-bit types + intmax_t and uintmax_t ----------------------------------// # if defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) +# if defined(__hpux) // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions -# if (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615U) || \ - (defined(ULONG_LONG_MAX) && (defined(__hpux) || ULONG_LONG_MAX == 18446744073709551615U)) || \ +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615U) || \ + (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615U) || \ (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615U) -# define INT64_C(value) value##LL -# define UINT64_C(value) value##uLL + # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL # elif ULONG_MAX != 0xffffffff # if ULONG_MAX == 18446744073709551615 // 2**64 - 1