]>
Commit | Line | Data |
---|---|---|
813b77ce JB |
1 | --- dietlibc-0.30/diet.c.orig 2006-12-31 12:01:17.000000000 +0000 |
2 | +++ dietlibc-0.30/diet.c 2006-12-31 12:02:59.000000000 +0000 | |
4999ff1f | 3 | @@ -146,22 +146,30 @@ |
458e4119 JB |
4 | else if (!strncmp(shortplatform, "athlon", 6)) strcpy(shortplatform, "i386"); |
5 | else if (!strncmp(shortplatform, "amd64", 5)) strcpy(shortplatform, "x86_64"); | |
c2a7b369 | 6 | else if (!strncmp(shortplatform, "sparcv", 6)) strcpy(shortplatform, "sparc"); |
458e4119 | 7 | + if (!strncmp(shortplatform, "x86_64", 6) && (m==32)) strcpy(shortplatform, "i386"); |
813b77ce | 8 | + else if (!strncmp(shortplatform, "i386", 4) && (m==64)) strcpy(shortplatform, "x86_64"); |
c2a7b369 | 9 | + else if (!strncmp(shortplatform, "sparc64", 7) && (m==32)) strcpy(shortplatform, "sparc"); |
458e4119 JB |
10 | + else if (!strncmp(shortplatform, "sparc", 5) && (m==64)) strcpy(shortplatform, "sparc64"); |
11 | + else if (!strncmp(shortplatform, "ppc64", 5) && (m==32)) strcpy(shortplatform, "ppc"); | |
12 | + else if (!strncmp(shortplatform, "ppc", 3) && (m==64)) strcpy(shortplatform, "ppc64"); | |
13 | + else if (!strncmp(shortplatform, "s390x", 5) && (m==32)) strcpy(shortplatform, "s390"); | |
14 | + else if (!strncmp(shortplatform, "s390", 4) && (m==64)) strcpy(shortplatform, "s390x"); | |
15 | } else { | |
16 | #ifdef __sparc__ | |
17 | #ifdef __arch64__ | |
18 | - shortplatform="sparc64"; | |
19 | + shortplatform=(m==32?"sparc":"sparc64"); | |
20 | #else | |
813b77ce JB |
21 | - shortplatform="sparc"; |
22 | + shortplatform=(m==64?"sparc64":"sparc"); | |
458e4119 | 23 | #endif |
813b77ce JB |
24 | #endif |
25 | #ifdef __powerpc__ | |
26 | - shortplatform="ppc"; | |
27 | + shortplatform=(m==64?"ppc64":"ppc"); | |
458e4119 JB |
28 | #endif |
29 | #ifdef __powerpc64__ | |
30 | - shortplatform="ppc64"; | |
31 | + shortplatform=(m==32?"ppc":"ppc64"); | |
32 | #endif | |
33 | #ifdef __i386__ | |
813b77ce JB |
34 | - shortplatform="i386"; |
35 | + shortplatform=(m==64?"x86_64":"i386"); | |
36 | #endif | |
37 | #ifdef __alpha__ | |
38 | shortplatform="alpha"; | |
39 | @@ -173,10 +181,10 @@ | |
458e4119 JB |
40 | shortplatform="mips"; |
41 | #endif | |
42 | #ifdef __s390x__ | |
43 | - shortplatform="s390x"; | |
44 | + shortplatform=(m==32?"s390":"s390x"); | |
45 | #else | |
46 | #ifdef __s390__ | |
813b77ce JB |
47 | - shortplatform="s390"; |
48 | + shortplatform=(m==64?"s390x":"s390"); | |
49 | #endif | |
50 | #endif | |
51 | #ifdef __sh__ |