openat: Work around compilation error with OSF/1 5.1 DTK cc.
[gnulib.git] / m4 / write.m4
index 56325ab..c39d3d0 100644 (file)
@@ -1,5 +1,5 @@
-# write.m4 serial 1
-dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# write.m4 serial 3
+dnl Copyright (C) 2008-2011 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.
@@ -14,7 +14,12 @@ AC_DEFUN([gl_FUNC_WRITE],
     gl_SIGNAL_SIGPIPE
     if test $gl_cv_header_signal_h_SIGPIPE != yes; then
       REPLACE_WRITE=1
-      AC_LIBOBJ([write])
+    fi
+  ])
+  m4_ifdef([gl_NONBLOCKING_IO], [
+    gl_NONBLOCKING_IO
+    if test $gl_cv_have_nonblocking != yes; then
+      REPLACE_WRITE=1
     fi
   ])
 ])