From bc61853ff3eb0b01df5f7dec8960bb8c71192423 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 29 Jul 2002 20:30:38 +0000 Subject: [PATCH] Fixed endian test on FreeBSD --- examples/endian.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/endian.c b/examples/endian.c index a7708384..7a40a2e0 100644 --- a/examples/endian.c +++ b/examples/endian.c @@ -39,6 +39,7 @@ int main(void) /* * First test BYTE_ORDER */ +#ifdef BYTE_ORDER if (BYTE_ORDER == 1234) { printf("le"); } else if (BYTE_ORDER == 4321) { @@ -47,12 +48,16 @@ int main(void) /* * If it failed do a simple CPU test */ +#endif #ifdef __i386__ printf("le"); #else printf("be"); #endif +#ifdef BYTE_ORDER } +#endif + return 0; }