aboutsummaryrefslogtreecommitdiff
path: root/gdb/doublest.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-02-23 18:43:41 +0000
committerDaniel Jacobowitz <drow@false.org>2006-02-23 18:43:41 +0000
commita6205f535ae295e644a1ec53fa130e2785adfb58 (patch)
tree7ea3cdabe1196869e61db644155a93fb9ad84db4 /gdb/doublest.h
parent0f0b8dcdc328692f3b92cf2034b8866f0c01fa33 (diff)
downloadgdb-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.h11
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 *,