mirror of
https://sourceware.org/git/glibc.git
synced 2025-11-30 11:41:39 +03:00
As discussed in bug 28327, the fromfp functions changed type in C23 (compared to the version in TS 18661-1); they now return the same type as the floating-point argument, instead of intmax_t / uintmax_t. As with other such incompatible changes compared to the initial TS 18661 versions of interfaces (the types of totalorder functions, in particular), it seems appropriate to support only the new version as an API, not the old one (although many programs written for the old API might in fact work wtih the new one as well). Thus, the existing implementations should become compat symbols. They are sufficiently different from how I'd expect to implement the new version that using separate implementations in separate files is more convenient than trying to share code, and directly sharing testcases would be problematic as well. Rename the existing fromfp implementation and test files to names reflecting how they're intended to become compat symbols, so freeing up the existing filenames for a subsequent implementation of the C23 versions of these functions (which is the point at which the existing implementations would actually become compat symbols). gen-fromfp-tests.py and gen-fromfp-tests-inputs are not renamed; I think it will make sense to adapt the test generator to be able to generate most tests for both versions of the functions (with extra test inputs added that are only of interest with the C23 version). The ldbl-opt/nldbl-* files are also not renamed; since those are for a static only library, no compat versions are needed, and they'll just have their contents changed when the C23 version is implemented. Tested for x86_64, and with build-many-glibcs.py.