diff options
Diffstat (limited to 'gdb/doublest.h')
-rw-r--r-- | gdb/doublest.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/doublest.h b/gdb/doublest.h index c10b3ea9c0b..1a479b86719 100644 --- a/gdb/doublest.h +++ b/gdb/doublest.h @@ -48,10 +48,15 @@ struct floatformat; host's `long double'. In general, we'll probably reduce the precision of any such values and print a warning. */ -#ifdef HAVE_LONG_DOUBLE +#if defined HAVE_LONG_DOUBLE && defined SCANF_HAS_LONG_DOUBLE typedef long double DOUBLEST; +# define DOUBLEST_FORMAT "%Lg" #else typedef double DOUBLEST; +# define DOUBLEST_FORMAT "%g" +/* If we can't scan or print long double, we don't want to use it + anywhere. */ +# undef HAVE_LONG_DOUBLE #endif extern void floatformat_to_doublest (const struct floatformat *, |