Simon Josefsson <[EMAIL PROTECTED]> wrote:
> Paul Eggert <[EMAIL PROTECTED]> writes:
>
>> Simon Josefsson <[EMAIL PROTECTED]> 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.
>
> Good idea!  How about this?
>
> 2005-06-25  Simon Josefsson  <[EMAIL PROTECTED]>
>
>       * modules/check_version: New file.
>
> 2005-06-25  Simon Josefsson  <[EMAIL PROTECTED]>
>
>       * check_version.h, check_version.c: New file.

I just noticed that you used an underscore in the middle of a
file name rather than a hyphen.  Long-standing GNU tradition is
to use hyphens there.  I think one of the reasons is that hyphens
are slightly easier to type.

> +Makefile.am:
> +lib_SOURCES += check_version.h check_version.c

Also, in coreutils and gnulib, we've been moving away from
using the `Makefile.am' section of the modules files, for reasons
discussed at length a few months ago.  And I'm pretty sure I saw
some automake changes that will help Bruno do things the way he
wants in gettext.

So, you might want to remove that line and instead add a file
named m4/check-version.m4 like this:

#serial 1
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

AC_DEFUN([gl_CHECK_VERSION],
[
  AC_LIBSOURCES([check-version.c, check-version.h])
  AC_LIBOBJ([check-version])
])


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to