PATCH: Use long long in _itoa and _itowa if PREFER_LONG_LONG is defined
Roland McGrath
roland@hack.frob.com
Fri Mar 16 23:34:00 GMT 2012
It would be cleaner just to define _itoa_word to take long long and
define away _itoa in _itoa.h as for the LONG_MAX == LLONG_MAX case.
Something like this:
Change _itoa.h to define some macros:
#ifndef _ITOA_NEEDED
# define _ITOA_NEEDED (LONG_MAX != LLONG_MAX)
#endif
#ifndef _ITOA_WORD_TYPE
# define _ITOA_WORD_TYPE unsigned long int
#endif
Use _ITOA_WORD_TYPE in the _itoa_word declaration, and
change the #if tests to #if _ITOA_NEEDED.
Then you can just write an x32/_itoa.h:
#define _ITOA_NEEDED 0
#define _ITOA_WORD_TYPE unsigned long long int
#include_next <_itoa.h>
Thanks,
Roland
More information about the Libc-alpha
mailing list