PATCH: Use long long in _itoa and _itowa if PREFER_LONG_LONG is defined
H.J. Lu
hjl.tools@gmail.com
Tue Mar 20 21:38:00 GMT 2012
On Tue, Mar 20, 2012 at 1:11 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Mar 20, 2012 at 1:06 PM, Roland McGrath <roland@hack.frob.com> wrote:
>>> x32/_itoa.h won't work with
>>
>> It just means we need to move _itoa.h to sysdeps/generic and
>> change all the uses to #include <_itoa.h>. I think that's fine.
>>
>>
>
This patch moves _itoa.h to sysdeps/generic. I left _itowa.h in stdio-common
since it is only used in stdio-common. I added
#ifndef _ITOA_NEEDED
# define _ITOA_NEEDED (LONG_MAX != LLONG_MAX)
#endif
#ifndef _ITOA_WORD_TYPE
# define _ITOA_WORD_TYPE unsigned long int
#endif
to _itoa.h and
#ifndef _ITOWA_NEEDED
# define _ITOWA_NEEDED (LONG_MAX != LLONG_MAX)
#endif
#ifndef _ITOWA_WORD_TYPE
# define _ITOWA_WORD_TYPE unsigned long int
#endif
to itowa.h. I added _itowa macro if _ITOWA_NEEDED false since it
is used in vfprintf.c to output long long. Tested on Linux/ia32, Linux/x86-64
and Linux/x32. OK to install?
Thanks.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libc-itoa.patch
Type: text/x-patch
Size: 32522 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120320/b6a5de11/attachment.bin>
More information about the Libc-alpha
mailing list