mod: Update gh-pages
[platform/upstream/gflags.git] / cmake / CheckTypeSize.c.in
1 @headers@
2
3 #undef KEY
4 #if defined(__i386)
5 # define KEY '_','_','i','3','8','6'
6 #elif defined(__x86_64)
7 # define KEY '_','_','x','8','6','_','6','4'
8 #elif defined(__ppc__)
9 # define KEY '_','_','p','p','c','_','_'
10 #elif defined(__ppc64__)
11 # define KEY '_','_','p','p','c','6','4','_','_'
12 #endif
13
14 #define SIZE (sizeof(@type@))
15 char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
16   ('0' + ((SIZE / 10000)%10)),
17   ('0' + ((SIZE / 1000)%10)),
18   ('0' + ((SIZE / 100)%10)),
19   ('0' + ((SIZE / 10)%10)),
20   ('0' +  (SIZE    % 10)),
21   ']',
22 #ifdef KEY
23   ' ','k','e','y','[', KEY, ']',
24 #endif
25   '\0'};
26
27 #ifdef __CLASSIC_C__
28 int main(argc, argv) int argc; char *argv[];
29 #else
30 int main(int argc, char *argv[])
31 #endif
32 {
33   int require = 0;
34   require += info_size[argc];
35   (void)argv;
36   return require;
37 }