* MODULES.html.sh: New module wctype.
[gnulib.git] / m4 / mkdir-slash.m4
index c1e595b..3c25d2a 100644 (file)
@@ -1,6 +1,6 @@
-#serial 4
+#serial 5
 
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 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.
@@ -10,6 +10,7 @@
 # trailing slashes.
 AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
 [dnl
+  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
     gl_cv_func_mkdir_trailing_slash_bug,
     [
@@ -19,6 +20,9 @@ AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
 #       include <sys/types.h>
 #       include <sys/stat.h>
 #       include <stdlib.h>
+#       ifdef HAVE_UNISTD_H
+#         include <unistd.h>
+#       endif
        int main ()
        {
          rmdir ("confdir-slash");