diff options
Diffstat (limited to 'bs/deftypes.c')
-rw-r--r-- | bs/deftypes.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bs/deftypes.c b/bs/deftypes.c new file mode 100644 index 000000000..dad9b58a8 --- /dev/null +++ b/bs/deftypes.c @@ -0,0 +1,18 @@ +#include <stdio.h> + +int main(int argc, char argv[]) +{ + long one = 1; + puts( *((char *)(&one)) ? "/* #undef WORDS_BIGENDIAN */" + : "#define WORDS_BIGENDIAN" ); + printf( "#define SIZEOF_INT %ld\n" + "#define SIZEOF_LONG %ld\n" + "#define SIZEOF_LONG_LONG %ld\n" + "#define SIZEOF_SHORT %ld\n", + (long int)(sizeof(int)), + (long int)(sizeof(long)), + (long int)(sizeof(long long)), + (long int)(sizeof(short)) ); + + return 0; +} |