[Boost-bugs] [Boost C++ Libraries] #3177: Default integer types in boost/cstdint.hpp are incorrect on XMT/MTA

Subject: [Boost-bugs] [Boost C++ Libraries] #3177: Default integer types in boost/cstdint.hpp are incorrect on XMT/MTA
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-06-15 18:19:33


#3177: Default integer types in boost/cstdint.hpp are incorrect on XMT/MTA
-----------------------------+----------------------------------------------
 Reporter: ngedmond | Owner: dlwalker
     Type: Patches | Status: new
Milestone: Boost 1.40.0 | Component: integer
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: XMT MTA integer |
-----------------------------+----------------------------------------------
 Integer types in boost/cstdint.hpp are not correct for Cray XMT/Tera
 MTA-2. The following patch works for me. I can't imagine any other
 compiler definines '__MTA__' so this patch should be non-intrusive. Feel
 free to strip comments as appropriate.

 Index: cstdint.hpp
 ===================================================================
 --- cstdint.hpp (revision 53635)
 +++ cstdint.hpp (working copy)
 @@ -226,6 +226,15 @@
       typedef short int_fast16_t;
       typedef unsigned short uint_least16_t;
       typedef unsigned short uint_fast16_t;
 +# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__)
 + // On MTA / XMT short is 32 bits unless the -short16 compiler flag
 is specified
 + // MTA / XMT does support the following non-standard integer types
 + typedef __short16 int16_t;
 + typedef __short16 int_least16_t;
 + typedef __short16 int_fast16_t;
 + typedef unsigned __short16 uint16_t;
 + typedef unsigned __short16 uint_least16_t;
 + typedef unsigned __short16 uint_fast16_t;
  # else
  # error defaults not correct; you must hand modify boost/cstdint.hpp
  # endif
 @@ -246,6 +255,14 @@
       typedef unsigned int uint32_t;
       typedef unsigned int uint_least32_t;
       typedef unsigned int uint_fast32_t;
 +# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__)
 + // Integers are 64 bits on the MTA / XMT
 + typedef __int32 int32_t;
 + typedef __int32 int_least32_t;
 + typedef __int32 int_fast32_t;
 + typedef unsigned __int32 uint32_t;
 + typedef unsigned __int32 uint_least32_t;
 + typedef unsigned __int32 uint_fast32_t;
  # else
  # error defaults not correct; you must hand modify boost/cstdint.hpp
  # endif

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3177>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC