On 12/18/2011 12:46 AM, Gary V. Vaughan wrote: > Pushed as obvious. > > Dash shipped with Ubutu-11.10 as /bin/sh, among others, still > has a crippled echo builtin that mis-handles backslashes.
That's an unfair characterization. Rather, dash ships an echo builtin that complies with POSIX by default (which mandates backslash interpretation), while bash ships an echo builtin that ignores backslash by default, but can be made to comply with POSIX via 'shopt -s xpg_echo'. > +++ b/build-aux/options-parser > @@ -173,6 +173,46 @@ basename='s|^.*/||' > nl=' > ' > > +# There are still modern systems that have problems with `echo' mis- > +# handling backslashes, among others, so make sure $bs_echo is set to a > +# command that correctly interprets backslashes. Again, a mis-characterization of the problem. > +# (this code from Autoconf 2.68) > + > +# Printing a long string crashes Solaris 7 /usr/bin/printf. > +bs_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' > +bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo > +bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo > +# Prefer a ksh shell builtin over an external printf program on Solaris, > +# but without wasting forks for bash or zsh. > +if test -z "$BASH_VERSION$ZSH_VERSION" \ > + && (test "X`print -r -- $bs_echo`" = "X$bs_echo") 2>/dev/null; then > + bs_echo='print -r --' > + bs_echo_n='print -rn --' Also, I'm not sure that I like the name $bs_echo - it's not namespace clean. I would have expected something more like $lt_echo. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature