Tag
Hash :
f3e4befc
Author :
Date :
2006-12-18T18:04:20
* lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1. This is more consistent with the other defines here. * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT): Port to z/OS. Problem reported by Paul Gilmartin. Change local vars to use gl_ prefix rather than ac_. Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency with other defines. * modules/double-slash-root: New module. * modules/dirname (Files): Remove m4/double-slash-root.m4. (Depends-on): Add double-slash-root. * MODULES.html.sh (File system functions): Mention new module.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
# double-slash-root.m4 serial 2 -*- Autoconf -*-
dnl Copyright (C) 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root],
[ if test x"$cross_compiling" = xyes ; then
# When cross-compiling, there is no way to tell whether // is special
# short of a list of hosts. However, the only known hosts to date
# that have a distinct // are Apollo DomainOS (too old to port to),
# Cygwin, and z/OS. If anyone knows of another system for which // has
# special semantics and is distinct from /, please report it to
# <bug-gnulib@gnu.org>.
case $host in
*-cygwin | i370-ibm-openedition)
gl_cv_double_slash_root=yes ;;
*)
# Be optimistic and assume that / and // are the same when we
# don't know.
gl_cv_double_slash_root='unknown, assuming no' ;;
esac
else
set x `ls -di / //`
if test $[2] = $[4] && wc //dev/null >/dev/null 2>&1; then
gl_cv_double_slash_root=no
else
gl_cv_double_slash_root=yes
fi
fi])
if test "$gl_cv_double_slash_root" = yes; then
AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], 1,
[Define to 1 if // is a file system root distinct from /.])
fi
])