CheckTypeSize.c.in 606 B

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