| 1 | /* Properties of long double type. |
| 2 | Copyright (C) 2016-2026 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 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 | /* This header is included by <sys/cdefs.h>. |
| 20 | |
| 21 | If long double is ABI-compatible with double, it should define |
| 22 | __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave |
| 23 | __NO_LONG_DOUBLE_MATH undefined. |
| 24 | |
| 25 | If this build of the GNU C Library supports both long double |
| 26 | ABI-compatible with double and some other long double format not |
| 27 | ABI-compatible with double, it should define |
| 28 | __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave |
| 29 | __LONG_DOUBLE_MATH_OPTIONAL undefined. |
| 30 | |
| 31 | If __NO_LONG_DOUBLE_MATH is already defined, this header must not |
| 32 | define anything; this is needed to work with the definition of |
| 33 | __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */ |
| 34 | |
| 35 | /* In the default version of this header, long double is |
| 36 | ABI-compatible with double. */ |
| 37 | #ifndef __NO_LONG_DOUBLE_MATH |
| 38 | # define __NO_LONG_DOUBLE_MATH	1 |
| 39 | #endif |
| 40 | |
| 41 | /* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the |
| 42 | choice of the underlying ABI of long double. It will always assume |
| 43 | a constant value for each translation unit. |
| 44 | |
| 45 | If the value is non-zero, any API which is parameterized by the long |
| 46 | double type (i.e the scanf/printf family of functions or the explicitly |
| 47 | parameterized math.h functions) will be redirected to a compatible |
| 48 | implementation using _Float128 ABI via symbols suffixed with ieee128. |
| 49 | |
| 50 | The mechanism this macro uses to acquire may be a function |
| 51 | of architecture, or target specific options used to invoke the |
| 52 | compiler. */ |
| 53 | #define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 |