bug-gnulib
[Top][All Lists]
Advanced

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

Re: check_version


From: Paul Eggert
Subject: Re: check_version
Date: Sun, 26 Jun 2005 00:21:18 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Simon Josefsson <address@hidden> writes:

>        /* Check version of libgcrypt. */
>        if (!gcry_check_version (GCRYPT_VERSION))
>          die ("version mismatch\n");

Can't you use strverscmp for this?  E.g.:

    if (strverscmp (GCRYPT_VERSION, VERSION) < 0)
      die ("version mismatch\n");

Even if strverscmp itself can't be used directly, it seems to me that
its use would greatly simplify this package, and avoid the
integer-overflow glitches Jim mentioned.




reply via email to

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