From 6c4538905e65ceb203f59aaa9a61728e81c6bc0a Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 18 Mar 2015 22:32:22 +0100 Subject: libm: Add missing C99 float/ld wrappers Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/bits/mathcalls.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h index 84b793c96..9bebb5190 100644 --- a/libc/sysdeps/linux/common/bits/mathcalls.h +++ b/libc/sysdeps/linux/common/bits/mathcalls.h @@ -74,8 +74,22 @@ __MATHCALLI (atan2,, (_Mdouble_ __y, _Mdouble_ __x)) /* Cosine of X. */ __MATHCALLI (cos,, (_Mdouble_ __x)) +# if defined _LIBC && defined _Mlong_double_ +libm_hidden_proto(cosl) +# endif +# if defined _LIBC && defined _Mfloat_ +libm_hidden_proto(cosf) +# endif + /* Sine of X. */ __MATHCALLI (sin,, (_Mdouble_ __x)) +# if defined _LIBC && defined _Mlong_double_ +libm_hidden_proto(sinl) +# endif +# if defined _LIBC && defined _Mfloat_ +libm_hidden_proto(sinf) +# endif + /* Tangent of X. */ __MATHCALLI (tan,, (_Mdouble_ __x)) @@ -111,6 +125,9 @@ __END_NAMESPACE_C99 _Mdouble_BEGIN_NAMESPACE /* Exponential function of X. */ __MATHCALLI (exp,, (_Mdouble_ __x)) +# if defined _LIBC && defined _Mlong_double_ +libm_hidden_proto(expl) +# endif /* Break VALUE into a normalized fraction and an integral power of 2. */ __MATHCALLI (frexp,, (_Mdouble_ __x, int *__exponent)) @@ -173,6 +190,9 @@ _Mdouble_END_NAMESPACE __BEGIN_NAMESPACE_C99 /* Return `sqrt(X*X + Y*Y)'. */ __MATHCALLI (hypot,, (_Mdouble_ __x, _Mdouble_ __y)) +# if defined _LIBC && defined _Mlong_double_ +libm_hidden_proto(hypotl) +# endif __END_NAMESPACE_C99 #endif @@ -298,6 +318,9 @@ __MATHCALLI (rint,, (_Mdouble_ __x)) /* Return X + epsilon if X < Y, X - epsilon if X > Y. */ __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)) +# if defined _LIBC && defined _Mlong_double_ +libm_hidden_proto(nextafterl) +# endif # if defined __USE_ISOC99 && !defined __LDBL_COMPAT __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)) # endif -- cgit v1.2.3 From 09ff424905d5de0b2a21a3960d9756a90b07ba26 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 22 Mar 2015 14:47:29 +0100 Subject: libc: add getrandom(2) Introduce a for it. /* FIXME: aren't there a couple of __restrict and const missing ? */ extern int getrandom(void *__buf, size_t count, unsigned int flags) __nonnull ((1)) __wur; Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/bits/kernel-features.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h index 6184c2b9d..708bb4906 100644 --- a/libc/sysdeps/linux/common/bits/kernel-features.h +++ b/libc/sysdeps/linux/common/bits/kernel-features.h @@ -507,3 +507,8 @@ #if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100 # define __ASSUME_GETCPU_SYSCALL 1 #endif + +/* getrandom syscall (widely) appeared around 4.0.0 */ +#if __LINUX_KERNEL_VERSION >= 0x040000 +# define __ASSUME_GETRANDOM_SYSCALL 1 +#endif -- cgit v1.2.3 From eee76e42f32f90af4e64a254810fcb767297fecf Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 24 Mar 2015 00:11:15 +0100 Subject: libc: TIME64_COMPAT32 for sparc, mips Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/bits/utmp.h | 4 ++-- libc/sysdeps/linux/common/bits/utmpx.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/utmp.h b/libc/sysdeps/linux/common/bits/utmp.h index c13380ab8..6ece31e34 100644 --- a/libc/sysdeps/linux/common/bits/utmp.h +++ b/libc/sysdeps/linux/common/bits/utmp.h @@ -36,7 +36,7 @@ previous logins. */ struct lastlog { -#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32 +#ifdef __WORDSIZE_TIME64_COMPAT32 int32_t ll_time; #else __time_t ll_time; @@ -69,7 +69,7 @@ struct utmp /* The ut_session and ut_tv fields must be the same size when compiled 32- and 64-bit. This allows data files and shared memory to be shared between 32- and 64-bit applications. */ -#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32 +#ifdef __WORDSIZE_TIME64_COMPAT32 int32_t ut_session; /* Session ID, used for windowing. */ struct { diff --git a/libc/sysdeps/linux/common/bits/utmpx.h b/libc/sysdeps/linux/common/bits/utmpx.h index 87626f085..815fc90b8 100644 --- a/libc/sysdeps/linux/common/bits/utmpx.h +++ b/libc/sysdeps/linux/common/bits/utmpx.h @@ -66,7 +66,7 @@ struct utmpx /* The fields ut_session and ut_tv must be the same size when compiled 32- and 64-bit. This allows files and shared memory to be shared between 32- and 64-bit applications. */ -#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32 +#ifdef __WORDSIZE_TIME64_COMPAT32 __int32_t ut_session; /* Session ID, used for windowing. */ struct { -- cgit v1.2.3