I get the same thing on my Sparc, but if I modify your code:<br><br>int main( void )<br>{<br>#ifndef __FLOAT_WORD_ORDER<br>&nbsp; printf( &quot;Q3 has no clue!\n&quot; );<br>&nbsp; return 0;<br>#endif<br><br>&nbsp; printf( &quot;Q3 thinks this machine is &quot; );
<br><br>#if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN<br>&nbsp; printf( &quot;little endian\n&quot; );<br>#else<br>&nbsp; printf( &quot;big endian\n&quot; );<br>#endif<br><br>&nbsp; return 0;<br>}<br><br><br>I get:<br><br>bacardi:/tmp&gt; ./a.out
<br>Q3 has no clue!<br><br>I just checked a couple other architectures (ai32, Alpha, Power4), and I can't find __FLOAT_WORD_ORDER or __LITTLE_ENDIAN defined on any machine.&nbsp; This is why the test chooses little--because they are both undefined therefore equal one another.&nbsp; Perhaps a more generic #define should be used in the code, and the appropriate value be set for each arch in the Makefile.
<br><br>I guess I was lucky when building on my Alpha as it is little endian.<br><br><br><div><span class="gmail_quote">On 11/1/05, <b class="gmail_sendername">
<a href="mailto:vincent@cojot.name" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">vincent@cojot.name</a></b> &lt;<a href="mailto:vincent@cojot.name" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
vincent@cojot.name</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>You know, This PPC problem made me realize something as Solaris/Sparc<br>suffers from the same symptoms as PPC (no VM_compiled, using interpreter<br>and then a sig 10 or sig 11).<br><br>When running q3_endian_test on Solaris/Sparc it resulted in:
<br><br>raistlin@ergoth:[/net/thorbardin/export/home/raistlin ]cat q3_endian.c<br>#include &lt;assert.h&gt;<br>#include &lt;math.h&gt;<br>#include &lt;stdio.h&gt;<br>#include &lt;stdarg.h&gt;<br>#include &lt;string.h&gt;
<br>
#include &lt;stdlib.h&gt;<br>#include &lt;time.h&gt;<br>#include &lt;ctype.h&gt;<br>#include &lt;limits.h&gt;<br>#include &lt;stdio.h&gt;<br><br>int main( void )<br>{<br>&nbsp;&nbsp; printf( &quot;Q3 thinks this machine is &quot; );
<br><br>#if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN<br>&nbsp;&nbsp; printf( &quot;little endian\n&quot; );<br>#else<br>&nbsp;&nbsp; printf( &quot;big endian\n&quot; );<br>#endif<br><br>&nbsp;&nbsp; return 0;<br>}<br><br>raistlin@ergoth:[/net/thorbardin/export/home/raistlin ]./q3_endian
<br>Q3 thinks this machine is little endian<br><br>Obviously this is wrong for Solaris/Sparc and __FLOAT_WORD_ORDER is<br>nowhere to be defined anyway.. I'll be checking the #ifdef in the VM<br>stuff..<br><br>Vincent<br>
</blockquote>
</div><br><br clear="all"><br>-- <br>Chad Gatesman<br><a href="http://gatesman.dyndns.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://gatesman.dyndns.org/</a>