Updated to vers 7.5
[cake.git] / tools / adflib / myconf.aros.in
blobfd5580442202f11e5418778a8e8f3ad74935f759
1 #! /bin/sh
3 cat >myctest.c <<END
5 #include<stdio.h>
7 union u{
8 long l;
9 char c[4];
14 int main(int argc, char *argv[])
16 union u val;
18 printf("%d ",sizeof(long));
19 printf("%d ",sizeof(short));
20 printf("%d ",sizeof(int));
22 val.l=1L;
23 if (val.c[3]==1)
24 puts("BIG");
25 else
26 puts("LITTLE");
29 END
31 @aros_target_cc@ myctest.c -o myctest
33 if [ `./myctest |cut -d' ' -f 1` != 4 ]
34 then echo "#error sizeof(long)!=4"
36 if [ `./myctest |cut -d' ' -f 2` != 2 ]
37 then echo "#error sizeof(short)!=2"
39 if [ `./myctest |cut -d' ' -f 3` != 4 ]
40 then echo "#error sizeof(int)!=4"
43 if [ `./myctest |cut -d' ' -f 4` = LITTLE ]
44 then
45 echo "#ifndef LITT_ENDIAN"
46 echo "#define LITT_ENDIAN 1"
47 echo "#endif /* LITT_ENDIAN */"
48 else
49 echo "#ifndef LITT_ENDIAN"
50 echo "#endif /* LITT_ENDIAN */"
53 rm myctest*