summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/_exit.c1
-rw-r--r--libc/sysdeps/linux/common/bits/mathcalls.h2
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_ctype.h2
-rw-r--r--libc/sysdeps/linux/common/futimens.c23
-rw-r--r--libc/sysdeps/linux/common/ppoll.c5
-rw-r--r--libc/sysdeps/linux/common/utimensat.c2
6 files changed, 32 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/common/_exit.c b/libc/sysdeps/linux/common/_exit.c
index a36927d0c..51117d109 100644
--- a/libc/sysdeps/linux/common/_exit.c
+++ b/libc/sysdeps/linux/common/_exit.c
@@ -31,3 +31,4 @@ void attribute_noreturn _exit(int status)
}
}
libc_hidden_def(_exit)
+weak_alias(_exit,_Exit)
diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h
index 811738238..df2e21cc8 100644
--- a/libc/sysdeps/linux/common/bits/mathcalls.h
+++ b/libc/sysdeps/linux/common/bits/mathcalls.h
@@ -244,6 +244,7 @@ __END_NAMESPACE_C99
/* Return nonzero if VALUE is not a number. */
__MATHDECL_PRIV (int,isnan,, (_Mdouble_ __value), (__const__))
+# ifdef __DO_XSI_MATH__
/* Bessel functions. */
__MATHCALL (j0,, (_Mdouble_))
__MATHCALL (j1,, (_Mdouble_))
@@ -251,6 +252,7 @@ __MATHCALL (jn,, (int, _Mdouble_))
__MATHCALL (y0,, (_Mdouble_))
__MATHCALL (y1,, (_Mdouble_))
__MATHCALL (yn,, (int, _Mdouble_))
+# endif
#endif
diff --git a/libc/sysdeps/linux/common/bits/uClibc_ctype.h b/libc/sysdeps/linux/common/bits/uClibc_ctype.h
index 43371286b..22d2df03a 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_ctype.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_ctype.h
@@ -103,12 +103,14 @@ __BEGIN_DECLS
/* Now some non-ansi/iso c99 macros. */
+#ifndef __UCLIBC_SUSV4_LEGACY__
#define __isascii(c) (((c) & ~0x7f) == 0)
#define __toascii(c) ((c) & 0x7f)
/* Works correctly *only* on lowercase letters! */
#define _toupper(c) ((c) ^ 0x20)
/* Works correctly *only* on letters (of any case) and numbers */
#define _tolower(c) ((c) | 0x20)
+#endif
__END_DECLS
diff --git a/libc/sysdeps/linux/common/futimens.c b/libc/sysdeps/linux/common/futimens.c
new file mode 100644
index 000000000..090dfa69c
--- /dev/null
+++ b/libc/sysdeps/linux/common/futimens.c
@@ -0,0 +1,23 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * futimens() implementation for uClibc
+ *
+ * Copyright (C) 2009 Bernhard Reutner-Fischer <uclibc@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <sys/syscall.h>
+#define __need_timespec
+#include <time.h>
+#ifdef __NR_utimensat
+extern int utimensat (int __fd, __const char *__path,
+ __const struct timespec __times[2],
+ int __flags) __THROW;
+libc_hidden_proto(utimensat)
+
+int futimens (int fd, __const struct timespec ts[2])
+{
+ return utimensat(fd, 0, ts, 0);
+}
+#endif
diff --git a/libc/sysdeps/linux/common/ppoll.c b/libc/sysdeps/linux/common/ppoll.c
index c9efe8d08..02c8013a5 100644
--- a/libc/sysdeps/linux/common/ppoll.c
+++ b/libc/sysdeps/linux/common/ppoll.c
@@ -20,10 +20,10 @@
#include <signal.h>
#include <sys/syscall.h>
#include <sys/poll.h>
+#define __need_NULL
+#include <stddef.h>
#if defined __NR_ppoll && defined __UCLIBC_LINUX_SPECIFIC__
-
-
int
ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
const sigset_t *sigmask)
@@ -39,5 +39,4 @@ ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
return INLINE_SYSCALL(ppoll, 5, fds, nfds, timeout, sigmask, _NSIG / 8);
}
libc_hidden_def(ppoll)
-
#endif
diff --git a/libc/sysdeps/linux/common/utimensat.c b/libc/sysdeps/linux/common/utimensat.c
index 3c5af8586..2cfb8247d 100644
--- a/libc/sysdeps/linux/common/utimensat.c
+++ b/libc/sysdeps/linux/common/utimensat.c
@@ -11,6 +11,8 @@
#ifdef __NR_utimensat
_syscall4(int, utimensat, int, fd, const char *, path, const struct timespec *, times, int, flags)
+libc_hidden_def(utimensat)
#else
/* should add emulation with utimens() and /proc/self/fd/ ... */
#endif
+