about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-ldbl-compat.c
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabrielftg@linux.ibm.com>2019-07-11 11:47:47 -0300
committerGabriel F. T. Gomes <gabrielftg@linux.ibm.com>2019-11-27 15:52:41 -0300
commit590ef889bc7afe42d4feec94e1c4fbd4ddd65226 (patch)
tree73fa4b5f39f63a91c8232df0789b36716fffc075 /sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-ldbl-compat.c
parentff3cb5accb80471df69fac2c0dded9cab794220a (diff)
downloadglibc-590ef889bc7afe42d4feec94e1c4fbd4ddd65226.tar.gz
glibc-590ef889bc7afe42d4feec94e1c4fbd4ddd65226.tar.xz
glibc-590ef889bc7afe42d4feec94e1c4fbd4ddd65226.zip
ldbl-128ibm-compat: Add obstack printing functions
Similarly to the functions from the *printf family, this patch adds
implementations for __obstack_*printf* functions that set the
'mode_flags' parameter to PRINTF_LDBL_USES_FLOAT128, before making calls
to __vfprintf_internal (indirectly through __obstack_vprintf_internal).

Tested for powerpc64le.

Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-ldbl-compat.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-ldbl-compat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-ldbl-compat.c b/sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-ldbl-compat.c
new file mode 100644
index 0000000000..3849d25ef1
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-ldbl-compat.c
@@ -0,0 +1,6 @@
+#define _FORTIFY_SOURCE 0
+#define OBSTACK_FUNCTION obstack_printf
+#define OBSTACK_FUNCTION_PARAMS (&ob, "%.30Lf", ld)
+#define VOBSTACK_FUNCTION obstack_vprintf
+#define VOBSTACK_FUNCTION_PARAMS (&ob, "%.30Lf", ap)
+#include <test-obstack-ldbl-compat-template.c>