From a6205f535ae295e644a1ec53fa130e2785adfb58 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 23 Feb 2006 18:43:41 +0000 Subject: * doublest.h: Conditionalize DOUBLEST on PRINTF_HAS_LONG_DOUBLE also. (DOUBLEST_FORMAT): Rename to DOUBLEST_PRINT_FORMAT. (DOUBLEST_SCAN_FORMAT): New. * ada-lex.l (PRINTF_HAS_LONG_DOUBLE): Remove redefinitions. (processReal): Use DOUBLEST_SCAN_FORMAT. * c-exp.y (parse_number): Likewise. * jv-exp.y (parse_number): Likewise. * objc-exp.y (parse_number): Likewise. * p-exp.y (parse_number): Likewise. --- gdb/doublest.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gdb/doublest.h') diff --git a/gdb/doublest.h b/gdb/doublest.h index a035b7d..1ebefd8 100644 --- a/gdb/doublest.h +++ b/gdb/doublest.h @@ -48,15 +48,20 @@ struct floatformat; host's `long double'. In general, we'll probably reduce the precision of any such values and print a warning. */ -#if defined HAVE_LONG_DOUBLE && defined SCANF_HAS_LONG_DOUBLE +#if (defined HAVE_LONG_DOUBLE && defined PRINTF_HAS_LONG_DOUBLE \ + && defined SCANF_HAS_LONG_DOUBLE) typedef long double DOUBLEST; -# define DOUBLEST_FORMAT "%Lg" +# define DOUBLEST_PRINT_FORMAT "%Lg" +# define DOUBLEST_SCAN_FORMAT "%Lg" #else typedef double DOUBLEST; -# define DOUBLEST_FORMAT "%g" +# define DOUBLEST_PRINT_FORMAT "%g" +# define DOUBLEST_SCAN_FORMAT "%lg" /* If we can't scan or print long double, we don't want to use it anywhere. */ # undef HAVE_LONG_DOUBLE +# undef PRINTF_HAS_LONG_DOUBLE +# undef SCANF_HAS_LONG_DOUBLE #endif extern void floatformat_to_doublest (const struct floatformat *, -- cgit v1.1