Jim Meyering <[EMAIL PROTECTED]> writes:
> Those are because of a (new-to-me) shell bug:
> Note how "$p" (which should be empty) expands to "/" here:
>
> $ sh -xc 'p=; echo "$p"/subdir/'
> p=
> + echo //subdir/
> //subdir/
>
> But not here, with the entire string double-quoted:
>
> $ sh -xc 'p=; echo "$p/subdir/"'
> p=
> + echo /subdir/
> /subdir/
> ...
> For the record, running config.guess on this system reports
> alphaev56-dec-osf4.0f
>
> uname says it's Tru64 'V4.0 1229'.
>
> Doubtless long overdue for retirement.
Yes, probably, but I guess we should document it in Autoconf.
I installed the following patch to Autoconf:
2006-10-25 Paul Eggert <[EMAIL PROTECTED]>
* doc/autoconf.texi (Slashes): Document Tru64 4.0 bug reported by
Jim Meyering.
--- doc/autoconf.texi 25 Oct 2006 00:35:45 -0000 1.1100
+++ doc/autoconf.texi 25 Oct 2006 20:20:43 -0000
@@ -11859,8 +11859,19 @@
/bc
@end example
+Unpatched Tru64 4.0 @command{sh} adds a slash after @samp{"$var"} if the
+variable is empty and the second double-quote is followed by a word that
+begins and ends with slash:
+
[EMAIL PROTECTED]
+$ @kbd{sh -xc 'p=; echo "$p"/ouch/'}
+p=
++ echo //ouch/
+//ouch/
[EMAIL PROTECTED] example
+
However, our understanding is that patches are available, so perhaps
-it's not worth worrying about working around this horrendous bug.
+it's not worth worrying about working around these horrendous bugs.
@node Special Shell Variables
@section Special Shell Variables