summaryrefslogtreecommitdiff
path: root/lib/printf-frexpl.c
diff options
context:
space:
mode:
authorManuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>2016-05-26 16:48:15 +0100
committerManuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>2016-05-26 16:48:15 +0100
commit5f2b09982312c98863eb9a8dfe2c608b81f58259 (patch)
treee5d38581c2f36e1cca02efedd2d85044d77f76f9 /lib/printf-frexpl.c
parent3e0814cd9862b89c7a39672672937477bd87ddfb (diff)
Imported Upstream version 0.9.6upstream/0.9.6
Diffstat (limited to 'lib/printf-frexpl.c')
-rw-r--r--lib/printf-frexpl.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/lib/printf-frexpl.c b/lib/printf-frexpl.c
index 6ee1e9bf..fbb0c6a1 100644
--- a/lib/printf-frexpl.c
+++ b/lib/printf-frexpl.c
@@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -14,5 +14,24 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#define USE_LONG_DOUBLE
-#include "printf-frexp.c"
+#include <config.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+/* Specification. */
+# include "printf-frexpl.h"
+
+# include "printf-frexp.h"
+
+long double
+printf_frexpl (long double x, int *expptr)
+{
+ return printf_frexp (x, expptr);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "printf-frexp.c"
+
+#endif