bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] xstrtoll: new module


From: Jim Meyering
Subject: Re: [PATCH] xstrtoll: new module
Date: Mon, 25 Jan 2010 12:39:02 +0100

Richard W.M. Jones wrote:
> On Sat, Jan 23, 2010 at 12:13:51PM +0100, Jim Meyering wrote:
>> diff --git a/lib/xstrtol.h b/lib/xstrtol.h
>> index 95475f0..3a94a9c 100644
>> --- a/lib/xstrtol.h
>> +++ b/lib/xstrtol.h
>> @@ -46,6 +46,11 @@ _DECLARE_XSTRTOL (xstrtoul, unsigned long int)
>>  _DECLARE_XSTRTOL (xstrtoimax, intmax_t)
>>  _DECLARE_XSTRTOL (xstrtoumax, uintmax_t)
>>
>> +#if HAVE_LONG_LONG_INT
>> +_DECLARE_XSTRTOL (xstrtoll, long long int)
>> +_DECLARE_XSTRTOL (xstrtoull, unsigned long long int)
>> +#endif
>> +
>>  #ifndef __attribute__
>>  # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
>>  #  define __attribute__(x)
>
> This didn't work for me.  I had to add '#include <config.h>' near the
> top of 'lib/xstrtol.h' in order to get the symbol HAVE_LONG_LONG_INT
> defined.

Hi Rich,

Doesn't the C source file in libguestfs that includes "xstrtol.h"
already include config.h?  Including "config.h" is a prerequisite
for using just about anything from gnulib.

> Once I added that, the xstrtoll function works correctly against a
> variety of tests of well- and badly-formed strings.

Thanks for testing.




reply via email to

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