summaryrefslogtreecommitdiff
path: root/gnulib-m4/fdopen.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib-m4/fdopen.m4')
-rw-r--r--gnulib-m4/fdopen.m415
1 files changed, 9 insertions, 6 deletions
diff --git a/gnulib-m4/fdopen.m4 b/gnulib-m4/fdopen.m4
index 685a1bb9..42f928ef 100644
--- a/gnulib-m4/fdopen.m4
+++ b/gnulib-m4/fdopen.m4
@@ -1,5 +1,5 @@
-# fdopen.m4 serial 3
-dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
+# fdopen.m4 serial 4
+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,10 +8,13 @@ AC_DEFUN([gl_FUNC_FDOPEN],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_REQUIRE([gl_MSVC_INVAL])
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_FDOPEN=1
- else
+ m4_ifdef([gl_MSVC_INVAL], [
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_FDOPEN=1
+ fi
+ ])
+ if test $REPLACE_FDOPEN = 0; then
dnl Test whether fdopen() sets errno when it fails due to a bad fd argument.
AC_CACHE_CHECK([whether fdopen sets errno], [gl_cv_func_fdopen_works],
[