VirtualBox

source: kBuild/trunk/src/grep/m4/double-slash-root.m4@ 3532

Last change on this file since 3532 was 3529, checked in by bird, 3 years ago

Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.

  • Property svn:eol-style set to LF
File size: 1.6 KB
Line 
1# double-slash-root.m4 serial 4 -*- Autoconf -*-
2dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
8[
9 AC_REQUIRE([AC_CANONICAL_HOST])
10 AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root],
11 [ if test x"$cross_compiling" = xyes ; then
12 # When cross-compiling, there is no way to tell whether // is special
13 # short of a list of hosts. However, the only known hosts to date
14 # that have a distinct // are Apollo DomainOS (too old to port to),
15 # Cygwin, and z/OS. If anyone knows of another system for which // has
16 # special semantics and is distinct from /, please report it to
17 # <[email protected]>.
18 case $host in
19 *-cygwin | i370-ibm-openedition)
20 gl_cv_double_slash_root=yes ;;
21 *)
22 # Be optimistic and assume that / and // are the same when we
23 # don't know.
24 gl_cv_double_slash_root='unknown, assuming no' ;;
25 esac
26 else
27 set x `ls -di / // 2>/dev/null`
28 if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then
29 gl_cv_double_slash_root=no
30 else
31 gl_cv_double_slash_root=yes
32 fi
33 fi])
34 if test "$gl_cv_double_slash_root" = yes; then
35 AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1],
36 [Define to 1 if // is a file system root distinct from /.])
37 fi
38])
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette