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: Peter O'Gorman
Subject: Re: version numbers with more than three digits
Date: Thu, 03 Feb 2005 21:19:40 +0900
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ralf Wildenhues wrote:
| There was a bug report on this some time ago (in combination with more
| problems, IIRC on Tru64; I only want to solve the trivial problem here).
| Is there a technical reason to forbid version numbers greater than 999?
|
| If not: OK to commit this to all branches?
|
| Regards,
| Ralf
|
|         * 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
| @@ -3127,8 +3126,7 @@
|       esac
|
|       case $revision in
| -     0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
| -     *)
| +     *[!0-9]* | 0[0-9]*)
|         $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 
1>&2
|         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
|         exit $EXIT_FAILURE
| @@ -3136,8 +3134,7 @@
|       esac
|
|       case $age in
| -     0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
| -     *)
| +     *[!0-9]* | 0[0-9]*)
|         $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
|         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
|         exit $EXIT_FAILURE

Longish quote from the autoconf manual:
==
~ Use case where possible since it is faster, being a shell builtin:
case $ac_feature in
~  *[!-a-zA-Z0-9_]*) action ;;
esac

~ Alas, negated character classes are probably not portable, although no
shell is known to not support the POSIX syntax `[!...]' (when in interactive
mode, zsh is confused by the `[!...]' syntax and looks for an event in its
history because of `!'). Many shells do not support the alternative syntax
`[^...]' (Solaris, Digital Unix, etc.).  One solution can be:
expr "$ac_feature" : '.*[^-a-zA-Z0-9_]' >/dev/null &&
~  action

~ or better yet
expr "x$ac_feature" : '.*[^-a-zA-Z0-9_]' >/dev/null &&
~  action

~ `expr "Xfoo" : "Xbar"' is more robust than `echo "Xfoo" | grep "^Xbar"',
because it avoids problems when `foo' contains backslashes.
==

Doesn't this apply to your patch too?

Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (Darwin)

iQCVAwUBQgIW3LiDAg3OZTLPAQKPHAP9HT9e4IrTvJVvrqCZCtozDERrIb6ekSaL
0LX4tk0y0eH857iwcLC4lt1KnoRzAz6UHiWsGa7123E/0VFJ8zstsO68ZjNy3u/L
uXlD1F93LzTcCF1U8+OAM3PdAEGRZCL0Uhrbvt/QjStslC9eeiMc+5B8FcmpUe1S
VzVOj5VT5Kw=
=l90/
-----END PGP SIGNATURE-----




reply via email to

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