[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Also
  [Thread Prev] | [Thread Next]
 
 
- Subject: Also
- From: "Mark Martin" <mark@xxxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 29 Jul 2009 10:38:23 -0500 (CDT)
- To: libssh@xxxxxxxxxx
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;
| Re: Also | Andreas Schneider <mail@xxxxxxxxxxxx> | 

