_info 689 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include "config.h"
  4. /**
  5. * err - err(), errx(), warn() and warnx(), as per BSD's err.h.
  6. *
  7. * A few platforms don't provide err.h; for those, this provides replacements.
  8. * For most, it simple includes the system err.h.
  9. *
  10. * Example:
  11. * #include <ccan/err/err.h>
  12. *
  13. * int main(int argc, char *argv[])
  14. * {
  15. * if (argc != 1)
  16. * errx(1, "Expect no arguments");
  17. * exit(0);
  18. * }
  19. *
  20. * License: Public domain
  21. * Author: Rusty Russell <rusty@rustcorp.com.au>
  22. */
  23. int main(int argc, char *argv[])
  24. {
  25. if (argc != 2)
  26. return 1;
  27. if (strcmp(argv[1], "depends") == 0) {
  28. #if !HAVE_ERR_H
  29. printf("ccan/compiler\n");
  30. #endif
  31. return 0;
  32. }
  33. return 1;
  34. }