On Mon, Jan 25, 2010 at 12:39:02PM +0100, Jim Meyering wrote: > 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.
No it didn't. Adding that also fixes it. xstrtoll works for me, please commit this to gnulib. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw