@@ -672,5 +672,6 @@ libm {
tanpif64x; tanpif128;
# No SVID compatible error handling.
log10f;
+ lgammaf; lgammaf_r;
}
}
@@ -34,10 +34,17 @@
old glibc.
Users of this file define USE_AS_COMPAT to 0 when building the main
- version of lgamma, 1 when building the compatibility version. */
+ version of lgamma, 1 when building the compatibility version that
+ handles signgam visibility, and 2 when building the compatibility
+ that handles SVID support). */
+#if USE_AS_COMPAT <= 1
#define LGAMMA_OLD_VER GLIBC_2_0
#define LGAMMA_NEW_VER GLIBC_2_23
+#elif USE_AS_COMPAT == 2
+#define LGAMMA_OLD_VER GLIBC_2_23
+#define LGAMMA_NEW_VER GLIBC_2_41
+#endif
#define HAVE_LGAMMA_COMPAT SHLIB_COMPAT (libm, LGAMMA_OLD_VER, LGAMMA_NEW_VER)
/* Whether to build this version at all. */
@@ -45,8 +52,10 @@
(LIBM_SVID_COMPAT && (HAVE_LGAMMA_COMPAT || !USE_AS_COMPAT))
/* The name to use for this version. */
-#if USE_AS_COMPAT
+#if USE_AS_COMPAT == 1
# define LGFUNC(FUNC) FUNC ## _compat
+#elif USE_AS_COMPAT == 2
+# define LGFUNC(FUNC) FUNC ## _compat2
#else
# define LGFUNC(FUNC) FUNC
#endif
@@ -54,7 +63,7 @@
/* If there is a compatibility version, gamma (not an ISO C function,
so never a problem for it to set signgam) points directly to it
rather than having separate versions. */
-#define GAMMA_ALIAS (USE_AS_COMPAT ? HAVE_LGAMMA_COMPAT : !HAVE_LGAMMA_COMPAT)
+#define GAMMA_ALIAS (USE_AS_COMPAT == 1 ? HAVE_LGAMMA_COMPAT : !HAVE_LGAMMA_COMPAT)
/* How to call the underlying lgamma_r function. */
#define CALL_LGAMMA(TYPE, FUNC, ARG) \
@@ -1,2 +1,2 @@
-#define USE_AS_COMPAT 0
+#define USE_AS_COMPAT 2
#include <w_lgammaf_main.c>
@@ -33,12 +33,7 @@ LGFUNC (__lgammaf) (float x)
return y;
}
-# if USE_AS_COMPAT
-compat_symbol (libm, __lgammaf_compat, lgammaf, LGAMMA_OLD_VER);
-# else
-versioned_symbol (libm, __lgammaf, lgammaf, LGAMMA_NEW_VER);
-libm_alias_float_other (__lgamma, lgamma)
-# endif
+compat_symbol (libm, LGFUNC (__lgammaf), lgammaf, LGAMMA_OLD_VER);
# if GAMMA_ALIAS
strong_alias (LGFUNC (__lgammaf), __gammaf)
weak_alias (__gammaf, gammaf)
@@ -36,6 +36,8 @@ SOFTWARE.
#include <math.h>
#include <libm-alias-finite.h>
#include <limits.h>
+#include <libm-alias-float.h>
+#include <math-svid-compat.h>
#include <math-narrow-eval.h>
#include "math_config.h"
@@ -108,7 +110,7 @@ as_ln (double x)
}
float
-__ieee754_lgammaf_r (float x, int *signgamp)
+__lgamma_rf (float x, int *signgamp)
{
static const struct
{
@@ -363,4 +365,10 @@ __ieee754_lgammaf_r (float x, int *signgamp)
}
return r;
}
-libm_alias_finite (__ieee754_lgammaf_r, __lgammaf_r)
+strong_alias (__lgamma_rf, __ieee754_lgammaf_r)
+libm_alias_finite (__lgamma_rf, __lgammaf_r)
+#if LIBM_SVID_COMPAT
+versioned_symbol (libm, __lgamma_rf, lgammaf_r, GLIBC_2_41);
+#else
+libm_alias_float (__lgamma_r, lgamma_r)
+#endif
new file mode 100644
@@ -0,0 +1,17 @@
+#include <math-svid-compat.h>
+#include <math.h>
+#include <libm-alias-float.h>
+
+float
+__lgammaf (float x)
+{
+ return __lgammaf_r (x, &__signgam);
+}
+#if LIBM_SVID_COMPAT
+versioned_symbol (libm, __lgammaf, lgammaf, GLIBC_2_41);
+libm_alias_float_other (__lgamma, lgamma)
+#else
+libm_alias_float (__lgamma, lgamma)
+strong_alias (__lgammaf, __gammaf)
+weak_alias (__gammaf, gammaf)
+#endif
@@ -1261,6 +1261,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1229,6 +1229,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1388,6 +1388,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -908,6 +908,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -908,6 +908,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -908,6 +908,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1268,6 +1268,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -908,6 +908,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -944,6 +944,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
GLIBC_2.41 sinpif32 F
@@ -908,6 +908,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -908,6 +908,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -908,6 +908,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1229,6 +1229,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1055,6 +1055,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1054,6 +1054,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1048,6 +1048,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1413,6 +1413,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1332,6 +1332,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1332,6 +1332,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -908,6 +908,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -908,6 +908,8 @@ GLIBC_2.41 cospif32 F
GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1339,6 +1339,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1229,6 +1229,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1262,6 +1262,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F
@@ -1262,6 +1262,8 @@ GLIBC_2.41 cospif32x F
GLIBC_2.41 cospif64 F
GLIBC_2.41 cospif64x F
GLIBC_2.41 cospil F
+GLIBC_2.41 lgammaf F
+GLIBC_2.41 lgammaf_r F
GLIBC_2.41 log10f F
GLIBC_2.41 sinpi F
GLIBC_2.41 sinpif F