mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Check _ITOA_NEEDED and use _ITOA_WORD_TYPE
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
2012-05-18 H.J. Lu <hongjiu.lu@intel.com>
|
2012-05-18 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* stdio-common/_itoa.c: Check _ITOA_NEEDED instead of
|
||||||
|
LLONG_MAX != LONG_MAX.
|
||||||
|
(_itoa_word): Use _ITOA_WORD_TYPE on value.
|
||||||
|
(_fitoa_word): Likewise.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h: Fold copyright
|
* sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h: Fold copyright
|
||||||
years.
|
years.
|
||||||
* sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h: Likewise.
|
* sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h: Likewise.
|
||||||
|
@@ -79,7 +79,7 @@ struct base_table_t
|
|||||||
|
|
||||||
|
|
||||||
/* We do not compile _itoa if we always can use _itoa_word. */
|
/* We do not compile _itoa if we always can use _itoa_word. */
|
||||||
#if LLONG_MAX != LONG_MAX
|
#if _ITOA_NEEDED
|
||||||
/* Local variables. */
|
/* Local variables. */
|
||||||
const struct base_table_t _itoa_base_table[] attribute_hidden =
|
const struct base_table_t _itoa_base_table[] attribute_hidden =
|
||||||
{
|
{
|
||||||
@@ -169,7 +169,7 @@ extern const char _itoa_upper_digits_internal[] attribute_hidden;
|
|||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
_itoa_word (unsigned long value, char *buflim,
|
_itoa_word (_ITOA_WORD_TYPE value, char *buflim,
|
||||||
unsigned int base, int upper_case)
|
unsigned int base, int upper_case)
|
||||||
{
|
{
|
||||||
const char *digits = (upper_case
|
const char *digits = (upper_case
|
||||||
@@ -204,7 +204,7 @@ _itoa_word (unsigned long value, char *buflim,
|
|||||||
#undef SPECIAL
|
#undef SPECIAL
|
||||||
|
|
||||||
|
|
||||||
#if LLONG_MAX != LONG_MAX
|
#if _ITOA_NEEDED
|
||||||
char *
|
char *
|
||||||
_itoa (value, buflim, base, upper_case)
|
_itoa (value, buflim, base, upper_case)
|
||||||
unsigned long long int value;
|
unsigned long long int value;
|
||||||
@@ -470,7 +470,8 @@ _itoa (value, buflim, base, upper_case)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *
|
char *
|
||||||
_fitoa_word (unsigned long value, char *buf, unsigned int base, int upper_case)
|
_fitoa_word (_ITOA_WORD_TYPE value, char *buf, unsigned int base,
|
||||||
|
int upper_case)
|
||||||
{
|
{
|
||||||
char tmpbuf[sizeof (value) * 4]; /* Worst case length: base 2. */
|
char tmpbuf[sizeof (value) * 4]; /* Worst case length: base 2. */
|
||||||
char *cp = _itoa_word (value, tmpbuf + sizeof (value) * 4, base, upper_case);
|
char *cp = _itoa_word (value, tmpbuf + sizeof (value) * 4, base, upper_case);
|
||||||
@@ -479,7 +480,7 @@ _fitoa_word (unsigned long value, char *buf, unsigned int base, int upper_case)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LLONG_MAX != LONG_MAX
|
#if _ITOA_NEEDED
|
||||||
char *
|
char *
|
||||||
_fitoa (unsigned long long value, char *buf, unsigned int base, int upper_case)
|
_fitoa (unsigned long long value, char *buf, unsigned int base, int upper_case)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user