about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat.c
Commit message (Collapse)AuthorAgeFilesLines
* ldbl-128ibm-compat: Add ISO C99 versions of scanf functionsGabriel F. T. Gomes2019-12-131-1/+2
| | | | | | | | | | | | | | | In the format string for *scanf functions, the '%as', '%aS', and '%a[]' modifiers behave differently depending on ISO C99 compatibility. When _GNU_SOURCE is defined and -std=c89 is passed to the compiler, these functions behave like ascanf, and the modifiers allocate memory for the output. Otherwise, the ISO C99 compliant version of these functions is used, and the modifiers consume a floating-point argument. This patch adds the IEEE binary128 variant of ISO C99 compliant functions for the third long double format on powerpc64le. Tested for powerpc64le. Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
* ldbl-128ibm-compat: Fix selection of GNU and ISO C99 scanfGabriel F. T. Gomes2019-12-131-0/+4
| | | | | | | | | | | | | | | | | | | | | Since commit commit 03992356e6fedc5a5e9d32df96c1a2c79ea28a8f Author: Zack Weinberg <zackw@panix.com> Date: Sat Feb 10 11:58:35 2018 -0500 Use C99-compliant scanf under _GNU_SOURCE with modern compilers. the selection of the GNU versions of scanf functions requires both _GNU_SOURCE and -std=c89. This patch changes the tests in ldbl-128ibm-compat so that they actually test the GNU versions (without this change, the redirection to the ISO C99 version always happens, so GNU versions of the new implementation (e.g. __scanfieee128) were left untested). Tested for powerpc64le. Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
* ldbl-128ibm-compat: Add regular character scanning functionsGabriel F. T. Gomes2019-11-221-0/+10
The 'mode' argument to __vfscanf_internal allows the selection of the long double format for all long double arguments requested by the format string. Currently, there are two possibilities: long double with the same format as double or long double as something else. The 'something else' format varies between architectures, and on powerpc64le, it means IBM Extended Precision format. In preparation for the third option of long double format on powerpc64le, this patch uses the new mode mask, SCANF_LDBL_USES_FLOAT128, which tells __vfscanf_internal to call __strtof128_internal, instead of __strtold_internal, and save the output into a _Float128 variable. Tested for powerpc64le. Reviewed-By: Paul E. Murphy <murphyp@linux.ibm.com>