summaryrefslogtreecommitdiff
path: root/mobicore/common/curl/CMake/CheckTypeSize.c.in
blob: 8ff07bfd1d13fc1521dbdc7a340caf1b693d6ecb (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
39
40
41
42
43
44
#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
#ifdef CHECK_TYPE_SIZE_TYPE

@CHECK_TYPE_SIZE_PREINCLUDE@
#ifdef HAVE_SYS_TYPES_H
#  include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */

#ifdef HAVE_SYS_SOCKET_H
#  include <sys/socket.h>
#endif

#ifdef _WIN32
#  include <winsock2.h>
#  include <ws2tcpip.h>
#endif


#ifdef HAVE_STDINT_H
#  include <stdint.h>
#endif /* HAVE_STDINT_H */

#ifdef HAVE_STDDEF_H
#  include <stddef.h>
#endif /* HAVE_STDDEF_H */

@CHECK_TYPE_SIZE_PREMAIN@

#ifdef __CLASSIC_C__
int main(){
  int ac;
  char*av[];
#else
int main(int ac, char*av[]){
#endif
  if(ac > 1000){return *av[0];}
  return sizeof(CHECK_TYPE_SIZE_TYPE);
}

#else  /* CHECK_TYPE_SIZE_TYPE */

#  error "CHECK_TYPE_SIZE_TYPE has to specify the type"

#endif /* CHECK_TYPE_SIZE_TYPE */