]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/ieee754/ldbl-opt/libm-alias-double.h
Define and use libm_alias_double.
[thirdparty/glibc.git] / sysdeps / ieee754 / ldbl-opt / libm-alias-double.h
1 /* Define aliases for libm double functions. ldbl-opt version.
2 Copyright (C) 2017 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 <http://www.gnu.org/licenses/>. */
18
19 #ifndef _LIBM_ALIAS_DOUBLE_H
20 #define _LIBM_ALIAS_DOUBLE_H
21
22 #include <math_ldbl_opt.h>
23 #include <first-versions.h>
24 #include <ldbl-compat-choose.h>
25
26 /* Define aliases for a double libm function that has internal name
27 FROM ## R and public names TO ## suffix ## R for each suffix of a
28 supported floating-point type with the same format as double. This
29 should only be used for functions where such public names exist for
30 _FloatN types, not for implementation-namespace exported names
31 (where there is one name per format, not per type) or for
32 obsolescent functions not provided for _FloatN types. */
33 #define libm_alias_double_r(from, to, r) \
34 weak_alias (from ## r, to ## r) \
35 LONG_DOUBLE_COMPAT_CHOOSE_libm_ ## to ## l ## r \
36 (compat_symbol (libm, \
37 from ## r, \
38 to ## l ## r, \
39 FIRST_VERSION_libm_ ## to ## l ## r), );
40
41 /* Likewise, but without the R suffix. */
42 #define libm_alias_double(from, to) libm_alias_double_r (from, to, )
43
44 #endif