annotate endianchk.c @ 62:0e2d7767c00d

convcalc_ascii()'s one argument is unused, remove it.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 09 Jul 2011 11:57:54 +0300
parents c3622b53a23e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #include <stdio.h>
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 int main(int argc, char *argv[])
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 {
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 int val = 1, ret;
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 char *s = (char *) &val;
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 ret = (int)(*s);
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 printf("%s\n", ret ? "-DLITTLE_ENDIAN" : "-DBIG_ENDIAN");
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 return 0;
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 }
c3622b53a23e Clean up the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11