3 # On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.
4 # On such systems, arrange to use a wrapper function that removes any
6 AC_DEFUN([UTILS_FUNC_MKDIR_TRAILING_SLASH],
8 AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
9 utils_cv_func_mkdir_trailing_slash_bug,
11 # Arrange for deletion of the temporary directory this test might create.
12 ac_clean_files="$ac_clean_files confdir-slash"
14 # include <sys/types.h>
15 # include <sys/stat.h>
19 rmdir ("confdir-slash");
20 exit (mkdir ("confdir-slash/", 0700));
23 utils_cv_func_mkdir_trailing_slash_bug=no,
24 utils_cv_func_mkdir_trailing_slash_bug=yes,
25 utils_cv_func_mkdir_trailing_slash_bug=yes
30 if test $utils_cv_func_mkdir_trailing_slash_bug = yes; then
32 AC_DEFINE(mkdir, rpl_mkdir,
33 [Define to rpl_mkdir if the replacement function should be used.])