From 6962682ffe5e5f0373047a0b894fee7a774be254 Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Tue, 28 Jun 2016 17:30:42 -0300 Subject: Add strfromd, strfromf, and strfroml functions ISO/IEC TS 18661-1 adds several functions in the strfrom family to stdlib. This patch adds strfromd, strfromf, and strfroml. This is being done in preparation for the new floating-point type, float128. The added functions convert a floating-point value into a string, with configurable format. --- sysdeps/ieee754/ldbl-opt/Makefile | 1 + sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c (limited to 'sysdeps/ieee754/ldbl-opt') diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile index 4c7db9e353..239dd0efa5 100644 --- a/sysdeps/ieee754/ldbl-opt/Makefile +++ b/sysdeps/ieee754/ldbl-opt/Makefile @@ -24,6 +24,7 @@ libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \ vdprintf_chk obstack_printf_chk obstack_vprintf_chk \ syslog syslog_chk vsyslog vsyslog_chk \ strfmon strfmon_l \ + strfroml \ strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \ qecvt qfcvt qgcvt qecvt_r qfcvt_r \ isinf isnan finite signbit scalb log2 lgamma_r ceil \ diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c b/sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c new file mode 100644 index 0000000000..d6df69e418 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +strfroml (char *dest, size_t size, const char *format, long double f) +{ + return strfromd (dest, size, format, f); +} -- cgit 1.4.1