-#serial 5
+#serial 8
-# Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# test runs a test to determine the actual numeric value.
AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
[dnl
+ AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CACHE_CHECK([for rmdir-not-empty errno value],
gl_cv_func_rmdir_errno_not_empty,
[
AC_TRY_RUN([
#include <stdio.h>
#include <errno.h>
-#ifndef errno
-extern int errno;
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
#endif
int main ()
{
val = errno;
s = fopen ("confdir2/errno", "w");
fprintf (s, "%d\n", val);
- exit (0);
+ return 0;
}
],
gl_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`,