manywarnings: remove -Wmudflap
[gnulib.git] / m4 / close.m4
index f2e1ac6..68510c5 100644 (file)
@@ -1,5 +1,5 @@
-# close.m4 serial 7
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# close.m4 serial 8
+dnl Copyright (C) 2008-2014 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.
@@ -7,6 +7,10 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_CLOSE],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_MSVC_INVAL])
+  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+    REPLACE_CLOSE=1
+  fi
   m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [
     gl_PREREQ_SYS_H_WINSOCK2
     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
@@ -26,7 +30,4 @@ AC_DEFUN([gl_FUNC_CLOSE],
       fi
     fi
   ])
-  if test $REPLACE_CLOSE = 1; then
-    m4_ifdef([gl_REPLACE_FCLOSE], [gl_REPLACE_FCLOSE], [:])
-  fi
 ])