From 6a093cf955c070f54513ff2ee2ad97ca6168609e Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Fri, 22 Sep 2000 20:39:23 +0000 Subject: [PATCH] 64-bit integer improvements from John Maddock [SVN r7776] --- include/boost/cstdint.hpp | 5 +++-- include/boost/stdint.h | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/include/boost/cstdint.hpp b/include/boost/cstdint.hpp index 3e58eee..a790bd6 100644 --- a/include/boost/cstdint.hpp +++ b/include/boost/cstdint.hpp @@ -9,8 +9,9 @@ // See http://www.boost.org for most recent version including documentation. // Revision History +// 22 Sep 00 Better 64-bit support (John Maddock) // 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost -// 8 Aug 99 Initial version +// 8 Aug 99 Initial version (Beman Dawes) #ifndef BOOST_CSTDINT_HPP #define BOOST_CSTDINT_HPP @@ -43,7 +44,7 @@ namespace boost using ::uint_least32_t; using ::uint_fast32_t; -# ifdef ULLONG_MAX +# ifdef BOOST_NO_INT64_T using ::int64_t; using ::int_least64_t; diff --git a/include/boost/stdint.h b/include/boost/stdint.h index b9c2ff0..c028986 100644 --- a/include/boost/stdint.h +++ b/include/boost/stdint.h @@ -12,7 +12,8 @@ // this header. // Revision History -// 8 Aug 99 Initial version +// 22 Sep 00 64-bit support for Borland & Microsoft compilers (John Maddock) +// 8 Aug 99 Initial version (Beman Dawes) #ifndef BOOST_STDINT_H #define BOOST_STDINT_H @@ -110,7 +111,20 @@ # else # error defaults not correct; you must hand modify boost/stdint.hpp # endif +# elif (defined(BOOST_MSVC) && (BOOST_MSVC >= 1100)) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)) + // + // we have Borland/Microsoft __int64: + // + typedef __int64 intmax_t; + typedef unsigned __int64 uintmax_t; + typedef __int64 int64_t; + typedef __int64 int_least64_t; + typedef __int64 int_fast64_t; + typedef unsigned __int64 uint64_t; + typedef unsigned __int64 uint_least64_t; + typedef unsigned __int64 uint_fast64_t; # else // assume no 64-bit integers +#define BOOST_NO_INT64_T typedef int32_t intmax_t; typedef uint32_t uintmax_t; # endif