X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fmkdir-slash.m4;h=4e56bda718a81ac44a5613040b5fd11f91fdb2d9;hb=68dfc9591e97db34b5ba693da028ff1f356a12b7;hp=c1e595bbd389a2c56e79fe70d5abc6a33e434ae7;hpb=44d7c1c1f004fa9bfb8ec3948de2671a7958cf5b;p=gnulib.git diff --git a/m4/mkdir-slash.m4 b/m4/mkdir-slash.m4 index c1e595bbd..4e56bda71 100644 --- a/m4/mkdir-slash.m4 +++ b/m4/mkdir-slash.m4 @@ -1,6 +1,6 @@ -#serial 4 +# serial 7 -# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003-2004, 2006, 2008-2009 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,8 @@ # trailing slashes. AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH], [dnl + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + 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 +21,9 @@ AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH], # include # include # include +# ifdef HAVE_UNISTD_H +# include +# endif int main () { rmdir ("confdir-slash"); @@ -33,9 +38,8 @@ AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH], ) if test $gl_cv_func_mkdir_trailing_slash_bug = yes; then - AC_LIBOBJ(mkdir) - AC_DEFINE(mkdir, rpl_mkdir, - [Define to rpl_mkdir if the replacement function should be used.]) + REPLACE_MKDIR=1 + AC_LIBOBJ([mkdir]) gl_PREREQ_MKDIR fi ])