[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20-texi-dirname.patch
From: |
Akim Demaille |
Subject: |
20-texi-dirname.patch |
Date: |
02 Nov 2000 12:25:27 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Index: 0.490/ChangeLog
from Akim Demaille <address@hidden>
* doc/autoconf.texi (Limitations of Usual Tools): Some about
dirname.
Index: 0.490/doc/autoconf.texi
--- 0.490/doc/autoconf.texi Thu, 26 Oct 2000 21:03:04 +0200 akim
(ace/16_autoconf.t 1.61.2.83 666)
+++ 0.491(w)/doc/autoconf.texi Wed, 01 Nov 2000 14:23:31 +0100 akim
(ace/16_autoconf.t 1.61.2.84 666)
@@ -5491,9 +5491,45 @@
Aaaaarg!
@end example
+
@item @command{cat}
@cindex @command{cat}
Don't rely on any option.
+
+
address@hidden @command{dirname}
address@hidden @command{dirname}
+Not all hosts have @command{dirname}, but it is reasonably easy to
+emulate, e.g.:
+
address@hidden
+dir=`expr "x$file" : 'x\(.*\)/[^/]*' \|
+ '.' : '.'
address@hidden example
+
address@hidden
+But there are a few subtilities, e.g., under UN*X, should @samp{//1}
+give @samp{/}? Paul Eggert answers:
+
address@hidden
+No, under some older flavors of Unix, leading @samp{//} is a special
+path name: it refers to a "super-root" and is used to access other
+machines' files. Leading @samp{///}, @samp{////}, etc. are equivalent
+to @samp{/}; but leading @samp{//} is special. I think this tradition
+started with Apollo Domain/OS, an OS that is still in use on some older
+hosts.
+
+POSIX.2 allows but does not require the special treatment for @samp{//}.
+It says that the behavior of dirname on path names of the form
address@hidden//([^/]+/*)?} is implementation defined. In these cases, GNU
address@hidden returns @samp{/}, but it's more portable to return
address@hidden//} as this works even on those older flavors of Unix.
+
+I have heard rumors that this special treatment of @samp{//} may be
+dropped in future versions of POSIX, but for now it's still the
+standard.
address@hidden quotation
+
@item @command{egrep}
@cindex @command{egrep}
Index: 0.490/m4sh.m4
--- 0.490/m4sh.m4 Sun, 29 Oct 2000 23:04:39 +0100 akim (ace/b/41_m4sh.m4 1.2
644)
+++ 0.491(w)/m4sh.m4 Wed, 01 Nov 2000 14:20:25 +0100 akim (ace/b/41_m4sh.m4 1.3
644)
@@ -115,24 +115,6 @@
# Simulate running `dirname(1)' on PATHNAME, not all systems have it.
# This macro must be usable from inside ` `.
#
-# Paul Eggert answers:
-# Question: Under UN*X, should `//1' give `/'?
-#
-# No, under some older flavors of Unix, leading // is a special path
-# name: it refers to a "super-root" and is used to access other
-# machines' files. Leading ///, ////, etc. are equivalent to /; but
-# leading // is special. I think this tradition started with Apollo
-# Domain/OS, an OS that is still in use on some older hosts.
-#
-# POSIX.2 allows but does not require the special treatment for //.
-# It says that the behavior of dirname on path names of the form
-# //([^/]+/*)? is implementation defined. In these cases, GNU dirname
-# returns /, but it's more portable to return // as this works even on
-# those older flavors of Unix.
-#
-# I have heard rumors that this special treatment of // may be dropped
-# in future versions of POSIX, but for now it's still the standard.
-#
# Prefer expr to echo|sed, since expr is usually faster and it handles
# backslashes and newlines correctly. However, older expr
# implementations (e.g. SunOS 4 expr and Solaris 8 /usr/ucb/expr) have
- 20-texi-dirname.patch,
Akim Demaille <=