ENH: typo
[cmake.git] / Modules / CheckTypeSizeC.c.in
blobc25b69dcbc5f9c3b6b2011d04f1830c5242366d3
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'};
33 #ifdef __CLASSIC_C__
34 int main(){
35 int ac;
36 char*av[];
37 #else
38 int main(int ac, char*av[]){
39 #endif
40 return (&info_sizeof[0] != &info_sizeof[0]);
43 #else /* CHECK_TYPE_SIZE_TYPE */
45 # error "CHECK_TYPE_SIZE_TYPE has to specify the type"
47 #endif /* CHECK_TYPE_SIZE_TYPE */