diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-02-23 18:43:41 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-02-23 18:43:41 +0000 |
commit | a6205f535ae295e644a1ec53fa130e2785adfb58 (patch) | |
tree | 7ea3cdabe1196869e61db644155a93fb9ad84db4 /gdb/doublest.h | |
parent | 0f0b8dcdc328692f3b92cf2034b8866f0c01fa33 (diff) | |
download | gdb-a6205f535ae295e644a1ec53fa130e2785adfb58.zip gdb-a6205f535ae295e644a1ec53fa130e2785adfb58.tar.gz gdb-a6205f535ae295e644a1ec53fa130e2785adfb58.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/doublest.h')
-rw-r--r-- | gdb/doublest.h | 11 |
1 files changed, 8 insertions, 3 deletions
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 *, |