CheckTypeSize.c 478 B

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