mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 11:20:07 +00:00
45f39d4588
The implementations are contained with sysdeps/ieee754/float128 as they are only built when _Float128 is enabled within libc/m. * include/gmp.h (__mpn_construct_float128): New declaration. * include/stdlib.h: Include bits/floatn.h for _Float128 tests. (__strtof128_l): New declaration. (__strtof128_nan): Likewise. (__wcstof128_nan): Likewise. (__strtof128_internal): Likewise. (____strtof128_l_internal): Likewise. * include/wchar.h: Include bits/floatn.h for _Float128 tests. (__wcstof128_l): New declaration. (__wcstof128_internal): Likewise. * stdlib/Makefile (bug-strtod2): Link libm too. * stdlib/stdlib.h (strtof128): New declaration. (strtof128_l): Likewise. * stdlib/tst-strtod-nan-locale-main.c: Updated to use tst-strtod.h macros to ensure float128 gets tested too. * stdlib/tst-strtod-round-skeleton.c (CHOOSE_f128): New macro. * stdlib/tst-strtod.h: Include bits/floatn.h for _Float128 tests. (IF_FLOAT128): New macro. (GEN_TEST_STRTOD): Update to optionally include _Float128 in the tests. (STRTOD_TEST_FOREACH): Likewise. * sysdeps/ieee754/float128/Makefile: Insert new strtof128 and wcstof128 functions into libc. * sysdeps/ieee754/float128/Versions: Add exports for the above new functions. * sysdeps/ieee754/float128/mpn2float128.c: New file. * sysdeps/ieee754/float128/strtod_nan_float128.h: New file. * sysdeps/ieee754/float128/strtof128.c: New file. * sysdeps/ieee754/float128/strtof128_l.c: New file. * sysdeps/ieee754/float128/strtof128_nan.c: New file. * sysdeps/ieee754/float128/wcstof128.c: New file. * sysdeps/ieee754/float128/wcstof128_l.c: New file. * sysdeps/ieee754/float128/wcstof128_nan.c: New fike. * wcsmbs/Makefile: (CFLAGS-wcstof128.c): Append strtox-CFLAGS. (CFLAGS-wcstof128_l): Likewise. * wcsmbs/wchar.h: Include bits/floatn.h for _Float128 tests. (wcstof128): New declaration. (wcstof128_l): Likewise.
40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
/* Include gmp-mparam.h first, such that definitions of _SHORT_LIMB
|
|
and _LONG_LONG_LIMB in it can take effect into gmp.h. */
|
|
#include <gmp-mparam.h>
|
|
|
|
#ifndef __GMP_H__
|
|
|
|
#include <stdlib/gmp.h>
|
|
|
|
#include <bits/floatn.h>
|
|
|
|
/* Now define the internal interfaces. */
|
|
extern mp_size_t __mpn_extract_double (mp_ptr res_ptr, mp_size_t size,
|
|
int *expt, int *is_neg,
|
|
double value);
|
|
|
|
extern mp_size_t __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
|
|
int *expt, int *is_neg,
|
|
long double value);
|
|
|
|
#if __HAVE_DISTINCT_FLOAT128
|
|
extern mp_size_t __mpn_extract_float128 (mp_ptr res_ptr, mp_size_t size,
|
|
int *expt, int *is_neg,
|
|
_Float128 value);
|
|
#endif
|
|
|
|
extern float __mpn_construct_float (mp_srcptr frac_ptr, int expt, int sign);
|
|
|
|
extern double __mpn_construct_double (mp_srcptr frac_ptr, int expt,
|
|
int negative);
|
|
|
|
extern long double __mpn_construct_long_double (mp_srcptr frac_ptr, int expt,
|
|
int sign);
|
|
|
|
#if __HAVE_DISTINCT_FLOAT128
|
|
extern _Float128 __mpn_construct_float128 (mp_srcptr frac_ptr, int expt,
|
|
int sign);
|
|
#endif
|
|
|
|
#endif
|