| 1 | /* Define aliases for libm long double functions. | 
|---|
| 2 | Copyright (C) 2017-2020 Free Software Foundation, Inc. | 
|---|
| 3 | This file is part of the GNU C Library. | 
|---|
| 4 |  | 
|---|
| 5 | The GNU C Library is free software; you can redistribute it and/or | 
|---|
| 6 | modify it under the terms of the GNU Lesser General Public | 
|---|
| 7 | License as published by the Free Software Foundation; either | 
|---|
| 8 | version 2.1 of the License, or (at your option) any later version. | 
|---|
| 9 |  | 
|---|
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 
|---|
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
|---|
| 13 | Lesser General Public License for more details. | 
|---|
| 14 |  | 
|---|
| 15 | You should have received a copy of the GNU Lesser General Public | 
|---|
| 16 | License along with the GNU C Library; if not, see | 
|---|
| 17 | <https://www.gnu.org/licenses/>.  */ | 
|---|
| 18 |  | 
|---|
| 19 | #ifndef _LIBM_ALIAS_LDOUBLE_H | 
|---|
| 20 | #define _LIBM_ALIAS_LDOUBLE_H | 
|---|
| 21 |  | 
|---|
| 22 | #include <bits/floatn.h> | 
|---|
| 23 |  | 
|---|
| 24 | #if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128 | 
|---|
| 25 | # define libm_alias_ldouble_other_r_f128(from, to, r)	\ | 
|---|
| 26 | weak_alias (from ## l ## r, to ## f128 ## r) | 
|---|
| 27 | #else | 
|---|
| 28 | # define libm_alias_ldouble_other_r_f128(from, to, r) | 
|---|
| 29 | #endif | 
|---|
| 30 |  | 
|---|
| 31 | #if __HAVE_FLOAT64X_LONG_DOUBLE | 
|---|
| 32 | # define libm_alias_ldouble_other_r_f64x(from, to, r)	\ | 
|---|
| 33 | weak_alias (from ## l ## r, to ## f64x ## r) | 
|---|
| 34 | #else | 
|---|
| 35 | # define libm_alias_ldouble_other_r_f64x(from, to, r) | 
|---|
| 36 | #endif | 
|---|
| 37 |  | 
|---|
| 38 | /* Define _FloatN / _FloatNx aliases for a long double libm function | 
|---|
| 39 | that has internal name FROM ## l ## R and public names TO ## suffix | 
|---|
| 40 | ## R for each suffix of a supported _FloatN / _FloatNx | 
|---|
| 41 | floating-point type with the same format as long double.  */ | 
|---|
| 42 | #define libm_alias_ldouble_other_r(from, to, r)		\ | 
|---|
| 43 | libm_alias_ldouble_other_r_f128 (from, to, r);	\ | 
|---|
| 44 | libm_alias_ldouble_other_r_f64x (from, to, r) | 
|---|
| 45 |  | 
|---|
| 46 | /* Likewise, but without the R suffix.  */ | 
|---|
| 47 | #define libm_alias_ldouble_other(from, to)	\ | 
|---|
| 48 | libm_alias_ldouble_other_r (from, to, ) | 
|---|
| 49 |  | 
|---|
| 50 | /* Define aliases for a long double libm function that has internal | 
|---|
| 51 | name FROM ## l ## R and public names TO ## suffix ## R for each | 
|---|
| 52 | suffix of a supported floating-point type with the same format as | 
|---|
| 53 | long double.  This should only be used for functions where such | 
|---|
| 54 | public names exist for _FloatN types, not for | 
|---|
| 55 | implementation-namespace exported names (where there is one name | 
|---|
| 56 | per format, not per type) or for obsolescent functions not provided | 
|---|
| 57 | for _FloatN types.  */ | 
|---|
| 58 | #define libm_alias_ldouble_r(from, to, r)	\ | 
|---|
| 59 | weak_alias (from ## l ## r, to ## l ## r);	\ | 
|---|
| 60 | libm_alias_ldouble_other_r (from, to, r) | 
|---|
| 61 |  | 
|---|
| 62 | /* Likewise, but without the R suffix.  */ | 
|---|
| 63 | #define libm_alias_ldouble(from, to) libm_alias_ldouble_r (from, to, ) | 
|---|
| 64 |  | 
|---|
| 65 | #endif | 
|---|
| 66 |  | 
|---|