// boost cstdint.hpp header file ------------------------------------------//
-// (C) Copyright boost.org 1999. Permission to copy, use, modify, sell
-// and distribute this software is granted provided this copyright
-// notice appears in all copies. This software is provided "as is" without
-// express or implied warranty, and with no claim as to its suitability for
-// any purpose.
+// (C) Copyright Beman Dawes 1999.
+// (C) Copyright Jens Mauer 2001
+// (C) Copyright John Maddock 2001
+// Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/integer for documentation.
// Revision History
// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.)
// this is triggered with GCC, because it defines __cplusplus < 199707L
# define BOOST_NO_INT64_T
# endif
-# elif defined(__FreeBSD__) || defined(__IBMCPP__)
+# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)
# include <inttypes.h>
# else
# include <stdint.h>
+
+// There is a bug in Cygwin two _C macros
+# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
+# undef INTMAX_C
+# undef UINTMAX_C
+# define INTMAX_C(c) c##LL
+# define UINTMAX_C(c) c##ULL
+# endif
+
# endif
+#ifdef __QNX__
+
+// QNX (Dinkumware stdlib) defines these as non-standard names.
+// Reflect to the standard names.
+
+typedef ::intleast8_t int_least8_t;
+typedef ::intfast8_t int_fast8_t;
+typedef ::uintleast8_t uint_least8_t;
+typedef ::uintfast8_t uint_fast8_t;
+
+typedef ::intleast16_t int_least16_t;
+typedef ::intfast16_t int_fast16_t;
+typedef ::uintleast16_t uint_least16_t;
+typedef ::uintfast16_t uint_fast16_t;
+
+typedef ::intleast32_t int_least32_t;
+typedef ::intfast32_t int_fast32_t;
+typedef ::uintleast32_t uint_least32_t;
+typedef ::uintfast32_t uint_fast32_t;
+
+# ifndef BOOST_NO_INT64_T
+
+typedef ::intleast64_t int_least64_t;
+typedef ::intfast64_t int_fast64_t;
+typedef ::uintleast64_t uint_least64_t;
+typedef ::uintfast64_t uint_fast64_t;
+
+# endif
+
+#endif
+
namespace boost
{
} // namespace boost
-#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4)
-// FreeBSD has an <inttypes.h> that contains much of what we need
+#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__)
+// FreeBSD and Tru64 have an <inttypes.h> that contains much of what we need.
# include <inttypes.h>
namespace boost {
#else // BOOST_HAS_STDINT_H
-# include <limits.h> // implementation artifact; not part of interface
+# include <boost/limits.hpp> // implementation artifact; not part of interface
+# include <limits.h> // needed for limits macros
namespace boost
// 16-bit types -----------------------------------------------------------//
# if USHRT_MAX == 0xffff
+# if defined(__crayx1)
+ // The Cray X1 has a 16-bit short, however it is not recommend
+ // for use in performance critical code.
+ typedef short int16_t;
+ typedef short int_least16_t;
+ typedef int int_fast16_t;
+ typedef unsigned short uint16_t;
+ typedef unsigned short uint_least16_t;
+ typedef unsigned int uint_fast16_t;
+# else
typedef short int16_t;
typedef short int_least16_t;
typedef short int_fast16_t;
typedef unsigned short uint16_t;
typedef unsigned short uint_least16_t;
typedef unsigned short uint_fast16_t;
+# endif
+# elif (USHRT_MAX == 0xffffffff) && defined(CRAY)
+ // no 16-bit types on Cray:
+ typedef short int_least16_t;
+ typedef short int_fast16_t;
+ typedef unsigned short uint_least16_t;
+ typedef unsigned short uint_fast16_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# 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;
- typedef long long int_least64_t;
- typedef long long int_fast64_t;
- typedef unsigned long long uint64_t;
- typedef unsigned long long uint_least64_t;
- typedef unsigned long long uint_fast64_t;
+ typedef ::boost::long_long_type intmax_t;
+ typedef ::boost::ulong_long_type uintmax_t;
+ typedef ::boost::long_long_type int64_t;
+ typedef ::boost::long_long_type int_least64_t;
+ typedef ::boost::long_long_type int_fast64_t;
+ typedef ::boost::ulong_long_type uint64_t;
+ typedef ::boost::ulong_long_type uint_least64_t;
+ typedef ::boost::ulong_long_type uint_fast64_t;
# elif ULONG_MAX != 0xffffffff
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
+# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG)
+ __extension__ typedef long long intmax_t;
+ __extension__ typedef unsigned long long uintmax_t;
+ __extension__ typedef long long int64_t;
+ __extension__ typedef long long int_least64_t;
+ __extension__ typedef long long int_fast64_t;
+ __extension__ typedef unsigned long long uint64_t;
+ __extension__ typedef unsigned long long uint_least64_t;
+ __extension__ typedef unsigned long long uint_fast64_t;
# elif defined(BOOST_HAS_MS_INT64)
//
// we have Borland/Intel/Microsoft __int64:
#endif // __STDC_CONSTANT_MACROS_DEFINED etc.
+
+