libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: version numbers with more than three digits


From: Ralf Wildenhues
Subject: Re: version numbers with more than three digits
Date: Fri, 4 Feb 2005 16:21:02 +0100
User-agent: Mutt/1.4.1i

* Gary V. Vaughan wrote on Fri, Feb 04, 2005 at 02:10:44PM CET:
> Ralf Wildenhues wrote:
> > 
> > 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

Because numbers of arbitrary length are certainly not portable.  I will
allow five digits, on the grounds that an internal representation of >=
16 bits is a reasonable portable assumption.  Whoever knows better
please speak up.  (Note that I talking about the lowest common
denominator for both library binary formats as well as link editor
internal variables).

Even if all systems supported arbitrary numbers, `test' doesn't when
comparing them, and thus libtool creates garbage for large numbers.

Besides, my solution does not fork.

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]