On Thu, 11 Jan 2001 08:45:50 -0600 Craig Berry wrote:

>>+/* Define if your processor stores words with the most significant
>>+   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
>>+#undef WORDS_BIGENDIAN
>
>Is this completely scrambled or have I just not had enough coffee
>yet?  I coulda sworn big endian meant most significant byte at the
>high address and that VAX/AXP were the opposite of Intel in this
>regard.  Or does this only refer to 16-bit chunks and not 32- or 64-bit
>chunks?

FWIW the test that the meta-dist Configure test (i.e. for perl) is done
with the following program:

$ type try.c
#include <stdio.h>
main()
{
        int i;
        union {
                unsigned long l;
                char c[sizeof(long)];
        } u;

        if (sizeof(long) > 4)
                u.l = (0x08070605L << 32) | 0x04030201L;
        else
                u.l = 0x04030201L;
        for (i = 0; i < sizeof(long); i++)
                printf("%c", u.c[i]+'0');
        printf("\n");
        exit(0);
}

For DECC V5.5-002 and without stdlib.h you'd likely need to change that
last C<exit(0);> to C<return(0);>.  At any rate the result of running
the program on a 21064 Alpha is:

 $ mcr []try
 1234

Hence little endian.

Peter Prymmer


Reply via email to