X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fdetermine-endianness.c;h=b59d2ed573876eb988da5e1b0ba23c47f3a0d891;hb=152c97de336af584a9b133207a772c704e3245cf;hp=e1001c440ff008ad5c615b8735308e17b3414b44;hpb=435b7acd186484b1eed5ab615c43bcc1701fcd6c;p=sbcl.git diff --git a/tools-for-build/determine-endianness.c b/tools-for-build/determine-endianness.c index e1001c4..b59d2ed 100644 --- a/tools-for-build/determine-endianness.c +++ b/tools-for-build/determine-endianness.c @@ -11,40 +11,41 @@ * While most of SBCL is derived from the CMU CL system, many * utilities for the build process (like this one) were written from * scratch after the fork from CMU CL. - * + * * This software is in the public domain and is provided with * absolutely no warranty. See the COPYING and CREDITS files for * more information. */ #include +#include int main (int argc, char *argv[]) { int foo = 0x20212223; char *bar = (char *) &foo; switch(*bar) { case ' ': - /* Do nothing */ - break; + /* Do nothing */ + break; case '#': - printf(" :little-endian"); - break; + printf(" :little-endian"); + break; default: - /* FIXME: How do we do sane error processing in Unix? This - program will be called from a script, in a manner somewhat - like: + /* FIXME: How do we do sane error processing in Unix? This + program will be called from a script, in a manner somewhat + like: - tools-for-build/determine-endianness >> $ltf + tools-for-build/determine-endianness >> $ltf but what if we have a too-smart C compiler that actually - gets us down to this branch? I suppose that if we have a C - compiler that is that smart, we're doomed to miscompile the - runtime anyway, so we won't get here. Still, it might be - good to have "set -e" in the various scripts so that we can - exit with an error here and have it be caught by the build - tools. -- CSR, 2002-11-24 - */ - exit(1); + gets us down to this branch? I suppose that if we have a C + compiler that is that smart, we're doomed to miscompile the + runtime anyway, so we won't get here. Still, it might be + good to have "set -e" in the various scripts so that we can + exit with an error here and have it be caught by the build + tools. -- CSR, 2002-11-24 + */ + exit(1); } - exit(0); + exit(0); }