glibc/sysdeps/ieee754/ldbl-128ibm-compat/test-obstack-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
260 B
C

#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>