[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xstrtoll: new module
From: |
Richard W.M. Jones |
Subject: |
Re: [PATCH] xstrtoll: new module |
Date: |
Mon, 25 Jan 2010 11:34:17 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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.
Once I added that, the xstrtoll function works correctly against a
variety of tests of well- and badly-formed strings.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
- [PATCH] xstrtoll: new module, Jim Meyering, 2010/01/23
- Re: TESTS_ENVIRONMENT, Bruno Haible, 2010/01/24
- Re: [PATCH] xstrtoll: new module, Jim Meyering, 2010/01/25
- Re: [PATCH] xstrtoll: new module, Bruno Haible, 2010/01/25
- Re: [PATCH] xstrtoll: new module, Jim Meyering, 2010/01/25
- Re: [PATCH] xstrtoll: new module, Bruno Haible, 2010/01/25
- Re: [PATCH] xstrtoll: new module, Jim Meyering, 2010/01/25
- Re: gnulib-tool warnings, Bruno Haible, 2010/01/25
- Re: gnulib-tool warnings, Bruno Haible, 2010/01/25
Re: [PATCH] xstrtoll: new module,
Richard W.M. Jones <=