You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qt3/config.tests/unix/endian/endiantest.cpp

9 lines
222 B

int main(int, char **)
{
unsigned char bytes[] = { 0x01, 0x02, 0x03, 0x04 };
unsigned int *integer = (unsigned int *) bytes;
return (*integer == 0x01020304 ?
0 : // big endian
1); // little endian
}