* sysdeps/unix/sysv/linux/powerpc/chown.c: Use INLINE_SYSCALL macro.
* sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/ioctl.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/pread.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/tcgetattr.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/tcsetattr.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_ioctl,
s_chown, s_ftruncate64, s_mmap2, s_pread64, s_pwrite64, s_truncate64,
sys_fstat, sys_lstat, sys_mknod, sys_readv, sys_stat, sys_writev):
Remove these, no longer used.
#include <string.h>
#include <unistd.h>
#include <limits.h>
-#include <sys/syscall.h>
+#include <sysdep.h>
#include <stdlib.h>
/*
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
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;
-/* 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
#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)
-/* 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
#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. */
void *arg;
va_list ap;
int result;
-
+
va_start (ap, request);
arg = va_arg (ap, void *);
-
+
switch (request)
{
case TCGETS:
break;
default:
- result = __syscall_ioctl (fd, request, arg);
+ result = INLINE_SYSCALL (ioctl, 3, fd, request, arg);
break;
}
-/* 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>
-/* 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>
-/* 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
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
#include "kernel-features.h"
#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)