* remote.c (struct remote_state): Add BUF and BUF_SIZE.
[deliverable/binutils-gdb.git] / gdb / doublest.h
index c10b3ea9c0b58c3617ffa8c9f82ea49137e8d5a7..1ebefd813082f05efa913c348c20061335105115 100644 (file)
@@ -1,8 +1,8 @@
 /* Floating point definitions for GDB.
 
    Copyright (C) 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005 Free Software
-   Foundation, Inc.
+   1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005, 2006
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,10 +48,20 @@ 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 PRINTF_HAS_LONG_DOUBLE \
+     && defined SCANF_HAS_LONG_DOUBLE)
 typedef long double DOUBLEST;
+# define DOUBLEST_PRINT_FORMAT "%Lg"
+# define DOUBLEST_SCAN_FORMAT "%Lg"
 #else
 typedef double DOUBLEST;
+# 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 *,
This page took 0.023804 seconds and 4 git commands to generate.