Bruno Haible <[EMAIL PROTECTED]> 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 th
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".
dnl Rename some macros and functions used for locking.
AH_BOTTOM([
#define glthread_lock_init libi
Bruno Haible <[EMAIL PROTECTED]> writes:
>> The gnulib module could set
>> something like that up, to avoid manual config.h additions.
>
> The name of the xxx_check_version function is something that each package
> will want to define explicitly. I don't think deducing its name through a
> rule is
Bruno Haible <[EMAIL PROTECTED]> writes:
>> The gnulib module could set
>> something like that up, to avoid manual config.h additions.
>
> The name of the xxx_check_version function is something that each package
> will want to define explicitly. I don't think deducing its name through a
> rule is
Simon Josefsson wrote:
> > #define stringprep_check_version check_version
> > instead of a function that calls check_version.
>
> I assume you meant:
>
> #define check_version stringprep_check_version
Yes, it's backwards. (I was thinking about changing check_version into
a macro.)
> Perhaps che
Bruno Haible <[EMAIL PROTECTED]> writes:
> Simon Josefsson wrote:
>> +const char *
>> +check_version (const char *req_version)
>> +{
>> + if (!req_version || strverscmp (req_version, VERSION) < 0)
>> +return VERSION;
>> +
>> + return NULL;
>> +}
>> ...
>> You will typically wrap the call to
Simon Josefsson wrote:
> +const char *
> +check_version (const char *req_version)
> +{
> + if (!req_version || strverscmp (req_version, VERSION) < 0)
> +return VERSION;
> +
> + return NULL;
> +}
> ...
> You will typically wrap the call to the
> `check_version' function through a library API,
Derek Price <[EMAIL PROTECTED]> writes:
> Simon Josefsson wrote:
>
>>+ if (!req_version || strverscmp (req_version, VERSION) < 0)
>>+return VERSION;
>>
>>
>
> Why did you choose to call the version string "VERSION" rather than
> using the "PACKAGE_VERSION" string automatically defined by AC
Simon Josefsson wrote:
>No particular reason. VERSION is defined automatically by AC_INIT
>too, is it not? Is there a difference between PACKAGE_VERSION and
>VERSION? I'd be happy to change, it doesn't matter for me.
>
>
The CVS config.h is only showing `PACKAGE_VERSION'.
Regards,
Derek
Simon Josefsson wrote:
>Ok, unless someone suggests otherwise, I'll change it to
>PACKAGE_VERSION later tonight. Perhaps it is Automake that define
>VERSION.
>
>
The CVS project uses Automake 1.9.5 and Autoconf 2.59 and VERSION does
not get defined. We might not be using a macro that defines
Derek Price <[EMAIL PROTECTED]> writes:
> Simon Josefsson wrote:
>
>>No particular reason. VERSION is defined automatically by AC_INIT
>>too, is it not? Is there a difference between PACKAGE_VERSION and
>>VERSION? I'd be happy to change, it doesn't matter for me.
>>
>>
>
> The CVS config.h is
Simon Josefsson wrote:
>+ if (!req_version || strverscmp (req_version, VERSION) < 0)
>+return VERSION;
>
>
Why did you choose to call the version string "VERSION" rather than
using the "PACKAGE_VERSION" string automatically defined by AC_INIT?
Regards,
Derek
__
Jim Meyering <[EMAIL PROTECTED]> writes:
> Simon Josefsson <[EMAIL PROTECTED]> wrote:
>> Ah, right. I accidentally installed the m4 file. Ok to install the
>> rest too?
>
> Sure. It looks fine to me.
Done.
___
bug-gnulib mailing list
bug-gnulib@gnu
Jim Meyering <[EMAIL PROTECTED]> writes:
> 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))
Simon Josefsson <[EMAIL PROTECTED]> wrote:
> Ah, right. I accidentally installed the m4 file. Ok to install the
> rest too?
Sure. It looks fine to me.
Thanks.
___
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-g
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 str
Jim Meyering <[EMAIL PROTECTED]> writes:
> Simon Josefsson <[EMAIL PROTECTED]> wrote:
>> Not sure I follow the higher-level language part... Perhaps I should
>> explain more what I use this for.
>>
>> I use it in my libraries, which are all written in C. The source code
>
> Thanks for explaining.
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 (GCRY
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 mismatc
Simon Josefsson <[EMAIL PROTECTED]> wrote:
> Not sure I follow the higher-level language part... Perhaps I should
> explain more what I use this for.
>
> I use it in my libraries, which are all written in C. The source code
Thanks for explaining.
That's what I suspected.
What do you think about
Jim Meyering <[EMAIL PROTECTED]> writes:
> Simon Josefsson <[EMAIL PROTECTED]> wrote:
>> I'm using this module in all of my GNU packages. One complication
>> might be that it depends on VERSION being defined. Feedback
>> appreciated.
>
> Looks useful, but sounds like a job better implemented
> i
Simon Josefsson <[EMAIL PROTECTED]> wrote:
> I'm using this module in all of my GNU packages. One complication
> might be that it depends on VERSION being defined. Feedback
> appreciated.
Looks useful, but sounds like a job better implemented
in a higher level language. But maybe you have const
Simon Josefsson <[EMAIL PROTECTED]> writes:
> Index: lib/check_version.c
Just realized: it should #include check_version.h. Other than that, I
have now built and tested the module in one project.
___
bug-gnulib mailing list
bug-gnulib@gnu.org
http://
23 matches
Mail list logo