bug-gnulib
[Top][All Lists]
Advanced

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

Re: check_version


From: Simon Josefsson
Subject: Re: check_version
Date: Mon, 18 Jul 2005 15:53:30 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> having a AC_DEFINE seem somewhat hackish.
>
> No, why is this odd? Here's what I use in gettext to avoid collisions of
> the "lock in libintl" with "lock outside libintl".

Perhaps it is OK.  I had another reason for disliking that approach:
I'm using GTK-DOC style comments to document my API, so if the GTK-DOC
comment doesn't appear in front of a properly named function, the API
documentation system doesn't work.  I'm sure it can be worked around,
but work-arounds often seem to cause problems later on..

But I just realized I have another project -- libntlm -- which doesn't
use GTK-DOC, and where I used my old version.c approach.  It now uses
this module, and a AC_DEFINE to rename it.  So I'm using the module
now.  I discovered a slight bug too, hence patch below.

Thanks.

2005-07-18  Simon Josefsson  <address@hidden>

        * check-version.c (check_version): Accept identical versions too.

--- check-version.c     16 Jul 2005 21:29:45 +0200      1.2
+++ check-version.c     18 Jul 2005 15:50:25 +0200      
@@ -40,7 +40,7 @@
 const char *
 check_version (const char *req_version)
 {
-  if (!req_version || strverscmp (req_version, VERSION) < 0)
+  if (!req_version || strverscmp (req_version, VERSION) <= 0)
     return VERSION;
 
   return NULL;




reply via email to

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