Boost C++ Libraries: Ticket #3177: Default integer types in boost/cstdint.hpp are incorrect on XMT/MTA https://svn.boost.org/trac10/ticket/3177 <p> 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 '<span class="underline">MTA</span>' so this patch should be non-intrusive. Feel free to strip comments as appropriate. </p> <p> Index: cstdint.hpp =================================================================== --- cstdint.hpp (revision 53635) +++ cstdint.hpp (working copy) @@ -226,6 +226,15 @@ </p> <blockquote> <p> typedef short int_fast16_t; typedef unsigned short uint_least16_t; typedef unsigned short uint_fast16_t; </p> </blockquote> <p> +# elif (USHRT_MAX == 0xffffffff) &amp;&amp; defined(<span class="underline">MTA</span>) + <em> On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified + </em> MTA / XMT does support the following non-standard integer types + typedef <span class="underline">short16 int16_t; + typedef </span>short16 int_least16_t; + typedef <span class="underline">short16 int_fast16_t; + typedef unsigned </span>short16 uint16_t; + typedef unsigned <span class="underline">short16 uint_least16_t; + typedef unsigned </span>short16 uint_fast16_t; </p> <blockquote> <p> # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif </p> </blockquote> <p> @@ -246,6 +255,14 @@ </p> <blockquote> <p> typedef unsigned int uint32_t; typedef unsigned int uint_least32_t; typedef unsigned int uint_fast32_t; </p> </blockquote> <p> +# elif (UINT_MAX == 0xffffffffffffffff) &amp;&amp; defined(<span class="underline">MTA</span>) + <em> Integers are 64 bits on the MTA / XMT + typedef <span class="underline">int32 int32_t; + typedef </span>int32 int_least32_t; + typedef <span class="underline">int32 int_fast32_t; + typedef unsigned </span>int32 uint32_t; + typedef unsigned <span class="underline">int32 uint_least32_t; + typedef unsigned </span>int32 uint_fast32_t; </em></p> <blockquote> <p> # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3177 Trac 1.4.3 ngedmond Mon, 15 Jun 2009 18:22:57 GMT attachment set https://svn.boost.org/trac10/ticket/3177 https://svn.boost.org/trac10/ticket/3177 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">MTA_integer_patch</span> </li> </ul> Ticket Jeremiah Willcock Mon, 15 Jun 2009 18:30:30 GMT owner changed https://svn.boost.org/trac10/ticket/3177#comment:1 https://svn.boost.org/trac10/ticket/3177#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Daryle Walker</span> to <span class="trac-author">Jeremiah Willcock</span> </li> </ul> Ticket Jeremiah Willcock Mon, 15 Jun 2009 18:31:56 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3177#comment:2 https://svn.boost.org/trac10/ticket/3177#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> Closing because this will be resubmitted as a new ticket. </p> Ticket