* sysdeps/unix/sysv/linux/sparc/sparc32/nldbl-abi.h: New file.
[glibc.git] / sysdeps / ieee754 / ldbl-opt / math_ldbl_opt.h
blobd6f0214991e9c84fc411c0998a264820f3ed9ae2
1 /* -mlong-double-64 compatibility mode macros. */
3 #include <nldbl-abi.h>
4 #ifndef LONG_DOUBLE_COMPAT_VERSION
5 # error "nldbl-abi.h must define LONG_DOUBLE_COMPAT_VERSION"
6 #endif
8 #include <math.h>
9 #include <math/math_private.h>
10 #include <shlib-compat.h>
11 #define LONG_DOUBLE_COMPAT(lib, introduced) \
12 SHLIB_COMPAT(lib, introduced, LONG_DOUBLE_COMPAT_VERSION)
13 #define long_double_symbol(lib, local, symbol) \
14 long_double_symbol_1 (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION)
15 #if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
16 # define ldbl_hidden_def(local, name) libc_hidden_ver (local, name)
17 # define ldbl_strong_alias(name, aliasname) \
18 strong_alias (name, __GL_##name##_##aliasname) \
19 long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
20 # define ldbl_weak_alias(name, aliasname) \
21 weak_alias (name, __GL_##name##_##aliasname) \
22 long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
23 # define long_double_symbol_1(lib, local, symbol, version) \
24 versioned_symbol (lib, local, symbol, version)
25 #elif defined HAVE_WEAK_SYMBOLS
26 # define ldbl_hidden_def(local, name) libc_hidden_def (name)
27 # define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
28 # define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname)
29 /* Note that weak_alias cannot be used - it is defined to nothing
30 in most of the files. */
31 # define long_double_symbol_1(lib, local, symbol, version) \
32 _weak_alias (local, symbol)
33 #else
34 # define ldbl_hidden_def(local, name) libc_hidden_def (name)
35 # define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
36 # define ldbl_weak_alias(name, aliasname) strong_alias (name, aliasname)
37 # define long_double_symbol_1(lib, local, symbol, version) \
38 strong_alias (local, symbol)
39 #endif
41 /* Set temporarily to non-zero if long double should be considered
42 the same as double. */
43 extern __thread int __no_long_double attribute_tls_model_ie attribute_hidden;
44 #define __ldbl_is_dbl __builtin_expect (__no_long_double, 0)