[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A simplification of _AC_CANONICAL_SPLIT
From: |
Paul Eggert |
Subject: |
Re: A simplification of _AC_CANONICAL_SPLIT |
Date: |
Fri, 19 Aug 2005 14:01:05 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Stepan Kasal <address@hidden> writes:
> The main goal is not to catch non-canonical values. The goal is to
> catch evil values which would break the code below.
OK, but in that case let's use a different diagnostic, e.g.,
"invalid value of canonical host". (That's a better diagnostic
anyway, since mentioning ac_cv_$1 is a bit obscure.)
>> Also, the [!-] doesn't look portable to me.
>
> I thought that it was a portable way to match any character other than "-".
The Autoconf manual warns against it (look for "negated character
classes").
> If I were wrong, we can use:
>
> ac_good=:
> case $ac_cv_$1 in
> -*) ac_good=false;;
> *-?*-?*) ;;
> *) ac_good=false;;
> esac
> ac_good || AC_MSG_ERROR([non-canonical value of ac_cv_$1: $ac_cv_$1])
This would be a bit cleaner:
case $ac_cv_$1 in
-*) false;;
*-?*-?*) : ;;
*) false;;
esac || AC_MSG_ERROR([non-canonical value of ac_cv_$1: $ac_cv_$1])
but I'm afraid I still don't understand why it's needed. Why is it
important to reject an empty cpu?
Also, why are the ?* patterns needed? They don't reject all instances
of empty vendors or os, since (for example) *-?*-?* matches the value
abc---def-ghi.
- A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/16
- Re: A simplification of _AC_CANONICAL_SPLIT, Noah Misch, 2005/08/16
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/17
- Re: A simplification of _AC_CANONICAL_SPLIT, Noah Misch, 2005/08/17
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/18
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/18
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/19
- Re: A simplification of _AC_CANONICAL_SPLIT,
Paul Eggert <=
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/22
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/22
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/23
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/23
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/24
- AS_SET_UNEXPANDED_ARGS proposal, Paul Eggert, 2005/08/24
- Re: AS_SET_UNEXPANDED_ARGS proposal, Stepan Kasal, 2005/08/25
- Re: AS_SET_UNEXPANDED_ARGS proposal, Paul Eggert, 2005/08/25