Chris@16: // boost cstdint.hpp header file ------------------------------------------// Chris@16: Chris@16: // (C) Copyright Beman Dawes 1999. Chris@16: // (C) Copyright Jens Mauer 2001 Chris@16: // (C) Copyright John Maddock 2001 Chris@16: // Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org/libs/integer for documentation. Chris@16: Chris@16: // Revision History Chris@16: // 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.) Chris@16: // 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer) Chris@16: // 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer) Chris@16: // 12 Nov 00 Merged (Jens Maurer) Chris@16: // 23 Sep 00 Added INTXX_C macro support (John Maddock). Chris@16: // 22 Sep 00 Better 64-bit support (John Maddock) Chris@16: // 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost Chris@16: // 8 Aug 99 Initial version (Beman Dawes) Chris@16: Chris@16: Chris@16: #ifndef BOOST_CSTDINT_HPP Chris@16: #define BOOST_CSTDINT_HPP Chris@16: Chris@16: // Chris@16: // Since we always define the INT#_C macros as per C++0x, Chris@16: // define __STDC_CONSTANT_MACROS so that does the right Chris@16: // thing if possible, and so that the user knows that the macros Chris@16: // are actually defined as per C99. Chris@16: // Chris@16: #ifndef __STDC_CONSTANT_MACROS Chris@16: # define __STDC_CONSTANT_MACROS Chris@16: #endif Chris@16: Chris@16: #include Chris@16: Chris@16: // Chris@16: // Note that GLIBC is a bit inconsistent about whether int64_t is defined or not Chris@16: // depending upon what headers happen to have been included first... Chris@16: // so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. Chris@16: // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 Chris@16: // Chris@16: #if defined(BOOST_HAS_STDINT_H) \ Chris@16: && (!defined(__GLIBC__) \ Chris@16: || defined(__GLIBC_HAVE_LONG_LONG) \ Chris@16: || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) Chris@16: Chris@16: // The following #include is an implementation artifact; not part of interface. Chris@16: # ifdef __hpux Chris@16: // HP-UX has a vaguely nice in a non-standard location Chris@16: # include Chris@16: # ifdef __STDC_32_MODE__ Chris@16: // this is triggered with GCC, because it defines __cplusplus < 199707L Chris@16: # define BOOST_NO_INT64_T Chris@16: # endif Chris@16: # elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) Chris@16: # include Chris@16: # else Chris@16: # include Chris@16: Chris@16: // There is a bug in Cygwin two _C macros Chris@16: # if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) Chris@16: # undef INTMAX_C Chris@16: # undef UINTMAX_C Chris@16: # define INTMAX_C(c) c##LL Chris@16: # define UINTMAX_C(c) c##ULL Chris@16: # endif Chris@16: Chris@16: # endif Chris@16: Chris@16: #ifdef __QNX__ Chris@16: Chris@16: // QNX (Dinkumware stdlib) defines these as non-standard names. Chris@16: // Reflect to the standard names. Chris@16: Chris@16: typedef ::intleast8_t int_least8_t; Chris@16: typedef ::intfast8_t int_fast8_t; Chris@16: typedef ::uintleast8_t uint_least8_t; Chris@16: typedef ::uintfast8_t uint_fast8_t; Chris@16: Chris@16: typedef ::intleast16_t int_least16_t; Chris@16: typedef ::intfast16_t int_fast16_t; Chris@16: typedef ::uintleast16_t uint_least16_t; Chris@16: typedef ::uintfast16_t uint_fast16_t; Chris@16: Chris@16: typedef ::intleast32_t int_least32_t; Chris@16: typedef ::intfast32_t int_fast32_t; Chris@16: typedef ::uintleast32_t uint_least32_t; Chris@16: typedef ::uintfast32_t uint_fast32_t; Chris@16: Chris@16: # ifndef BOOST_NO_INT64_T Chris@16: Chris@16: typedef ::intleast64_t int_least64_t; Chris@16: typedef ::intfast64_t int_fast64_t; Chris@16: typedef ::uintleast64_t uint_least64_t; Chris@16: typedef ::uintfast64_t uint_fast64_t; Chris@16: Chris@16: # endif Chris@16: Chris@16: #endif Chris@16: Chris@16: namespace boost Chris@16: { Chris@16: Chris@16: using ::int8_t; Chris@16: using ::int_least8_t; Chris@16: using ::int_fast8_t; Chris@16: using ::uint8_t; Chris@16: using ::uint_least8_t; Chris@16: using ::uint_fast8_t; Chris@16: Chris@16: using ::int16_t; Chris@16: using ::int_least16_t; Chris@16: using ::int_fast16_t; Chris@16: using ::uint16_t; Chris@16: using ::uint_least16_t; Chris@16: using ::uint_fast16_t; Chris@16: Chris@16: using ::int32_t; Chris@16: using ::int_least32_t; Chris@16: using ::int_fast32_t; Chris@16: using ::uint32_t; Chris@16: using ::uint_least32_t; Chris@16: using ::uint_fast32_t; Chris@16: Chris@16: # ifndef BOOST_NO_INT64_T Chris@16: Chris@16: using ::int64_t; Chris@16: using ::int_least64_t; Chris@16: using ::int_fast64_t; Chris@16: using ::uint64_t; Chris@16: using ::uint_least64_t; Chris@16: using ::uint_fast64_t; Chris@16: Chris@16: # endif Chris@16: Chris@16: using ::intmax_t; Chris@16: using ::uintmax_t; Chris@16: Chris@16: } // namespace boost Chris@16: Chris@101: #elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__) Chris@16: // FreeBSD and Tru64 have an that contains much of what we need. Chris@16: # include Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: using ::int8_t; Chris@16: typedef int8_t int_least8_t; Chris@16: typedef int8_t int_fast8_t; Chris@16: using ::uint8_t; Chris@16: typedef uint8_t uint_least8_t; Chris@16: typedef uint8_t uint_fast8_t; Chris@16: Chris@16: using ::int16_t; Chris@16: typedef int16_t int_least16_t; Chris@16: typedef int16_t int_fast16_t; Chris@16: using ::uint16_t; Chris@16: typedef uint16_t uint_least16_t; Chris@16: typedef uint16_t uint_fast16_t; Chris@16: Chris@16: using ::int32_t; Chris@16: typedef int32_t int_least32_t; Chris@16: typedef int32_t int_fast32_t; Chris@16: using ::uint32_t; Chris@16: typedef uint32_t uint_least32_t; Chris@16: typedef uint32_t uint_fast32_t; Chris@16: Chris@16: # ifndef BOOST_NO_INT64_T Chris@16: Chris@16: using ::int64_t; Chris@16: typedef int64_t int_least64_t; Chris@16: typedef int64_t int_fast64_t; Chris@16: using ::uint64_t; Chris@16: typedef uint64_t uint_least64_t; Chris@16: typedef uint64_t uint_fast64_t; Chris@16: Chris@16: typedef int64_t intmax_t; Chris@16: typedef uint64_t uintmax_t; Chris@16: Chris@16: # else Chris@16: Chris@16: typedef int32_t intmax_t; Chris@16: typedef uint32_t uintmax_t; Chris@16: Chris@16: # endif Chris@16: Chris@16: } // namespace boost Chris@16: Chris@16: #else // BOOST_HAS_STDINT_H Chris@16: Chris@16: # include // implementation artifact; not part of interface Chris@16: # include // needed for limits macros Chris@16: Chris@16: Chris@16: namespace boost Chris@16: { Chris@16: Chris@16: // These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit Chris@16: // platforms. For other systems, they will have to be hand tailored. Chris@16: // Chris@16: // Because the fast types are assumed to be the same as the undecorated types, Chris@16: // it may be possible to hand tailor a more efficient implementation. Such Chris@16: // an optimization may be illusionary; on the Intel x86-family 386 on, for Chris@16: // example, byte arithmetic and load/stores are as fast as "int" sized ones. Chris@16: Chris@16: // 8-bit types ------------------------------------------------------------// Chris@16: Chris@16: # if UCHAR_MAX == 0xff Chris@16: typedef signed char int8_t; Chris@16: typedef signed char int_least8_t; Chris@16: typedef signed char int_fast8_t; Chris@16: typedef unsigned char uint8_t; Chris@16: typedef unsigned char uint_least8_t; Chris@16: typedef unsigned char uint_fast8_t; Chris@16: # else Chris@16: # error defaults not correct; you must hand modify boost/cstdint.hpp Chris@16: # endif Chris@16: Chris@16: // 16-bit types -----------------------------------------------------------// Chris@16: Chris@16: # if USHRT_MAX == 0xffff Chris@16: # if defined(__crayx1) Chris@16: // The Cray X1 has a 16-bit short, however it is not recommend Chris@16: // for use in performance critical code. Chris@16: typedef short int16_t; Chris@16: typedef short int_least16_t; Chris@16: typedef int int_fast16_t; Chris@16: typedef unsigned short uint16_t; Chris@16: typedef unsigned short uint_least16_t; Chris@16: typedef unsigned int uint_fast16_t; Chris@16: # else Chris@16: typedef short int16_t; Chris@16: typedef short int_least16_t; Chris@16: typedef short int_fast16_t; Chris@16: typedef unsigned short uint16_t; Chris@16: typedef unsigned short uint_least16_t; Chris@16: typedef unsigned short uint_fast16_t; Chris@16: # endif Chris@16: # elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) Chris@16: // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified Chris@16: // MTA / XMT does support the following non-standard integer types Chris@16: typedef __short16 int16_t; Chris@16: typedef __short16 int_least16_t; Chris@16: typedef __short16 int_fast16_t; Chris@16: typedef unsigned __short16 uint16_t; Chris@16: typedef unsigned __short16 uint_least16_t; Chris@16: typedef unsigned __short16 uint_fast16_t; Chris@16: # elif (USHRT_MAX == 0xffffffff) && defined(CRAY) Chris@16: // no 16-bit types on Cray: Chris@16: typedef short int_least16_t; Chris@16: typedef short int_fast16_t; Chris@16: typedef unsigned short uint_least16_t; Chris@16: typedef unsigned short uint_fast16_t; Chris@16: # else Chris@16: # error defaults not correct; you must hand modify boost/cstdint.hpp Chris@16: # endif Chris@16: Chris@16: // 32-bit types -----------------------------------------------------------// Chris@16: Chris@16: # if UINT_MAX == 0xffffffff Chris@16: typedef int int32_t; Chris@16: typedef int int_least32_t; Chris@16: typedef int int_fast32_t; Chris@16: typedef unsigned int uint32_t; Chris@16: typedef unsigned int uint_least32_t; Chris@16: typedef unsigned int uint_fast32_t; Chris@16: # elif (USHRT_MAX == 0xffffffff) Chris@16: typedef short int32_t; Chris@16: typedef short int_least32_t; Chris@16: typedef short int_fast32_t; Chris@16: typedef unsigned short uint32_t; Chris@16: typedef unsigned short uint_least32_t; Chris@16: typedef unsigned short uint_fast32_t; Chris@16: # elif ULONG_MAX == 0xffffffff Chris@16: typedef long int32_t; Chris@16: typedef long int_least32_t; Chris@16: typedef long int_fast32_t; Chris@16: typedef unsigned long uint32_t; Chris@16: typedef unsigned long uint_least32_t; Chris@16: typedef unsigned long uint_fast32_t; Chris@16: # elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) Chris@16: // Integers are 64 bits on the MTA / XMT Chris@16: typedef __int32 int32_t; Chris@16: typedef __int32 int_least32_t; Chris@16: typedef __int32 int_fast32_t; Chris@16: typedef unsigned __int32 uint32_t; Chris@16: typedef unsigned __int32 uint_least32_t; Chris@16: typedef unsigned __int32 uint_fast32_t; Chris@16: # else Chris@16: # error defaults not correct; you must hand modify boost/cstdint.hpp Chris@16: # endif Chris@16: Chris@16: // 64-bit types + intmax_t and uintmax_t ----------------------------------// Chris@16: Chris@16: # if defined(BOOST_HAS_LONG_LONG) && \ Chris@16: !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \ Chris@16: (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ Chris@16: (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) Chris@16: # if defined(__hpux) Chris@16: // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions Chris@16: # elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) Chris@16: // 2**64 - 1 Chris@16: # else Chris@16: # error defaults not correct; you must hand modify boost/cstdint.hpp Chris@16: # endif Chris@16: Chris@16: typedef ::boost::long_long_type intmax_t; Chris@16: typedef ::boost::ulong_long_type uintmax_t; Chris@16: typedef ::boost::long_long_type int64_t; Chris@16: typedef ::boost::long_long_type int_least64_t; Chris@16: typedef ::boost::long_long_type int_fast64_t; Chris@16: typedef ::boost::ulong_long_type uint64_t; Chris@16: typedef ::boost::ulong_long_type uint_least64_t; Chris@16: typedef ::boost::ulong_long_type uint_fast64_t; Chris@16: Chris@16: # elif ULONG_MAX != 0xffffffff Chris@16: Chris@16: # if ULONG_MAX == 18446744073709551615 // 2**64 - 1 Chris@16: typedef long intmax_t; Chris@16: typedef unsigned long uintmax_t; Chris@16: typedef long int64_t; Chris@16: typedef long int_least64_t; Chris@16: typedef long int_fast64_t; Chris@16: typedef unsigned long uint64_t; Chris@16: typedef unsigned long uint_least64_t; Chris@16: typedef unsigned long uint_fast64_t; Chris@16: # else Chris@16: # error defaults not correct; you must hand modify boost/cstdint.hpp Chris@16: # endif Chris@16: # elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG) Chris@16: __extension__ typedef long long intmax_t; Chris@16: __extension__ typedef unsigned long long uintmax_t; Chris@16: __extension__ typedef long long int64_t; Chris@16: __extension__ typedef long long int_least64_t; Chris@16: __extension__ typedef long long int_fast64_t; Chris@16: __extension__ typedef unsigned long long uint64_t; Chris@16: __extension__ typedef unsigned long long uint_least64_t; Chris@16: __extension__ typedef unsigned long long uint_fast64_t; Chris@16: # elif defined(BOOST_HAS_MS_INT64) Chris@16: // Chris@16: // we have Borland/Intel/Microsoft __int64: Chris@16: // Chris@16: typedef __int64 intmax_t; Chris@16: typedef unsigned __int64 uintmax_t; Chris@16: typedef __int64 int64_t; Chris@16: typedef __int64 int_least64_t; Chris@16: typedef __int64 int_fast64_t; Chris@16: typedef unsigned __int64 uint64_t; Chris@16: typedef unsigned __int64 uint_least64_t; Chris@16: typedef unsigned __int64 uint_fast64_t; Chris@16: # else // assume no 64-bit integers Chris@16: # define BOOST_NO_INT64_T Chris@16: typedef int32_t intmax_t; Chris@16: typedef uint32_t uintmax_t; Chris@16: # endif Chris@16: Chris@16: } // namespace boost Chris@16: Chris@16: Chris@16: #endif // BOOST_HAS_STDINT_H Chris@16: Chris@16: // intptr_t/uintptr_t are defined separately because they are optional and not universally available Chris@16: #if defined(BOOST_WINDOWS) && !defined(_WIN32_WCE) && !defined(BOOST_HAS_STDINT_H) Chris@16: // Older MSVC don't have stdint.h and have intptr_t/uintptr_t defined in stddef.h Chris@16: #include Chris@16: #endif Chris@16: Chris@16: // PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config. Chris@16: #if !defined(__PGIC__) Chris@16: Chris@16: #if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ Chris@16: || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \ Chris@16: || defined(__CYGWIN__) \ Chris@16: || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ Chris@101: || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) Chris@16: Chris@16: namespace boost { Chris@16: using ::intptr_t; Chris@16: using ::uintptr_t; Chris@16: } Chris@16: #define BOOST_HAS_INTPTR_T Chris@16: Chris@16: // Clang pretends to be GCC, so it'll match this condition Chris@16: #elif defined(__GNUC__) && defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__) Chris@16: Chris@16: namespace boost { Chris@16: typedef __INTPTR_TYPE__ intptr_t; Chris@16: typedef __UINTPTR_TYPE__ uintptr_t; Chris@16: } Chris@16: #define BOOST_HAS_INTPTR_T Chris@16: Chris@16: #endif Chris@16: Chris@16: #endif // !defined(__PGIC__) Chris@16: Chris@16: #endif // BOOST_CSTDINT_HPP Chris@16: Chris@16: Chris@16: /**************************************************** Chris@16: Chris@16: Macro definition section: Chris@16: Chris@16: Added 23rd September 2000 (John Maddock). Chris@16: Modified 11th September 2001 to be excluded when Chris@16: BOOST_HAS_STDINT_H is defined (John Maddock). Chris@16: Modified 11th Dec 2009 to always define the Chris@16: INT#_C macros if they're not already defined (John Maddock). Chris@16: Chris@16: ******************************************************/ Chris@16: Chris@16: #if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ Chris@16: (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) Chris@16: // Chris@16: // For the following code we get several warnings along the lines of: Chris@16: // Chris@16: // boost/cstdint.hpp:428:35: error: use of C99 long long integer constant Chris@16: // Chris@16: // So we declare this a system header to suppress these warnings. Chris@16: // Chris@16: #if defined(__GNUC__) && (__GNUC__ >= 4) Chris@16: #pragma GCC system_header Chris@16: #endif Chris@16: Chris@16: #include Chris@16: # define BOOST__STDC_CONSTANT_MACROS_DEFINED Chris@16: # if defined(BOOST_HAS_MS_INT64) Chris@16: // Chris@16: // Borland/Intel/Microsoft compilers have width specific suffixes: Chris@16: // Chris@16: #ifndef INT8_C Chris@16: # define INT8_C(value) value##i8 Chris@16: #endif Chris@16: #ifndef INT16_C Chris@16: # define INT16_C(value) value##i16 Chris@16: #endif Chris@16: #ifndef INT32_C Chris@16: # define INT32_C(value) value##i32 Chris@16: #endif Chris@16: #ifndef INT64_C Chris@16: # define INT64_C(value) value##i64 Chris@16: #endif Chris@16: # ifdef __BORLANDC__ Chris@16: // Borland bug: appending ui8 makes the type a signed char Chris@16: # define UINT8_C(value) static_cast(value##u) Chris@16: # else Chris@16: # define UINT8_C(value) value##ui8 Chris@16: # endif Chris@16: #ifndef UINT16_C Chris@16: # define UINT16_C(value) value##ui16 Chris@16: #endif Chris@16: #ifndef UINT32_C Chris@16: # define UINT32_C(value) value##ui32 Chris@16: #endif Chris@16: #ifndef UINT64_C Chris@16: # define UINT64_C(value) value##ui64 Chris@16: #endif Chris@16: #ifndef INTMAX_C Chris@16: # define INTMAX_C(value) value##i64 Chris@16: # define UINTMAX_C(value) value##ui64 Chris@16: #endif Chris@16: Chris@16: # else Chris@16: // do it the old fashioned way: Chris@16: Chris@16: // 8-bit types ------------------------------------------------------------// Chris@16: Chris@16: # if (UCHAR_MAX == 0xff) && !defined(INT8_C) Chris@16: # define INT8_C(value) static_cast(value) Chris@16: # define UINT8_C(value) static_cast(value##u) Chris@16: # endif Chris@16: Chris@16: // 16-bit types -----------------------------------------------------------// Chris@16: Chris@16: # if (USHRT_MAX == 0xffff) && !defined(INT16_C) Chris@16: # define INT16_C(value) static_cast(value) Chris@16: # define UINT16_C(value) static_cast(value##u) Chris@16: # endif Chris@16: Chris@16: // 32-bit types -----------------------------------------------------------// Chris@16: #ifndef INT32_C Chris@16: # if (UINT_MAX == 0xffffffff) Chris@16: # define INT32_C(value) value Chris@16: # define UINT32_C(value) value##u Chris@16: # elif ULONG_MAX == 0xffffffff Chris@16: # define INT32_C(value) value##L Chris@16: # define UINT32_C(value) value##uL Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: // 64-bit types + intmax_t and uintmax_t ----------------------------------// Chris@16: #ifndef INT64_C Chris@16: # if defined(BOOST_HAS_LONG_LONG) && \ Chris@101: (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_ULLONG_MAX) || defined(_LLONG_MAX)) Chris@16: Chris@16: # if defined(__hpux) Chris@16: // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions Chris@16: # define INT64_C(value) value##LL Chris@16: # define UINT64_C(value) value##uLL Chris@16: # elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \ Chris@16: (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \ Chris@16: (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \ Chris@101: (defined(_ULLONG_MAX) && _ULLONG_MAX == 18446744073709551615ULL) || \ Chris@101: (defined(_LLONG_MAX) && _LLONG_MAX == 9223372036854775807LL) Chris@16: Chris@16: # define INT64_C(value) value##LL Chris@16: # define UINT64_C(value) value##uLL Chris@16: # else Chris@16: # error defaults not correct; you must hand modify boost/cstdint.hpp Chris@16: # endif Chris@16: # elif ULONG_MAX != 0xffffffff Chris@16: Chris@16: # if ULONG_MAX == 18446744073709551615U // 2**64 - 1 Chris@16: # define INT64_C(value) value##L Chris@16: # define UINT64_C(value) value##uL Chris@16: # else Chris@16: # error defaults not correct; you must hand modify boost/cstdint.hpp Chris@16: # endif Chris@16: # elif defined(BOOST_HAS_LONG_LONG) Chris@16: // Usual macros not defined, work things out for ourselves: Chris@16: # if(~0uLL == 18446744073709551615ULL) Chris@16: # define INT64_C(value) value##LL Chris@16: # define UINT64_C(value) value##uLL Chris@16: # else Chris@16: # error defaults not correct; you must hand modify boost/cstdint.hpp Chris@16: # endif Chris@16: # else Chris@16: # error defaults not correct; you must hand modify boost/cstdint.hpp Chris@16: # endif Chris@16: Chris@16: # ifdef BOOST_NO_INT64_T Chris@16: # define INTMAX_C(value) INT32_C(value) Chris@16: # define UINTMAX_C(value) UINT32_C(value) Chris@16: # else Chris@16: # define INTMAX_C(value) INT64_C(value) Chris@16: # define UINTMAX_C(value) UINT64_C(value) Chris@16: # endif Chris@16: #endif Chris@16: # endif // Borland/Microsoft specific width suffixes Chris@16: Chris@16: #endif // INT#_C macros. Chris@16: Chris@16: Chris@16: Chris@16: