You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

  1. --- a/acinclude.m4
  2. +++ b/acinclude.m4
  3. @@ -1106,6 +1106,8 @@ changequote([, ])dnl
  4. dnl test function that tries to determine if a specified errno error exists
  5. m4_define([checkerrno],
  6. [AC_MSG_CHECKING(for errno symbol $3)
  7. + saved_cppflags="$CPPFLAGS"
  8. + CPPFLAGS="$CPPFLAGS -P"
  9. AC_PREPROC_IFELSE(
  10. [AC_LANG_PROGRAM([[#include <errno.h>]],
  11. [[
  12. @@ -1117,7 +1119,8 @@ errnoval: $3
  13. [AC_MSG_RESULT([OK])
  14. $1="$$1 $3"
  15. cat conftest.i | grep errnoval: >>$2],
  16. - [AC_MSG_RESULT([no])])])
  17. + [AC_MSG_RESULT([no])])
  18. + CPPFLAGS="$saved_cppflags"])
  19. AC_DEFUN([L_CHECKERRNO],
  20. [checkerrno($@)])
  21. @@ -1127,6 +1130,8 @@ dnl error exists
  22. dnl test function that tries to determine if a specified errno error exists
  23. m4_define([checkgaierror],
  24. [AC_MSG_CHECKING(for getaddrinfo() error $3)
  25. + saved_cppflags="$CPPFLAGS"
  26. + CPPFLAGS="$CPPFLAGS -P"
  27. AC_PREPROC_IFELSE(
  28. [AC_LANG_PROGRAM([[
  29. #include <sys/types.h>
  30. @@ -1142,7 +1147,8 @@ gaierrval: $3
  31. $1="$$1 $3"
  32. AC_DEFINE(HAVE_ERR_$3, 1, [$3 gai error found])
  33. cat conftest.i | grep gaierrval: >>$2],
  34. - [AC_MSG_RESULT([no])])])
  35. + [AC_MSG_RESULT([no])])
  36. + CPPFLAGS="$saved_cppflags"])
  37. AC_DEFUN([L_CHECKGAIERROR],
  38. [checkgaierror($@)])