Re: [PATCH 1/4] AC_CACHE_SAVE: treat x: as an absolute path as well

Eric Blake <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Organization Red Hat, Inc.
Message-ID <[email protected]>
On 09/22/2014 12:59 AM, KO Myung-Hun wrote:
> * lib/autoconf/general.m4 (AC_CACHE_SAVE): Subject.

That's a poor changelog entry.  Better might be:

AC_CACHE_SAVE: treat x: as an absolute path as well

* lib/autoconf/general.m4 (AC_CACHE_SAVE): Treat raw drive as
absolute for OS/2 and mingw.

> ---
>  lib/autoconf/general.m4 |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
> index 59d204f..77f71d2 100644
> --- a/lib/autoconf/general.m4
> +++ b/lib/autoconf/general.m4
> @@ -942,7 +942,7 @@ do
>    esac
>    # Be sure to have absolute directory names.
>    case $ac_val in
> -    [[\\/$]]* | ?:[[\\/]]* )  continue;;
> +    [[\\/$]]* | ?:[[\\/]]* | ?: )  continue;;

On mingw, 'c:' is not necessarily absolute; Windows has up to 27 current
working directories (the current working directory when no drive letter
is given, and then one current directory for each drive), so 'c:foo'
could mean 'c:/path/to/foo' instead of 'c:/foo'.  I'm not sure how it
works on OS/2.  I also don't know the rationale for your change - how
often do you actually encounter someone using AC_CACHE_SAVE with a raw
drive letter and no path as the destination?  That is, you don't try to
ever save the cache as 'c:', but as 'c:/file', in which case the pattern
already matches.  Without an example of something that is broken without
this patch, I'm less inclined to apply it.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc (application/pgp-signature, 539 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg

iQEcBAEBCAAGBQJUIEFtAAoJEKeha0olJ0NqOqIH/jq77iM0lbxRiYuc46SQLkyO
0Z1M/WvA27pwcRnE5M96XhUc0REOSGHu1dCvNq0y9LMhphXLF38Ra7vtOinBJlhv
I0QgaA1x1Tzlnwex9hI39v+DrrUWQxhpPNOTtZPlrCSTBIoxDLzz+r29AU0O4+jI
rvRfkOIA+IivsqwekpVkSKp0Zp9xFA+kWoL9SIWXtUhamaSk90rBmcbBM0KZeCbs
2GleerUTk7Q5QNf+8O4c2GOEQSJVVAdhsZr9LG5AD0bsxwDCw59RmTsgFcWTXw6w
bVugVo/TynjfiwPv6pIzE4GUG5e9TYSlkRQ7RTsEI+uj7N9tR42H6CqCxFSNRvM=
=g++b
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.