proxygen
INT128_SIZE.cpp
Go to the documentation of this file.
1 #include <sys/types.h>
2 #include <stdint.h>
3 #include <stddef.h>
4 
5 
6 #undef KEY
7 #if defined(__i386)
8 # define KEY '_','_','i','3','8','6'
9 #elif defined(__x86_64)
10 # define KEY '_','_','x','8','6','_','6','4'
11 #elif defined(__ppc__)
12 # define KEY '_','_','p','p','c','_','_'
13 #elif defined(__ppc64__)
14 # define KEY '_','_','p','p','c','6','4','_','_'
15 #endif
16 
17 #define SIZE (sizeof(__int128))
18 char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
19  ('0' + ((SIZE / 10000)%10)),
20  ('0' + ((SIZE / 1000)%10)),
21  ('0' + ((SIZE / 100)%10)),
22  ('0' + ((SIZE / 10)%10)),
23  ('0' + (SIZE % 10)),
24  ']',
25 #ifdef KEY
26  ' ','k','e','y','[', KEY, ']',
27 #endif
28  '\0'};
29 
30 #ifdef __CLASSIC_C__
31 int main(argc, argv) int argc; char *argv[];
32 #else
33 int main(int argc, char *argv[])
34 #endif
35 {
36  int require = 0;
37  require += info_size[argc];
38  (void)argv;
39  return require;
40 }
#define SIZE
Definition: INT128_SIZE.cpp:17
char ** argv
int main(int argc, char *argv[])
Definition: INT128_SIZE.cpp:33
char info_size[]
Definition: INT128_SIZE.cpp:18