Merge commit '039ae97'
[gnulib.git] / m4 / rmdir.m4
index db590d2..599b789 100644 (file)
@@ -1,4 +1,4 @@
-# rmdir.m4 serial 5
+# rmdir.m4 serial 7
 dnl Copyright (C) 2002, 2005, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_RMDIR],
 [
   AC_REQUIRE([gl_AC_DOS])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   dnl FIXME: simplify this module in 2010 if no one reports a missing rmdir
   AC_REPLACE_FUNCS([rmdir])
   if test $ac_cv_func_rmdir = no; then
@@ -29,6 +30,7 @@ AC_DEFUN([gl_FUNC_RMDIR],
          [AC_LANG_PROGRAM(
            [[#include <stdio.h>
              #include <errno.h>
+             #include <unistd.h>
 ]], [[return !rmdir ("conftest.file/") || errno != ENOTDIR
        || !rmdir ("conftest.dir/./");]])],
          [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],