_info.c 752 B

123456789101112131415161718192021222324252627282930
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include "config.h"
  4. /**
  5. * check_type - routines for compile time type checking
  6. *
  7. * C has fairly weak typing: ints get automatically converted to longs, signed
  8. * to unsigned, etc. There are some cases where this is best avoided, and
  9. * these macros provide methods for evoking warnings (or build errors) when
  10. * a precise type isn't used.
  11. *
  12. * On compilers which don't support typeof() these routines are less effective,
  13. * since they have to use sizeof() which can only distiguish between types of
  14. * different size.
  15. */
  16. int main(int argc, char *argv[])
  17. {
  18. if (argc != 2)
  19. return 1;
  20. if (strcmp(argv[1], "depends") == 0) {
  21. #if !HAVE_TYPEOF
  22. printf("build_assert\n");
  23. #endif
  24. return 0;
  25. }
  26. return 1;
  27. }