blob: 744c3e2078dab5ecf88c2c8f064c862165028374 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include <stdio.h>
int
main()
{
#if defined(__LLP64__)
if (sizeof(short) == 2
&& sizeof(int) == 4
&& sizeof(long int) == 4
&& sizeof(long long int) == 8
&& sizeof(void*) == 8) {
(void)printf("Ok\n");
} else {
(void)printf("KO __LLP64__\n");
}
#elif defined(__LP64__)
if (sizeof(short) == 2
&& sizeof(int) == 4
&& sizeof(long int) == 8
&& sizeof(long long int) == 8
&& sizeof(void*) == 8) {
(void)printf("Ok\n");
} else {
(void)printf("KO __LP64__\n");
}
#elif defined(__ILP32__)
if (sizeof(short) == 2
&& sizeof(int) == 4
&& sizeof(long int) == 4
&& sizeof(void*) == 4) {
(void)printf("Ok\n");
} else {
(void)printf("KO __ILP32__\n");
}
#else
(void)printf("KO no __*LP*__ defined.\n");
#endif
}
|