glibc/sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-chk-ldbl-compat.c
Gabriel F. T. Gomes 590ef889bc 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>
2019-11-27 15:52:41 -03:00

7 lines
278 B
C

#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 <test-obstack-ldbl-compat-template.c>