Back to index

glibc  2.9
math_ldbl_opt.h
Go to the documentation of this file.
00001 /* -mlong-double-64 compatibility mode macros.  */
00002 
00003 #include <nldbl-abi.h>
00004 #ifndef LONG_DOUBLE_COMPAT_VERSION
00005 # error "nldbl-abi.h must define LONG_DOUBLE_COMPAT_VERSION"
00006 #endif
00007 
00008 #include <shlib-compat.h>
00009 #define LONG_DOUBLE_COMPAT(lib, introduced) \
00010   SHLIB_COMPAT(lib, introduced, LONG_DOUBLE_COMPAT_VERSION)
00011 #define long_double_symbol(lib, local, symbol) \
00012   long_double_symbol_1 (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION)
00013 #if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
00014 # define ldbl_hidden_def(local, name) libc_hidden_ver (local, name)
00015 # define ldbl_strong_alias(name, aliasname) \
00016   strong_alias (name, __GL_##name##_##aliasname) \
00017   long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
00018 # define ldbl_weak_alias(name, aliasname) \
00019   weak_alias (name, __GL_##name##_##aliasname) \
00020   long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
00021 # define long_double_symbol_1(lib, local, symbol, version) \
00022   versioned_symbol (lib, local, symbol, version)
00023 #elif defined HAVE_WEAK_SYMBOLS
00024 # define ldbl_hidden_def(local, name) libc_hidden_def (name)
00025 # define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
00026 # define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname)
00027 # ifndef __ASSEMBLER__
00028 /* Note that weak_alias cannot be used - it is defined to nothing
00029    in most of the C files.  */
00030 #  define long_double_symbol_1(lib, local, symbol, version) \
00031   _weak_alias (local, symbol)
00032 # else
00033 #  define long_double_symbol_1(lib, local, symbol, version) \
00034   weak_alias (local, symbol)
00035 # endif
00036 #else
00037 # define ldbl_hidden_def(local, name) libc_hidden_def (name)
00038 # define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
00039 # define ldbl_weak_alias(name, aliasname) strong_alias (name, aliasname)
00040 # define long_double_symbol_1(lib, local, symbol, version) \
00041   strong_alias (local, symbol)
00042 #endif
00043 
00044 #ifndef __ASSEMBLER__
00045 # include <math.h>
00046 # include <math/math_private.h>
00047 
00048 /* Set temporarily to non-zero if long double should be considered
00049    the same as double.  */
00050 extern __thread int __no_long_double attribute_tls_model_ie attribute_hidden;
00051 # define __ldbl_is_dbl __builtin_expect (__no_long_double, 0)
00052 #endif