summaryrefslogtreecommitdiff
path: root/glib/gnulib/printf-frexpl.c
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2018-05-11 02:47:36 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2018-06-06 16:43:40 +0000
commit5db4e022dc7872620da4ea82f200b9c79d8258ec (patch)
tree2680016845d790df34d88d9fc9f5ab2dc9f7f326 /glib/gnulib/printf-frexpl.c
parentb4259dec706b63ff18bedaa6c2943ffbdf679986 (diff)
downloadglib-lrn/gnulib-printf.tar.gz
glib: update internal gnulib from upstreamlrn/gnulib-printf
https://bugzilla.gnome.org/show_bug.cgi?id=795569 Related to issue #1371.
Diffstat (limited to 'glib/gnulib/printf-frexpl.c')
-rw-r--r--glib/gnulib/printf-frexpl.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/glib/gnulib/printf-frexpl.c b/glib/gnulib/printf-frexpl.c
new file mode 100644
index 000000000..921e1c1c7
--- /dev/null
+++ b/glib/gnulib/printf-frexpl.c
@@ -0,0 +1,37 @@
+/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
+ Copyright (C) 2007, 2009-2018 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
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#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