CheckTypeSize.c.in 792 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
  2. #ifdef CHECK_TYPE_SIZE_TYPE
  3. @CHECK_TYPE_SIZE_PREINCLUDE@
  4. #ifdef HAVE_SYS_TYPES_H
  5. # include <sys/types.h>
  6. #endif /* HAVE_SYS_TYPES_H */
  7. #ifdef HAVE_SYS_SOCKET_H
  8. # include <sys/socket.h>
  9. #endif
  10. #ifdef _WIN32
  11. # include <winsock2.h>
  12. # include <ws2tcpip.h>
  13. #endif
  14. #ifdef HAVE_STDINT_H
  15. # include <stdint.h>
  16. #endif /* HAVE_STDINT_H */
  17. #ifdef HAVE_STDDEF_H
  18. # include <stddef.h>
  19. #endif /* HAVE_STDDEF_H */
  20. @CHECK_TYPE_SIZE_PREMAIN@
  21. #ifdef __CLASSIC_C__
  22. int main(){
  23. int ac;
  24. char*av[];
  25. #else
  26. int main(int ac, char*av[]){
  27. #endif
  28. if(ac > 1000){return *av[0];}
  29. return sizeof(CHECK_TYPE_SIZE_TYPE);
  30. }
  31. #else /* CHECK_TYPE_SIZE_TYPE */
  32. # error "CHECK_TYPE_SIZE_TYPE has to specify the type"
  33. #endif /* CHECK_TYPE_SIZE_TYPE */