|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60261 - branches/release/boost/archive
From: ramey_at_[hidden]
Date: 2010-03-06 21:12:51
Author: ramey
Date: 2010-03-06 21:12:51 EST (Sat, 06 Mar 2010)
New Revision: 60261
URL: http://svn.boost.org/trac/boost/changeset/60261
Log:
improve portability for 64 bit integers
Text files modified:
branches/release/boost/archive/polymorphic_iarchive.hpp | 30 +++++++-----------------------
branches/release/boost/archive/polymorphic_oarchive.hpp | 31 ++++++++-----------------------
2 files changed, 15 insertions(+), 46 deletions(-)
Modified: branches/release/boost/archive/polymorphic_iarchive.hpp
==============================================================================
--- branches/release/boost/archive/polymorphic_iarchive.hpp (original)
+++ branches/release/boost/archive/polymorphic_iarchive.hpp 2010-03-06 21:12:51 EST (Sat, 06 Mar 2010)
@@ -38,26 +38,6 @@
#include <boost/archive/detail/decl.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
-// determine if its necessary to handle (u)int64_t specifically
-// i.e. that its not a synonym for (unsigned) long
-// if there is no 64 bit int or if its the same as a long
-// we shouldn't define separate functions for int64 data types.
-#if defined(BOOST_NO_INT64_T)
- #define BOOST_NO_INTRINSIC_INT64_T
-#else
- #if defined(ULLONG_MAX)
- #if(ULONG_MAX == 18446744073709551615ul) // 2**64 - 1
- #define BOOST_NO_INTRINSIC_INT64_T
- #endif
- #elif defined(ULONG_MAX)
- #if(ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615ul) // 2**64 - 1
- #define BOOST_NO_INTRINSIC_INT64_T
- #endif
- #else
- #define BOOST_NO_INTRINSIC_INT64_T
- #endif
-#endif
-
namespace boost {
template<class T>
class shared_ptr;
@@ -99,10 +79,14 @@
virtual void load(long & t) = 0;
virtual void load(unsigned long & t) = 0;
- #if !defined(BOOST_NO_INTRINSIC_INT64_T)
- virtual void load(boost::int64_t & t) = 0;
- virtual void load(boost::uint64_t & t) = 0;
+ #if defined(BOOST_HAS_LONG_LONG)
+ virtual void load(boost::long_long_type & t) = 0;
+ virtual void load(boost::ulong_long_type & t) = 0;
+ #elif defined(BOOST_HAS_MS_INT64)
+ virtual void load(__int64 & t) = 0;
+ virtual void load(unsigned __int64 & t) = 0;
#endif
+
virtual void load(float & t) = 0;
virtual void load(double & t) = 0;
Modified: branches/release/boost/archive/polymorphic_oarchive.hpp
==============================================================================
--- branches/release/boost/archive/polymorphic_oarchive.hpp (original)
+++ branches/release/boost/archive/polymorphic_oarchive.hpp 2010-03-06 21:12:51 EST (Sat, 06 Mar 2010)
@@ -37,26 +37,6 @@
#include <boost/archive/detail/decl.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
-// determine if its necessary to handle (u)int64_t specifically
-// i.e. that its not a synonym for (unsigned) long
-// if there is no 64 bit int or if its the same as a long
-// we shouldn't define separate functions for int64 data types.
-#if defined(BOOST_NO_INT64_T)
- #define BOOST_NO_INTRINSIC_INT64_T
-#else
- #if defined(ULLONG_MAX)
- #if(ULONG_MAX == 18446744073709551615ul) // 2**64 - 1
- #define BOOST_NO_INTRINSIC_INT64_T
- #endif
- #elif defined(ULONG_MAX)
- #if(ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615ul) // 2**64 - 1
- #define BOOST_NO_INTRINSIC_INT64_T
- #endif
- #else
- #define BOOST_NO_INTRINSIC_INT64_T
- #endif
-#endif
-
namespace boost {
template<class T>
class shared_ptr;
@@ -97,10 +77,15 @@
virtual void save(const unsigned int t) = 0;
virtual void save(const long t) = 0;
virtual void save(const unsigned long t) = 0;
- #if !defined(BOOST_NO_INTRINSIC_INT64_T)
- virtual void save(const boost::int64_t t) = 0;
- virtual void save(const boost::uint64_t t) = 0;
+
+ #if defined(BOOST_HAS_LONG_LONG)
+ virtual void save(const boost::long_long_type t) = 0;
+ virtual void save(const boost::ulong_long_type t) = 0;
+ #elif defined(BOOST_HAS_MS_INT64)
+ virtual void save(const __int64 t) = 0;
+ virtual void save(const unsigned __int64 t) = 0;
#endif
+
virtual void save(const float t) = 0;
virtual void save(const double t) = 0;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk