1 /* -mlong-double-64 compatibility mode macros.  */
2 
3 #include <nldbl-abi.h>
4 #ifndef LONG_DOUBLE_COMPAT_VERSION
5 # error "nldbl-abi.h must define LONG_DOUBLE_COMPAT_VERSION"
6 #endif
7 
8 #include <shlib-compat.h>
9 #define LONG_DOUBLE_COMPAT(lib, introduced) \
10   SHLIB_COMPAT(lib, introduced, LONG_DOUBLE_COMPAT_VERSION)
11 #define long_double_symbol(lib, local, symbol) \
12   long_double_symbol_1 (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION)
13 #ifdef SHARED
14 # define ldbl_hidden_def(local, name) libc_hidden_ver (local, name)
15 # define ldbl_strong_alias(name, aliasname) \
16   strong_alias (name, __GL_##name##_##aliasname) \
17   long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
18 # define ldbl_weak_alias(name, aliasname) \
19   weak_alias (name, __GL_##name##_##aliasname) \
20   long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
21 # define long_double_symbol_1(lib, local, symbol, version) \
22   versioned_symbol (lib, local, symbol, version)
23 # define ldbl_compat_symbol(lib, local, symbol, version) \
24   compat_symbol (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION)
25 #else
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 /* Same as compat_symbol, ldbl_compat_symbol is not to be used outside
30    '#if SHLIB_COMPAT' statement and should fail if it is.  */
31 # define ldbl_compat_symbol(lib, local, symbol, version) \
32   _Static_assert (0, "ldbl_compat_symbol should be used inside SHLIB_COMPAT");
33 # ifndef __ASSEMBLER__
34 /* Note that weak_alias cannot be used - it is defined to nothing
35    in most of the C files.  */
36 #  define long_double_symbol_1(lib, local, symbol, version) \
37   _weak_alias (local, symbol)
38 # else
39 #  define long_double_symbol_1(lib, local, symbol, version) \
40   weak_alias (local, symbol)
41 # endif
42 #endif
43