[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: version numbers with more than three digits
From: |
Gary V. Vaughan |
Subject: |
Re: version numbers with more than three digits |
Date: |
Fri, 04 Feb 2005 13:10:44 +0000 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041103) |
Hallo Ralf,
Ralf Wildenhues wrote:
> * Peter O'Gorman wrote on Thu, Feb 03, 2005 at 01:19:40PM CET:
>
>>Ralf Wildenhues wrote:
>>|
>>| * ltmain.in (link mode): Allow version number components with
>>| more than three digits.
>>|
>>| Index: ltmain.in
>>| ===================================================================
>>| RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
>>| retrieving revision 1.334.2.53
>>| diff -u -r1.334.2.53 ltmain.in
>>| --- ltmain.in 2 Feb 2005 22:17:04 -0000 1.334.2.53
>>| +++ ltmain.in 3 Feb 2005 07:38:50 -0000
>>| @@ -3118,8 +3118,7 @@
>>|
>>| # Check that each of the things are valid numbers.
>>| case $current in
>>| - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
>>| - *)
>>| + *[!0-9]* | 0[0-9]*)
>>| $echo "$modename: CURRENT \`$current' is not a nonnegative
>>integer" 1>&2
>>| $echo "$modename: \`$vinfo' is not valid version information" 1>&2
>>| exit $EXIT_FAILURE
>
> *snip*
>
>>Longish quote from the autoconf manual:
>
> *snip*
>
>>Doesn't this apply to your patch too?
>
>
> Yes, I guess.
>
> Can I just do
> - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
> + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9]) ;;
>
> then? I mean, nobody will *ever* produce 10K revision, right? :)
Why not be more general and use:
if test X`expr "X$current" : 'X\([1-9][0-9]*\)'` != "X$current"; then
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
fi
Cheers,
Gary.
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
signature.asc
Description: OpenPGP digital signature