From 590ef889bc7afe42d4feec94e1c4fbd4ddd65226 Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Thu, 11 Jul 2019 11:47:47 -0300 Subject: 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 --- sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-chk-ldbl-compat.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-chk-ldbl-compat.c (limited to 'sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-chk-ldbl-compat.c') diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-chk-ldbl-compat.c b/sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-chk-ldbl-compat.c new file mode 100644 index 0000000000..feae8f21c6 --- /dev/null +++ b/sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-chk-ldbl-compat.c @@ -0,0 +1,6 @@ +#define _FORTIFY_SOURCE 2 +#define OBSTACK_FUNCTION __obstack_printf_chk +#define OBSTACK_FUNCTION_PARAMS (&ob, 1, "%.30Lf", ld) +#define VOBSTACK_FUNCTION __obstack_vprintf_chk +#define VOBSTACK_FUNCTION_PARAMS (&ob, 1, "%.30Lf", ap) +#include -- cgit 1.4.1