Re: [PATCH 1/2] AC_SITE_LOAD: convert '\' in PATH to '/' on OS/2
Eric Blake <[email protected]>
| Newsgroups | gmane.comp.sysutils.autoconf.patches |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
On 05/28/2015 11:43 PM, KO Myung-Hun wrote: > echo of some shells such as pdksh recognizes '\' as an escape > character. So when echoing a path, the result can be corrupted. For > examples, echo x:\usr\bin will be x:\usin. > > * lib/autoconf/general.m4 (AC_SITE_LOAD): Convert '\' in PATH to '/' > on OS/2. > --- > lib/autoconf/general.m4 | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 > index a7f1439..6173b83 100644 > --- a/lib/autoconf/general.m4 > +++ b/lib/autoconf/general.m4 > @@ -1951,6 +1951,15 @@ do > || AC_MSG_FAILURE([failed to load site script $ac_site_file]) > fi > done > + > +if test -n "$OS2_SHELL"; then > + # Backslashes into forward slashes: > + # The following OS/2 specific code is performed AFTER config.site > + # has been loaded to allow users to change their environment there. > + # This strange code is necessary to deal with handling of backslashes by > + # ksh. > + export PATH=$(expr "$PATH" | tr '\\' /) > +fi Why can't your config.site set this properly in the first place? Plus, doing it in your config.site would have the benefit of working on all existing packages, rather than requiring packages to be rebuilt with a newer autoconf. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
(application/pgp-signature, 604 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVaGE2AAoJEKeha0olJ0NqeRMIAKFLXuwJzRuZRMpZ9AurmgxU 0QblZbDme+YnJLbMkIWL3UEnYji2m1Oe1dFZZ8JYZu/+4lDDLZwTs8XqUl7kk51J P0ByElD43WJ1ld8Ifli49V3YXjrK7OwnAN2omIWs40ISsqTtCHDnvF7pe1V4Wj3/ rIZ52zt9fhXRbwYGXbNXzixAH7e/8iZgQBGIGgpGbb+MmzcK5cQ1Fsp0wZ3ltQZY nU5Ne+LxA1g+gAzAC7AKT02kv1OBesK5Clma0jSvPefBNSVO7faN9sMoQh8XOZf2 jHs8OD7T3kWJMRQbq1KHdIEVLOBHTWnCHdYM9k3XCr5dIhOh6IVbBab+cvaLWu8= =lpdt -----END PGP SIGNATURE-----