-# 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,
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
[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],