diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/chown.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/ftruncate64.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/ioctl.c | 9 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list | 41 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/pread.c | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/pread64.c | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/pwrite.c | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/pwrite64.c | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/tcgetattr.c | 21 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/tcsetattr.c | 21 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/truncate64.c | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/pwrite.c | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/pwrite64.c | 2 |
13 files changed, 91 insertions, 68 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/chown.c b/sysdeps/unix/sysv/linux/powerpc/chown.c index b55c0a3417..797b41f01c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/chown.c +++ b/sysdeps/unix/sysv/linux/powerpc/chown.c @@ -21,7 +21,7 @@ #include <string.h> #include <unistd.h> #include <limits.h> -#include <sys/syscall.h> +#include <sysdep.h> #include <stdlib.h> /* @@ -31,7 +31,7 @@ This file emulates chown() under the old kernels. */ -extern int __syscall_chown (const char *__file, +extern int __syscall_chown (const char *__file __unbounded, uid_t __owner, gid_t __group); int @@ -46,14 +46,14 @@ __chown (const char *file, uid_t owner, gid_t group) static int libc_old_chown = 0 /* -1=old linux, 1=new linux, 0=unknown */; if (libc_old_chown == 1) - return __syscall_chown (file, owner, group); + return INLINE_SYSCALL (chown, 3, __ptrvalue (file), owner, group); old_errno = errno; #ifdef __NR_lchown if (libc_old_chown == 0) { - err = __syscall_chown (file, owner, group); + err = INLINE_SYSCALL (chown, 3, __ptrvalue (file), owner, group); if (err != -1 || errno != ENOSYS) { libc_old_chown = 1; diff --git a/sysdeps/unix/sysv/linux/powerpc/ftruncate64.c b/sysdeps/unix/sysv/linux/powerpc/ftruncate64.c index ff9cb7c5d5..bb54b53f47 100644 --- a/sysdeps/unix/sysv/linux/powerpc/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/powerpc/ftruncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ __ftruncate64 (fd, length) #ifndef __ASSUME_TRUNCATE64_SYSCALL int saved_errno = errno; #endif - int result = __syscall_ftruncate64 (fd, length); + int result = INLINE_SYSCALL (ftruncate64, 2, fd, length); #ifndef __ASSUME_TRUNCATE64_SYSCALL if (result != -1 || errno != ENOSYS) diff --git a/sysdeps/unix/sysv/linux/powerpc/ioctl.c b/sysdeps/unix/sysv/linux/powerpc/ioctl.c index aaecac531c..7960c8a5ec 100644 --- a/sysdeps/unix/sysv/linux/powerpc/ioctl.c +++ b/sysdeps/unix/sysv/linux/powerpc/ioctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <termios.h> #include <unistd.h> #include <sys/ioctl.h> +#include <sysdep.h> /* The user-visible size of struct termios has changed. Catch ioctl calls using the new-style struct termios, and translate them to old-style. */ @@ -32,10 +33,10 @@ __ioctl (int fd, unsigned long int request, ...) void *arg; va_list ap; int result; - + va_start (ap, request); arg = va_arg (ap, void *); - + switch (request) { case TCGETS: @@ -55,7 +56,7 @@ __ioctl (int fd, unsigned long int request, ...) break; default: - result = __syscall_ioctl (fd, request, arg); + result = INLINE_SYSCALL (ioctl, 3, fd, request, arg); break; } diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list index a4adb984da..13f0e9bba9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list @@ -1,52 +1,11 @@ # File name Caller Syscall name # args Strong name Weak names # System calls with wrappers. -s_ioctl ioctl ioctl i:iiI __syscall_ioctl -s_ipc msgget ipc i:iiiip __syscall_ipc -s_llseek llseek _llseek i:iiipi __syscall__llseek -s_readahead readahead readahead i:iiii __syscall_readahead -s_chown chown chown i:sii __syscall_chown -s_execve execve execve i:spp __syscall_execve rt_sigaction - rt_sigaction i:ippi __syscall_rt_sigaction rt_sigpending - rt_sigpending i:pi __syscall_rt_sigpending rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait -s_fcntl fcntl fcntl i:iiF __syscall_fcntl -s_fcntl64 fcntl64 fcntl64 i:iiF __syscall_fcntl64 -s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64 -s_ftruncate64 ftruncate64 ftruncate64 i:iii __syscall_ftruncate64 -s_getcwd getcwd getcwd i:pi __syscall_getcwd -s_getdents getdents getdents i:ipi __syscall_getdents -s_getdents64 getdents getdents64 i:ipi __syscall_getdents64 -s_getpmsg getpmsg getpmsg i:ipppp __syscall_getpmsg -s_getpriority getpriority getpriority i:ii __syscall_getpriority -s_getrlimit getrlimit getrlimit i:ip __syscall_getrlimit -s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64 -s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2 -s_poll poll poll i:pii __syscall_poll -s_pread64 pread64 pread i:ibnii __syscall_pread -s_ptrace ptrace ptrace i:iipp __syscall_ptrace -s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg -s_pwrite64 pwrite64 pwrite i:ibnii __syscall_pwrite -s_reboot reboot reboot i:iii __syscall_reboot -s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit -s_sigaction sigaction sigaction i:ipp __syscall_sigaction -s_sigpending sigpending sigpending i:p __syscall_sigpending -s_sigprocmask sigprocmask sigprocmask i:ipp __syscall_sigprocmask -s_sigsuspend sigsuspend sigsuspend i:iii __syscall_sigsuspend -s_stat64 xstat64 stat64 i:sp __syscall_stat64 -s_sysctl sysctl _sysctl i:p __syscall__sysctl -s_truncate64 truncate64 truncate64 i:sii __syscall_truncate64 -s_ugetrlimit getrlimit ugetrlimit i:ip __syscall_ugetrlimit -s_ustat ustat ustat i:ip __syscall_ustat -s_vfork vfork vfork i: __syscall_vfork -sys_fstat fxstat fstat i:ip __syscall_fstat -sys_lstat lxstat lstat i:sp __syscall_lstat -sys_mknod xmknod mknod i:pii __syscall_mknod -sys_readv readv readv i:ipi __syscall_readv -sys_stat xstat stat i:sp __syscall_stat -sys_writev writev writev i:ipi __syscall_writev oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 diff --git a/sysdeps/unix/sysv/linux/powerpc/pread.c b/sysdeps/unix/sysv/linux/powerpc/pread.c index 4097f913d5..48c476c28a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/pread.c +++ b/sysdeps/unix/sysv/linux/powerpc/pread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -22,6 +22,14 @@ #include <sysdep.h> #include <sys/syscall.h> +#include <bp-checks.h> + +#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ +# ifdef __NR_pread +# error "__NR_pread and __NR_pread64 both defined???" +# endif +# define __NR_pread __NR_pread64 +#endif #ifdef __NR_pread @@ -42,7 +50,7 @@ __libc_pread (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ - result = __syscall_pread (fd, buf, count, (off64_t) offset); + result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ result = __emulate_pread (fd, buf, count, offset); diff --git a/sysdeps/unix/sysv/linux/powerpc/pread64.c b/sysdeps/unix/sysv/linux/powerpc/pread64.c index 8da0263c8d..68ef8388e0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/pread64.c +++ b/sysdeps/unix/sysv/linux/powerpc/pread64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -22,6 +22,14 @@ #include <sysdep.h> #include <sys/syscall.h> +#include <bp-checks.h> + +#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ +# ifdef __NR_pread +# error "__NR_pread and __NR_pread64 both defined???" +# endif +# define __NR_pread __NR_pread64 +#endif #ifdef __NR_pread @@ -42,7 +50,7 @@ __libc_pread64 (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ - result = __syscall_pread (fd, buf, count, offset); + result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ result = __emulate_pread64 (fd, buf, count, offset); diff --git a/sysdeps/unix/sysv/linux/powerpc/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/pwrite.c index f6689a9b1a..3f3b79d0e3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/pwrite.c +++ b/sysdeps/unix/sysv/linux/powerpc/pwrite.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -22,6 +22,14 @@ #include <sysdep.h> #include <sys/syscall.h> +#include <bp-checks.h> + +#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ +# ifdef __NR_pwrite +# error "__NR_pwrite and __NR_pwrite64 both defined???" +# endif +# define __NR_pwrite __NR_pwrite64 +#endif #ifdef __NR_pwrite @@ -42,7 +50,7 @@ __libc_pwrite (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ - result = __syscall_pwrite (fd, buf, count, (off64_t) offset); + result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ result = __emulate_pwrite (fd, buf, count, offset); diff --git a/sysdeps/unix/sysv/linux/powerpc/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/pwrite64.c index 9b990eb355..038e7a77da 100644 --- a/sysdeps/unix/sysv/linux/powerpc/pwrite64.c +++ b/sysdeps/unix/sysv/linux/powerpc/pwrite64.c @@ -22,6 +22,14 @@ #include <sysdep.h> #include <sys/syscall.h> +#include <bp-checks.h> + +#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ +# ifdef __NR_pwrite +# error "__NR_pwrite and __NR_pwrite64 both defined???" +# endif +# define __NR_pwrite __NR_pwrite64 +#endif #ifdef __NR_pwrite @@ -42,7 +50,7 @@ __libc_pwrite64 (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ - result = __syscall_pwrite (fd, buf, count, offset); + result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ result = __emulate_pwrite64 (fd, buf, count, offset); diff --git a/sysdeps/unix/sysv/linux/powerpc/tcgetattr.c b/sysdeps/unix/sysv/linux/powerpc/tcgetattr.c index 400539f387..d9b0efe59d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/tcgetattr.c +++ b/sysdeps/unix/sysv/linux/powerpc/tcgetattr.c @@ -1,4 +1,19 @@ -/* We must use __syscall_ioctl since __ioctl does some extra work. */ -extern int __syscall_ioctl (int __fd, unsigned long int __request, ...); -#define __ioctl __syscall_ioctl +/* We must use the syscall directly since __ioctl does some extra work. */ + +#include <sys/ioctl.h> + +#include <sysdep.h> +#include <bp-checks.h> + +struct __kernel_termios; + +static inline int +tcgetattr_ioctl (int fd, unsigned long int request, + struct __kernel_termios *termios_p) +{ + return INLINE_SYSCALL (ioctl, 3, fd, request, CHECK_1 (termios_p)); +} + +#define __ioctl tcgetattr_ioctl + #include <sysdeps/unix/sysv/linux/tcgetattr.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/tcsetattr.c b/sysdeps/unix/sysv/linux/powerpc/tcsetattr.c index cfb8149ba1..c3d5b93334 100644 --- a/sysdeps/unix/sysv/linux/powerpc/tcsetattr.c +++ b/sysdeps/unix/sysv/linux/powerpc/tcsetattr.c @@ -1,4 +1,19 @@ -/* We must use __syscall_ioctl since __ioctl does some extra work. */ -extern int __syscall_ioctl (int __fd, unsigned long int __request, ...); -#define __ioctl __syscall_ioctl +/* We must use the syscall directly since __ioctl does some extra work. */ + +#include <sys/ioctl.h> + +#include <sysdep.h> +#include <bp-checks.h> + +struct __kernel_termios; + +static inline int +tcsetattr_ioctl (int fd, unsigned long int request, + const struct __kernel_termios *termios_p) +{ + return INLINE_SYSCALL (ioctl, 3, fd, request, CHECK_1 (termios_p)); +} + +#define __ioctl tcsetattr_ioctl + #include <sysdeps/unix/sysv/linux/tcsetattr.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/truncate64.c b/sysdeps/unix/sysv/linux/powerpc/truncate64.c index 46669e1cb0..cf76e5341b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/truncate64.c +++ b/sysdeps/unix/sysv/linux/powerpc/truncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,6 +22,7 @@ #include <sysdep.h> #include <sys/syscall.h> +#include <bp-checks.h> #include "kernel-features.h" @@ -47,7 +48,7 @@ truncate64 (path, length) #ifndef __ASSUME_TRUNCATE64_SYSCALL int saved_errno = errno; #endif - int result = __syscall_truncate64 (path, length); + int result = INLINE_SYSCALL (truncate64, 2, CHECK_STRING (path), length); #ifndef __ASSUME_TRUNCATE64_SYSCALL if (result != -1 || errno != ENOSYS) diff --git a/sysdeps/unix/sysv/linux/pwrite.c b/sysdeps/unix/sysv/linux/pwrite.c index 45fca41aa3..13bbc76b3e 100644 --- a/sysdeps/unix/sysv/linux/pwrite.c +++ b/sysdeps/unix/sysv/linux/pwrite.c @@ -32,7 +32,7 @@ # ifdef __NR_pwrite # error "__NR_pwrite and __NR_pwrite64 both defined???" # endif -# define __NR_pwrite __NR_pread64 +# define __NR_pwrite __NR_pwrite64 #endif #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c index ef7236496a..dc81cd6b31 100644 --- a/sysdeps/unix/sysv/linux/pwrite64.c +++ b/sysdeps/unix/sysv/linux/pwrite64.c @@ -31,7 +31,7 @@ # ifdef __NR_pwrite # error "__NR_pwrite and __NR_pwrite64 both defined???" # endif -# define __NR_pwrite __NR_pread64 +# define __NR_pwrite __NR_pwrite64 #endif #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 |