ldbl-128ibm-compat: Introduce ieee128 symbols
Commit Message
This patch adds __*ieee128 symbols for strfrom, strtold, strtold_l, wcstold
and wcstold_l functions. Redirection from *l to *ieee128 will be handled
in separate patch once we start building these new files.
2018-06-26 Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
* sysdeps/ieee754/ldbl-128ibm-compat/Versions: Add __strfromieee128,
__strtoieee128, __strtoieee128_l,__wcstoieee128 and __wcstoieee128_l.
* sysdeps/ieee754/ldbl-128ibm-compat/strfromf128.c: New file.
* sysdeps/ieee754/ldbl-128ibm-compat/strtof128.c: New file.
* sysdeps/ieee754/ldbl-128ibm-compat/strtof128_l.c: New file.
* sysdeps/ieee754/ldbl-128ibm-compat/wcstof128.c: New file.
* sysdeps/ieee754/ldbl-128ibm-compat/wcstof128_l.c: New file.
---
sysdeps/ieee754/ldbl-128ibm-compat/Versions | 8 ++++++++
sysdeps/ieee754/ldbl-128ibm-compat/strfromf128.c | 21 +++++++++++++++++++++
sysdeps/ieee754/ldbl-128ibm-compat/strtof128.c | 20 ++++++++++++++++++++
sysdeps/ieee754/ldbl-128ibm-compat/strtof128_l.c | 20 ++++++++++++++++++++
sysdeps/ieee754/ldbl-128ibm-compat/wcstof128.c | 20 ++++++++++++++++++++
sysdeps/ieee754/ldbl-128ibm-compat/wcstof128_l.c | 20 ++++++++++++++++++++
6 files changed, 109 insertions(+)
create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/strfromf128.c
create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/strtof128.c
create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/strtof128_l.c
create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/wcstof128.c
create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/wcstof128_l.c
Comments
On Tue, 26 Jun 2018, Rajalakshmi Srinivasaraghavan wrote:
> +libm_alias_float128_other_r_ldbl (strfrom, strfrom,);
I don't think the use of libm_alias_* macros is appropriate for libc
functions (certainly various of the generic such macros do symbol
versioning things that are only correct in libm, not in libc). As far as
I know, you only need a single weak_alias call in each of these files, so
it's simpler without using libm_alias_* anyway.
@@ -111,3 +111,11 @@ libm {
__ynieee128;
}
}
+libc {
+ LDBL_IBM128_VERSION {
+ __strfromieee128;
+ __strtoieee128;
+ __strtoieee128_l;
+ __wcstoieee128;
+ __wcstoieee128_l;
+ }
new file mode 100644
@@ -0,0 +1,21 @@
+/* Definitions for strfromf128.
+
+ Copyright (C) 2018 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "../float128/strfromf128.c"
+
+libm_alias_float128_other_r_ldbl (strfrom, strfrom,);
new file mode 100644
@@ -0,0 +1,20 @@
+/* Definition of strtof128.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "../float128/strtof128.c"
+libm_alias_float128_other_r_ldbl (strto, strto,);
new file mode 100644
@@ -0,0 +1,20 @@
+/* Convert string representing a number to a _Float128 value, with locale.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "../float128/strtof128_l.c"
+libm_alias_float128_other_r_ldbl (strto, strto,_l);
new file mode 100644
@@ -0,0 +1,20 @@
+/* Wrapper for wcstof128.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "../float128/wcstof128.c"
+libm_alias_float128_other_r_ldbl (wcsto, wcsto,);
new file mode 100644
@@ -0,0 +1,20 @@
+/* Convert string representing a number to a _Float128 value, with locale.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "../float128/wcstof128_l.c"
+libm_alias_float128_other_r_ldbl (wcsto, wcsto,_l);