[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Also


On solaris sparc #define WORDS_BIG_ENDIAN 1 in config.h APPLE define does
no figure this out

here's some code that will figure things out for you at runtime is you
want it.

    unsigned long x = 0x01020304;
    unsigned char *c = (unsigned char *)&x;
    if(*c == 4)
        printf("little\n");
    else if(*c == 1)
        printf("big\n");
    return 0;



Follow-Ups:
Re: AlsoAndreas Schneider <mail@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org