From: Ulrich Drepper Date: Tue, 15 Jun 1999 22:10:18 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/pre-glibc-2_1_3~750 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff4b126a183a0a50aaa3ac1d9a323ae9d1f07292;p=platform%2Fupstream%2Fglibc.git Update. 1999-06-15 Ulrich Drepper * stdio-common/printf-parse.h (parse_one_spec): Don't set is_longlong is not necessary. --- diff --git a/ChangeLog b/ChangeLog index 019fe99..e771cbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-06-15 Ulrich Drepper + + * stdio-common/printf-parse.h (parse_one_spec): Don't set + is_longlong is not necessary. + 1999-06-15 H.J. Lu * Make-dist (sysdep_dirs): Exclude SCCS. diff --git a/stdio-common/printf-parse.h b/stdio-common/printf-parse.h index 2e6f0dc..a915f03 100644 --- a/stdio-common/printf-parse.h +++ b/stdio-common/printf-parse.h @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include #include #include @@ -265,7 +266,6 @@ parse_one_spec (const UCHAR_T *format, size_t posn, struct printf_spec *spec, } /* Check for type modifiers. */ -#define is_longlong is_long_double spec->info.is_long_double = 0; spec->info.is_short = 0; spec->info.is_long = 0; @@ -300,18 +300,24 @@ parse_one_spec (const UCHAR_T *format, size_t posn, struct printf_spec *spec, case L_('Z'): /* ints are size_ts. */ assert (sizeof (size_t) <= sizeof (unsigned long long int)); - spec->info.is_longlong = sizeof (size_t) > sizeof (unsigned long int); +#if LONG_MAX != LONG_LONG_MAX + spec->info.is_long_double = sizeof (size_t) > sizeof (unsigned long int); +#endif spec->info.is_long = sizeof (size_t) > sizeof (unsigned int); break; case L_('t'): assert (sizeof (ptrdiff_t) <= sizeof (long long int)); - spec->info.is_longlong = (sizeof (ptrdiff_t) > sizeof (long int)); +#if LONG_MAX != LONG_LONG_MAX + spec->info.is_long_double = (sizeof (ptrdiff_t) > sizeof (long int)); +#endif spec->info.is_long = sizeof (ptrdiff_t) > sizeof (int); break; case L_('j'): assert (sizeof (uintmax_t) <= sizeof (unsigned long long int)); - spec->info.is_longlong = (sizeof (uintmax_t) - > sizeof (unsigned long int)); +#if LONG_MAX != LONG_LONG_MAX + spec->info.is_long_double = (sizeof (uintmax_t) + > sizeof (unsigned long int)); +#endif spec->info.is_long = sizeof (uintmax_t) > sizeof (unsigned int); break; default: @@ -342,16 +348,19 @@ parse_one_spec (const UCHAR_T *format, size_t posn, struct printf_spec *spec, case L'o': case L'X': case L'x': - if (spec->info.is_longlong) +#if LONG_MAX != LONG_LONG_MAX + if (spec->info.is_long_double) spec->data_arg_type = PA_INT|PA_FLAG_LONG_LONG; - else if (spec->info.is_long) - spec->data_arg_type = PA_INT|PA_FLAG_LONG; - else if (spec->info.is_short) - spec->data_arg_type = PA_INT|PA_FLAG_SHORT; - else if (spec->info.is_char) - spec->data_arg_type = PA_CHAR; else - spec->data_arg_type = PA_INT; +#endif + if (spec->info.is_long) + spec->data_arg_type = PA_INT|PA_FLAG_LONG; + else if (spec->info.is_short) + spec->data_arg_type = PA_INT|PA_FLAG_SHORT; + else if (spec->info.is_char) + spec->data_arg_type = PA_CHAR; + else + spec->data_arg_type = PA_INT; break; case L'e': case L'E':