ENH: fix bug where sharedforward would not work if there was a space in the path...
[cmake.git] / Modules / CheckTypeSizeC.c.in
blob8bcf1a0cc43cd7b2388c9c9ed6a9f1b191bf548a
1 #cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
2 #ifdef CHECK_TYPE_SIZE_TYPE
4 @CHECK_TYPE_SIZE_PREINCLUDE@
5 #ifdef HAVE_SYS_TYPES_H
6 # include <sys/types.h>
7 #endif /* HAVE_SYS_TYPES_H */
9 #ifdef HAVE_STDINT_H
10 # include <stdint.h>
11 #endif /* HAVE_STDINT_H */
13 #ifdef HAVE_STDDEF_H
14 # include <stddef.h>
15 #endif /* HAVE_STDDEF_H */
17 @CHECK_TYPE_SIZE_PREMAIN@
19 #ifdef __CLASSIC_C__
20 # define const
21 #endif
23 #define SIZE (sizeof(@CHECK_TYPE_SIZE_TYPE@))
24 const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[',
25 ('0' + ((SIZE / 10000)%10)),
26 ('0' + ((SIZE / 1000)%10)),
27 ('0' + ((SIZE / 100)%10)),
28 ('0' + ((SIZE / 10)%10)),
29 ('0' + (SIZE % 10)),
30 ']','\0'};
32 #ifdef __CLASSIC_C__
33 int main(argc, argv) int argc; char *argv[];
34 #else
35 int main(int argc, char *argv[])
36 #endif
38 int require = 0;
39 require += info_sizeof[argc];
40 (void)argv;
41 return require;
44 #else /* CHECK_TYPE_SIZE_TYPE */
46 # error "CHECK_TYPE_SIZE_TYPE has to specify the type"
48 #endif /* CHECK_TYPE_SIZE_TYPE */