CMake/Modules/TestBigEndian.c

11 lines
190 B
C
Raw Normal View History

2002-10-01 23:56:18 +04:00
int main () {
/* Are we little or big endian? From Harbison&Steele. */
union
{
long l;
char c[sizeof (long)];
} u;
u.l = 1;
return (u.c[sizeof (long) - 1] == 1)?1:0;
2002-10-01 23:56:18 +04:00
}