No subject


Wed Oct 7 22:37:18 EDT 2009


/* what byte order */<br>
/* All compilers that support Mac OS X define either<br>
__BIG_ENDIAN__ or<br>
__LITTLE_ENDIAN__ to match the endianness of the architecture<br>
being<br>
compiled for. This is not necessarily the same as the<br>
architecture of<br>
the machine doing the building. In order to support Universal<br>
Binaries on<br>
Mac OS X, we prefer those defines to decide the endianness.<br>
On other platform, we use the result of the TRY_RUN. */<br>
#if !defined(__APPLE__)<br>
#cmakedefine CMAKE_WORDS_BIGENDIAN<br>
#ifdef CMAKE_WORDS_BIGENDIAN<br>
=A0#define ITK_WORDS_BIGENDIAN<br>
#endif<br>
#elif defined(__BIG_ENDIAN__)<br>
#define CMAKE_WORDS_BIGENDIAN<br>
#define ITK_WORDS_BIGENDIAN<br>
#endif<br>
<br>
<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Thanks for investigating this.<br>
<br>
If there isn&#39;t a way for the preprocessor to know &quot;am I a cross-<b=
r>
compiled mac&quot;, for the time being we can just use whatever pre-<br>
processor means is used to say &quot;am I a mac&quot;, and then fix it a<br=
>
more<br>
refined way later.<br>
<br>
Gordon<br>
<br>
On Feb 25, 2010, at 3:54 PM, Michel Audette wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Brad,<br>
<br>
as Gordon suspected, the line in sane.c which was causing your<br>
tests<br>
to fail is the one with #ifdef /#endif section within<br>
if (!( airFP_QNAN =3D=3D airFPClass_f(AIR_NAN)<br>
 =A0 =A0 &amp;&amp; airFP_QNAN =3D=3D airFPClass_f(AIR_QNAN)<br>
#if !defined(_MSC_VER) || _MSC_VER &lt; 1400 /* VS2005 converts<br>
SNAN to<br>
QNAN */<br>
 =A0 =A0 &amp;&amp; airFP_SNAN =3D=3D airFPClass_f(AIR_SNAN)<br>
#endif<br>
 =A0 =A0 &amp;&amp; airFP_QNAN =3D=3D airFPClass_d(AIR_NAN)<br>
 =A0 =A0 &amp;&amp; airFP_QNAN =3D=3D airFPClass_d(AIR_QNAN) )) {<br>
<br>
return airInsane_AIR_NAN;<br>
}<br>
<br>
On the cross-compiled Mac, I did a printf:<br>
airFP_QNAN 2 airFPClass_f(AIR_NAN) 2<br>
airFP_QNAN 2 airFPClass_f(AIR_QNAN) 2<br>
!ifdef airFP_SNAN 1 airFPClass_f(AIR_NAN) 2<br>
airFP_QNAN 2 airFPClass_f(AIR_NAN) 2<br>
airFP_QNAN 2 airFPClass_f(AIR_QNAN) 2<br>
<br>
On Linux, I get:<br>
airFP_QNAN 2 airFPClass_f(AIR_NAN) 2<br>
airFP_QNAN 2 airFPClass_f(AIR_QNAN) 2<br>
!ifdef airFP_SNAN 1 airFPClass_f(AIR_NAN) 1<br>
airFP_QNAN 2 airFPClass_f(AIR_NAN) 2<br>
airFP_QNAN 2 airFPClass_f(AIR_QNAN) 2<br>
<br>
Question is then: what is an appropriate preprocessor flag for<br>
cross-<br>
compiled Macs?<br>
<br>
Best wishes,<br>
<br>
Michel<br>
-- <br>
Michel Audette, Ph.D.<br>
R &amp; D Engineer,<br>
Kitware Inc.,<br>
Chapel Hill, N.C.<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D<br>
Bradley Lowekamp<br>
Lockheed Martin Contractor for<br>
Office of High Performance Computing and Communications<br>
National Library of Medicine<br>
<a href=3D"mailto:blowekamp at mail.nih.gov" target=3D"_blank">blowekamp at mail.=
nih.gov</a><br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D<br>
Bradley Lowekamp<br>
Lockheed Martin Contractor for<br>
Office of High Performance Computing and Communications<br>
National Library of Medicine<br>
<a href=3D"mailto:blowekamp at mail.nih.gov" target=3D"_blank">blowekamp at mail.=
nih.gov</a><br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D<br>
Bradley Lowekamp<br>
Lockheed Martin Contractor for<br>
Office of High Performance Computing and Communications<br>
National Library of Medicine<br>
<a href=3D"mailto:blowekamp at mail.nih.gov" target=3D"_blank">blowekamp at mail.=
nih.gov</a><br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>Michel Aude=
tte, Ph.D. <br>R &amp; D Engineer, <br>Kitware Inc.,<br>Chapel Hill, N.C. <=
br><br>

--0016e68db920c4b4d00480fbca10--


More information about the Insight-developers mailing list