Fixed endian test on FreeBSD

This commit is contained in:
Michiel Broek 2002-07-29 20:30:38 +00:00
parent d28605477c
commit bc61853ff3

View File

@ -39,6 +39,7 @@ int main(void)
/* /*
* First test BYTE_ORDER * First test BYTE_ORDER
*/ */
#ifdef BYTE_ORDER
if (BYTE_ORDER == 1234) { if (BYTE_ORDER == 1234) {
printf("le"); printf("le");
} else if (BYTE_ORDER == 4321) { } else if (BYTE_ORDER == 4321) {
@ -47,12 +48,16 @@ int main(void)
/* /*
* If it failed do a simple CPU test * If it failed do a simple CPU test
*/ */
#endif
#ifdef __i386__ #ifdef __i386__
printf("le"); printf("le");
#else #else
printf("be"); printf("be");
#endif #endif
#ifdef BYTE_ORDER
} }
#endif
return 0; return 0;
} }