diff options
author | Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com> | 2016-06-28 17:30:42 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com> | 2016-10-25 17:03:54 -0200 |
commit | 6962682ffe5e5f0373047a0b894fee7a774be254 (patch) | |
tree | e8e3660cf706a62dc9c71972aa2acf165caf5c48 /sysdeps/ieee754/ldbl-opt | |
parent | 78b7adbaea643f2f213bb113e3ec933416a769a8 (diff) | |
download | glibc-6962682ffe5e5f0373047a0b894fee7a774be254.tar.gz |
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.
Diffstat (limited to 'sysdeps/ieee754/ldbl-opt')
-rw-r--r-- | sysdeps/ieee754/ldbl-opt/Makefile | 1 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c | 8 |
2 files changed, 9 insertions, 0 deletions
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); +} |