Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65299 - trunk/boost
From: john_at_[hidden]
Date: 2010-09-05 12:27:20


Author: johnmaddock
Date: 2010-09-05 12:27:09 EDT (Sun, 05 Sep 2010)
New Revision: 65299
URL: http://svn.boost.org/trac/boost/changeset/65299

Log:
Change logic so that int32_t etc is an int rather than a long where possible.
Text files modified:
   trunk/boost/cstdint.hpp | 23 +++++++++++++++--------
   1 files changed, 15 insertions(+), 8 deletions(-)

Modified: trunk/boost/cstdint.hpp
==============================================================================
--- trunk/boost/cstdint.hpp (original)
+++ trunk/boost/cstdint.hpp 2010-09-05 12:27:09 EDT (Sun, 05 Sep 2010)
@@ -256,20 +256,27 @@
 
 // 32-bit types -----------------------------------------------------------//
 
-# if ULONG_MAX == 0xffffffff
- typedef long int32_t;
- typedef long int_least32_t;
- typedef long int_fast32_t;
- typedef unsigned long uint32_t;
- typedef unsigned long uint_least32_t;
- typedef unsigned long uint_fast32_t;
-# elif UINT_MAX == 0xffffffff
+# if UINT_MAX == 0xffffffff
      typedef int int32_t;
      typedef int int_least32_t;
      typedef int int_fast32_t;
      typedef unsigned int uint32_t;
      typedef unsigned int uint_least32_t;
      typedef unsigned int uint_fast32_t;
+# elif (USHRT_MAX == 0xffffffff)
+ typedef short int32_t;
+ typedef short int_least32_t;
+ typedef short int_fast32_t;
+ typedef unsigned short uint32_t;
+ typedef unsigned short uint_least32_t;
+ typedef unsigned short uint_fast32_t;
+# elif ULONG_MAX == 0xffffffff
+ typedef long int32_t;
+ typedef long int_least32_t;
+ typedef long int_fast32_t;
+ typedef unsigned long uint32_t;
+ typedef unsigned long uint_least32_t;
+ typedef unsigned long uint_fast32_t;
 # elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__)
       // Integers are 64 bits on the MTA / XMT
       typedef __int32 int32_t;


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