3 char * isbigendian () {
4 /* Are we little or big endian? From Harbison&Steele. */
5 union { long l
; char c
[sizeof (long)]; } u
;
6 u
.l
=1; return (u
.c
[0] == 1)?"no":"yes";
10 printf("arch_sizeof_short=%d\n",sizeof(short));
11 printf("arch_sizeof_int=%d\n",sizeof(int));
12 printf("arch_sizeof_long=%d\n",sizeof(long));
13 printf("arch_sizeof_long_long=%d\n",sizeof(long long));
14 printf("arch_sizeof_char_p=%d\n",sizeof(char *));
15 printf("arch_bigendian=%s\n",isbigendian());
16 printf("arch_machine="); fflush(stdout
); system("uname -m");
17 system("echo arch_target=`uname -m -p | tr ' ' -`-linux");