summaryrefslogtreecommitdiff
path: root/gdb/doublest.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-02-23 18:43:41 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-02-23 18:43:41 +0000
commita739a1002040e87f16c67d4c0b126e0f96bd2169 (patch)
tree26f02903cce21fbfde02f32f12b2075d9b060b1c /gdb/doublest.h
parentbef6a6855742f88e0d960b982581bf3d1f9b409c (diff)
downloadgdb-a739a1002040e87f16c67d4c0b126e0f96bd2169.tar.gz
* 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 a035b7d79d0..1ebefd81308 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 *,