[Top][All Lists]

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

Re: module request: comparing version numbers

From: Eric Blake
Subject: Re: module request: comparing version numbers
Date: Thu, 17 Jun 2010 11:39:27 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Mnenhy/0.8.2 Thunderbird/3.0.4

On 06/17/2010 11:33 AM, Sam Steingold wrote:
> Hi,
> some gnulib modules (e.g., gnulib/m4/libunistring-base.m4) have
> facilities for comparing version numbers, e.g., 1.5.22 with 2.2.8.
> it would be nice if there were a module (say, version-compare) which
> would export such a facility.
> e.g., @VERSION_COMPARE@ would expand to
> version_compare() {
>   ...
> }
> which would return 0 or 1 depending on whether $1 is smaller than $2.

Are you talking about version comparisons at m4 time (if so, is
m4_version_compare from autoconf adequate?), at shell time (if so, is
AS_VERSION_COMPARE from autoconf adequate?), or in your executable (if
so, is either the strverscmp or filevercmp module adequate?).

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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