summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/sysdeps/linux/common/_exit.c6
-rw-r--r--libc/sysdeps/linux/common/ftruncate64.c12
-rw-r--r--libc/sysdeps/linux/common/llseek.c7
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise.c19
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise64.c34
-rw-r--r--libc/sysdeps/linux/common/sched_setaffinity.c6
-rw-r--r--libc/sysdeps/linux/common/sync.c6
-rw-r--r--libc/sysdeps/linux/common/truncate64.c12
8 files changed, 0 insertions, 102 deletions
diff --git a/libc/sysdeps/linux/common/_exit.c b/libc/sysdeps/linux/common/_exit.c
index 518a6d2e8..a8b3ffcb9 100644
--- a/libc/sysdeps/linux/common/_exit.c
+++ b/libc/sysdeps/linux/common/_exit.c
@@ -15,12 +15,6 @@
/* libc_hidden_proto(_exit) */
-#ifndef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) __syscall_exit (args)
-#define __NR___syscall_exit __NR_exit
-static __inline__ _syscall1(void, __syscall_exit, int, status)
-#endif
-
void attribute_noreturn _exit(int status)
{
/* The loop is added only to keep gcc happy. */
diff --git a/libc/sysdeps/linux/common/ftruncate64.c b/libc/sysdeps/linux/common/ftruncate64.c
index 132789144..4d00b0294 100644
--- a/libc/sysdeps/linux/common/ftruncate64.c
+++ b/libc/sysdeps/linux/common/ftruncate64.c
@@ -32,18 +32,6 @@ _syscall2(int, ftruncate64, int, fd, __off64_t, length)
# elif __WORDSIZE == 32
-# ifndef INLINE_SYSCALL
-# define INLINE_SYSCALL(name, nr, args...) __syscall_ftruncate64 (args)
-# define __NR___syscall_ftruncate64 __NR_ftruncate64
-# if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
-static __inline__ _syscall4(int, __syscall_ftruncate64, int, fd, uint32_t, pad,
- unsigned long, high_length, unsigned long, low_length)
-# else
-static __inline__ _syscall3(int, __syscall_ftruncate64, int, fd,
- unsigned long, high_length, unsigned long, low_length)
-# endif
-# endif
-
/* The exported ftruncate64 function. */
int ftruncate64 (int fd, __off64_t length)
{
diff --git a/libc/sysdeps/linux/common/llseek.c b/libc/sysdeps/linux/common/llseek.c
index 29582f768..cd150ad9f 100644
--- a/libc/sysdeps/linux/common/llseek.c
+++ b/libc/sysdeps/linux/common/llseek.c
@@ -13,13 +13,6 @@
#if defined __NR__llseek && defined __UCLIBC_HAS_LFS__
-# ifndef INLINE_SYSCALL
-# define INLINE_SYSCALL(name, nr, args...) __syscall_llseek (args)
-# define __NR___syscall_llseek __NR__llseek
-static __inline__ _syscall5(int, __syscall_llseek, int, fd, off_t, offset_hi,
- off_t, offset_lo, loff_t *, result, int, whence)
-# endif
-
loff_t lseek64(int fd, loff_t offset, int whence)
{
loff_t result;
diff --git a/libc/sysdeps/linux/common/posix_fadvise.c b/libc/sysdeps/linux/common/posix_fadvise.c
index c00b79e6c..4fee8e49e 100644
--- a/libc/sysdeps/linux/common/posix_fadvise.c
+++ b/libc/sysdeps/linux/common/posix_fadvise.c
@@ -13,10 +13,6 @@
#ifdef __NR_fadvise64
#define __NR_posix_fadvise __NR_fadvise64
-/* get rid of following conditional when
- all supported arches are having INTERNAL_SYSCALL defined
-*/
-#ifdef INTERNAL_SYSCALL
int posix_fadvise(int fd, off_t offset, off_t len, int advice)
{
INTERNAL_SYSCALL_DECL(err);
@@ -26,21 +22,6 @@ int posix_fadvise(int fd, off_t offset, off_t len, int advice)
return INTERNAL_SYSCALL_ERRNO (ret, err);
return 0;
}
-#else
-static __inline__ int syscall_posix_fadvise(int fd, off_t offset1, off_t offset2, off_t len, int advice);
-#define __NR_syscall_posix_fadvise __NR_fadvise64
-_syscall5(int, syscall_posix_fadvise, int, fd, off_t, offset1,
- off_t, offset2, off_t, len, int, advice)
-
-int posix_fadvise(int fd, off_t offset, off_t len, int advice)
-{
- int ret = syscall_posix_fadvise(fd, __LONG_LONG_PAIR (offset >> 31, offset), len, advice);
- if (ret == -1)
- return errno;
- return ret;
-}
-
-#endif
#if defined __UCLIBC_HAS_LFS__ && (!defined __NR_fadvise64_64 || !defined _syscall6)
strong_alias(posix_fadvise,posix_fadvise64)
diff --git a/libc/sysdeps/linux/common/posix_fadvise64.c b/libc/sysdeps/linux/common/posix_fadvise64.c
index 6b1325db3..b53e64321 100644
--- a/libc/sysdeps/linux/common/posix_fadvise64.c
+++ b/libc/sysdeps/linux/common/posix_fadvise64.c
@@ -25,7 +25,6 @@
#define __NR_posix_fadvise64 __NR_fadvise64_64
-#if defined INTERNAL_SYSCALL && ! defined __TARGET_powerpc__
int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
{
if (len != (off_t) len)
@@ -39,24 +38,10 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
return 0;
return INTERNAL_SYSCALL_ERRNO (ret, err);
}
-#else
-static __inline__ int syscall_posix_fadvise(int fd, off_t offset1, off_t offset2, off_t len, int advice);
-#define __NR_syscall_posix_fadvise64 __NR_posix_fadvise64
-_syscall4(int, syscall_posix_fadvise64, int, fd, __off64_t, offset,
- __off64_t, len, int, advice)
-int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
-{
- int ret = syscall_posix_fadvise64(fd, offset, len, advice);
- if (ret == -1)
- return errno;
- return ret;
-}
-#endif
/* 32 bit implementation is kind of a pita */
#elif __WORDSIZE == 32
-#if defined INTERNAL_SYSCALL && ! defined __TARGET_powerpc__
int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
{
INTERNAL_SYSCALL_DECL (err);
@@ -68,25 +53,6 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
return 0;
return INTERNAL_SYSCALL_ERRNO (ret, err);
}
-#elif defined _syscall6 /* workaround until everyone has _syscall6() */
-#define __NR___syscall_fadvise64_64 __NR_fadvise64_64
-static __inline__ _syscall6(int, __syscall_fadvise64_64, int, fd,
- unsigned long, high_offset, unsigned long, low_offset,
- unsigned long, high_len, unsigned long, low_len,
- int, advice)
-int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
-{
- int ret = __syscall_fadvise64_64(fd,
- __LONG_LONG_PAIR(offset >> 32, offset & 0xffffffff),
- __LONG_LONG_PAIR(len >> 32, len & 0xffffffff),
- advice);
- if (ret == -1)
- return errno;
- return ret;
-}
-#else
-#warning neither INTERNAL_SYSCALL nor _syscall6 has been defined for your machine :(
-#endif /* INTERNAL_SYSCALL */
#else
#error your machine is neither 32 bit or 64 bit ... it must be magical
diff --git a/libc/sysdeps/linux/common/sched_setaffinity.c b/libc/sysdeps/linux/common/sched_setaffinity.c
index aec032eab..6705d0c68 100644
--- a/libc/sysdeps/linux/common/sched_setaffinity.c
+++ b/libc/sysdeps/linux/common/sched_setaffinity.c
@@ -22,9 +22,6 @@
#include <sched.h>
#include <sys/types.h>
#include <sys/syscall.h>
-
-#ifdef INTERNAL_SYSCALL /* remove this when all archs has this #defined */
-
#include <string.h>
#include <unistd.h>
#include <sys/param.h>
@@ -77,9 +74,6 @@ int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
#else
#define ___HAVE_NO_sched_setaffinity
#endif
-#else
-#define ___HAVE_NO_sched_setaffinity
-#endif
#if defined ___HAVE_NO_sched_setaffinity && defined __UCLIBC_HAS_STUBS__
int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
diff --git a/libc/sysdeps/linux/common/sync.c b/libc/sysdeps/linux/common/sync.c
index e663c5886..126f40dd8 100644
--- a/libc/sysdeps/linux/common/sync.c
+++ b/libc/sysdeps/linux/common/sync.c
@@ -12,12 +12,6 @@
#include <sys/types.h>
#include <unistd.h>
-#ifndef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) __syscall_sync (args)
-#define __NR___syscall_sync __NR_sync
-static __inline__ _syscall0(void, __syscall_sync)
-#endif
-
void sync(void)
{
INLINE_SYSCALL(sync, 0);
diff --git a/libc/sysdeps/linux/common/truncate64.c b/libc/sysdeps/linux/common/truncate64.c
index d542679ce..73f652942 100644
--- a/libc/sysdeps/linux/common/truncate64.c
+++ b/libc/sysdeps/linux/common/truncate64.c
@@ -29,18 +29,6 @@ _syscall2(int, truncate64, const char *, path, __off64_t, length)
#elif __WORDSIZE == 32
-#ifndef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) __syscall_truncate64(args)
-#define __NR___syscall_truncate64 __NR_truncate64
-#if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
-static __inline__ _syscall4(int, __syscall_truncate64, const char *, path,
- uint32_t, pad, unsigned long, high_length, unsigned long, low_length)
-#else
-static __inline__ _syscall3(int, __syscall_truncate64, const char *, path,
- unsigned long, high_length, unsigned long, low_length)
-#endif
-#endif
-
/* The exported truncate64 function. */
int truncate64(const char * path, __off64_t length)
{