+1998-10-21 14:38 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/unix/sysdep.h (INLINE_SYSCALL): New macro. Simply call
+ __syscall_* function.
+ * sysdeps/unix/sysv/linux/aio_sigqueue.c: Use INLINE_SYSCALL instead
+ of calling __syscall_* function.
+ * sysdeps/unix/sysv/linux/fxstat.c: Likewise.
+ * sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
+ * sysdeps/unix/sysv/linux/getcwd.c: Likewise.
+ * sysdeps/unix/sysv/linux/getdents.c: Likewise.
+ * sysdeps/unix/sysv/linux/getpriority.c: Likewise.
+ * sysdeps/unix/sysv/linux/getresgid.c: Likewise.
+ * sysdeps/unix/sysv/linux/getresuid.c: Likewise.
+ * sysdeps/unix/sysv/linux/lxstat.c: Likewise.
+ * sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
+ * sysdeps/unix/sysv/linux/poll.c: Likewise.
+ * sysdeps/unix/sysv/linux/pread.c: Likewise.
+ * sysdeps/unix/sysv/linux/pread64.c: Likewise.
+ * sysdeps/unix/sysv/linux/ptrace.c: Likewise.
+ * sysdeps/unix/sysv/linux/pwrite.c: Likewise.
+ * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
+ * sysdeps/unix/sysv/linux/readv.c: Likewise.
+ * sysdeps/unix/sysv/linux/reboot.c: Likewise.
+ * sysdeps/unix/sysv/linux/sigaction.c: Likewise.
+ * sysdeps/unix/sysv/linux/siglist.h: Likewise.
+ * sysdeps/unix/sysv/linux/sigpending.c: Likewise.
+ * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
+ * sysdeps/unix/sysv/linux/sigqueue.c: Likewise.
+ * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.
+ * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.
+ * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.
+ * sysdeps/unix/sysv/linux/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/sysctl.c: Likewise.
+ * sysdeps/unix/sysv/linux/ustat.c: Likewise.
+ * sysdeps/unix/sysv/linux/writev.c: Likewise.
+ * sysdeps/unix/sysv/linux/xmknod.c: Likewise.
+ * sysdeps/unix/sysv/linux/xstat.c: Likewise.
+ * sysdeps/unix/sysv/linux/xstat64.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/chown.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/getgroups.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/setfsuid.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise.
+
+ * sysdeps/unix/sysv/linux/i386/sysdep.h: Define INLINE_SYSCALL using
+ inline assembler.
+ * sysdeps/unix/sysv/linux/i386/syscalls.list: Remove various
+ __syscall_* definitions.
+
+ * sysdeps/unix/sysv/linux/syscalls.list: Move various __syscall_*
+ definitions to...
+ * sysdeps/unix/sysv/linux/alpha/syscalls.list: ...here...
+ * sysdeps/unix/sysv/linux/arm/syscalls.list: ...and here...
+ * sysdeps/unix/sysv/linux/m68k/syscalls.list: ...and here...
+ * sysdeps/unix/sysv/linux/mips/syscalls.list: ...and here...
+ * sysdeps/unix/sysv/linux/powerpc/syscalls.list: ...and here...
+ * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: ...and here...
+ * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: ...and here.
+
+ * sysdeps/unix/sysv/linux/i386/Makefile [subdir=misc]
+ (sysdep_routines): Remove s_pread64 and s_pwrite64.
+
+ * sysdeps/unix/sysv/linux/i386/pread.c: New file.
+ * sysdeps/unix/sysv/linux/i386/pread64.c: New file.
+ * sysdeps/unix/sysv/linux/i386/pwrite.c: New file.
+ * sysdeps/unix/sysv/linux/i386/pwrite64.c: New file.
+ * sysdeps/unix/sysv/linux/i386/s_pread64.S: Removed.
+ * sysdeps/unix/sysv/linux/i386/s_pwrite64.S: Removed.
+
+1998-10-21 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * sysdeps/unix/sysv/linux/siglist.h: Fix some typos in these files
+ and bring them in synch.
+ * sysdeps/unix/siglist.c: Likewise.
+ Reported by Vladimir Michl <michlv@risc.upol.cz> [PR libc/832].
+
+1998-10-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * sysdeps/unix/sysv/linux/i386/setresuid.c: Allow -1 as arguments.
+ * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise.
+
+ * sysdeps/unix/sysv/linux/i386/setreuid.c: New file.
+ * sysdeps/unix/sysv/linux/i386/setregid.c: New file.
+ * sysdeps/unix/sysv/linux/m68k/setreuid.c: New file.
+ * sysdeps/unix/sysv/linux/m68k/setregid.c: New file.
+ * sysdeps/unix/sysv/linux/arm/setreuid.c: New file.
+ * sysdeps/unix/sysv/linux/arm/setregid.c: New file.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c: New file.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c: New file.
+ * sysdeps/unix/sysv/linux/i386/syscalls.list: Add s_setreuid and
+ s_setregid.
+ * sysdeps/unix/sysv/linux/m68k/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Likewise.
+
+1998-10-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * sunrpc/rpc_main.c (close_output, close_input): New functions.
+ (c_output, h_output, s_output, l_output, t_output, svc_output,
+ clnt_output, mkfile_output): Call them at the end.
+
+1998-10-19 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * db/Makefile (LDFLAGS-db1.so): New variable, to avoid duplicating
+ link command.
+
1998-10-19 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/setfsuid.c: Add real contents.
* sysdeps/unix/sysv/linux/powerpc/pwrite64.c: New file.
Patch by Geoffrey KEATING <geoffk@discus.anu.edu.au>.
-1998-10-18 Zack Weinberg <zack@rabi.phys.columbia.edu>
-
- * sysdeps/unix/opendir.c: Check at runtime for kernel support for
- O_DIRECTORY.
-
-1998-10-20 H.J. Lu <hjl@gnu.org>
-
- * sysdeps/unix/sysv/linux/i386/setresuid.c (__setresuid): Fix
- argument types.
-
+1998-10-18 Zack Weinberg <zack@rabi.phys.columbia.edu>
+
+ * sysdeps/unix/opendir.c: Check at runtime for kernel support for
+ O_DIRECTORY.
+
+1998-10-20 H.J. Lu <hjl@gnu.org>
+
+ * sysdeps/unix/sysv/linux/i386/setresuid.c (__setresuid): Fix
+ argument types.
+
1998-10-19 Ulrich Drepper <drepper@cygnus.com>
* math/tgmath.h: Make nested function calls work.
Missing a better place here are some numbers on improvements. Under
Linux 2.1.125 un-tar-ing the kernel sources takes
- user system wall
+ user system wall
- using local files 12.19s 6.88s 22.91s
+ using local files 12.19s 6.88s 22.91s
- using NIS 13.92s 8.91s 26.34s
+ using NIS 13.92s 8.91s 26.34s
- using NIS & nscd 10.37s 7.34s 25.30s
+ using NIS & nscd 10.37s 7.34s 25.30s
- using NIS & old nscd [1] 13.83s 8.32s 29.60s
+ using NIS+ 27.57s 30.37s 640.46s
+
+ using NIS+ & nscd 10.25s 7.83s 26.51s
+
+ using NIS & old nscd [1] 13.83s 8.32s 29.60s
- When NIS+ is used instead of NIS the benefit from using nscd is much bigger.
Keep in mind that non-namelookup related operations dominate above times.
It was just a common complain that using NIS+ unpacking the kernel is
- horribly slow. When using nscd unpacking is now even faster than using
- NIS.
+ horribly slow.
- [1] The old nscd implementation is not anymore available since it was
- distributed with glibc up to version 2.0.98.
+ [1] The old nscd implementation is not available anymore since it was
+ distributed with glibc up to version 2.0.98 and thus is now replaced.
* Tim Waugh provided an implementation of the POSIX.2 wordexp function family.
# The db code outsmarts the compiler frequently.
override CFLAGS += -Wno-uninitialized
-# We are in an ugly situation here. The library is called libdb1 but the
-# SONAME for compatibility reasons should be libdb. Therefore we duplicate
-# shared library generating rule here.
+# Force the soname to be libdb.so for compatibility.
+LDFLAGS-db1.so = -Wl,-soname=lib$(libprefix)db.so$($(@F)-version)
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
# a statically-linked program that hasn't already loaded it.
$(objpfx)libdb1.so: $(objpfx)libdb1_pic.a $(+preinit) $(+postinit) $(+interp) \
$(common-objpfx)libc.so
- $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
- -B$(csu-objpfx) $(load-map-file) \
- -Wl,-soname=lib$(libprefix)db.so$($(@F)-version) \
- $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
- -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)\
- -Wl,--whole-archive \
- $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
- $(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
#subdir_install: $(inst_libdir)/libndbm.a
#$(inst_libdir)/libndbm.a: $(inst_libdir)/libdb1.a $(+force)
#include <sys/param.h>
#include <sys/file.h>
#include <sys/stat.h>
+#include <sys/wait.h>
#include "rpc_parse.h"
#include "rpc_util.h"
#include "rpc_scan.h"
static const char *CPP = SUNOS_CPP;
static char CPPFLAGS[] = "-C";
static char *pathbuf;
+static int cpp_pid;
static const char *allv[] =
{
"rpcgen", "-s", "udp", "-s", "tcp",
record_open (outfile);
}
+/* Close the output file and check for write errors. */
+static void
+close_output (const char *outfile)
+{
+ if (fclose (fout) == EOF)
+ {
+ fprintf (stderr, _("%s: while writing output: "), cmdname);
+ perror (outfile ?: "<stdout>");
+ crash ();
+ }
+}
+
static void
add_warning (void)
{
perror ("pipe");
exit (1);
}
- switch (fork ())
+ cpp_pid = fork ();
+ switch (cpp_pid)
{
case 0:
find_cpp ();
}
}
+/* Close the connection to the C-preprocessor and check for successfull
+ termination. */
+static void
+close_input (void)
+{
+ int status;
+
+ fclose (fin);
+ /* Check the termination status. */
+ if (waitpid (cpp_pid, &status, 0) < 0)
+ {
+ perror ("waitpid");
+ crash ();
+ }
+ if (WIFSIGNALED (status) || WEXITSTATUS (status) != 0)
+ {
+ if (WIFSIGNALED (status))
+ fprintf (stderr, _("%s: C preprocessor failed with signal %d\n"),
+ cmdname, WTERMSIG (status));
+ else
+ fprintf (stderr, _("%s: C preprocessor failed with exit code %d\n"),
+ cmdname, WEXITSTATUS (status));
+ crash ();
+ }
+}
+
/* valid tirpc nettypes */
static const char *valid_ti_nettypes[] =
{
if (extend && tell == ftell (fout))
unlink (outfilename);
+ close_input ();
+ close_output (outfilename);
}
void
}
fprintf (fout, "\n#endif /* !_%s */\n", guard);
+ close_input ();
+ close_output (outfilename);
}
/*
}
write_rest ();
}
+ close_input ();
+ close_output (outfilename);
}
/*
return;
}
write_stubs ();
+ close_input ();
+ close_output (outfilename);
}
/*
return;
}
write_tables ();
+ close_input ();
+ close_output (outfilename);
}
/* sample routine for the server template */
{
unlink (outfilename);
}
+ close_input ();
+ close_output (outfilename);
}
{
unlink (outfilename);
}
+ close_input ();
+ close_output (outfilename);
}
static char *
f_print (fout, "\t$(LINK.c) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n ");
f_print (fout, "clean:\n\t $(RM) core $(TARGETS) $(OBJECTS_CLNT) \
$(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n");
+ close_output (mkfilename);
}
/*
N_("Interrupt"),
N_("Quit"),
N_("Illegal instruction"),
- N_("Trace/BPT trap"),
+ N_("Trace/breakpoint trap"),
N_("IOT trap"),
N_("EMT trap"),
N_("Floating point exception"),
N_("Stopped (tty input)"),
N_("Stopped (tty output)"),
N_("I/O possible"),
- N_("Cputime limit exceeded"),
- N_("Filesize limit exceeded"),
+ N_("CPU time limit exceeded"),
+ N_("File size limit exceeded"),
N_("Virtual timer expired"),
N_("Profiling timer expired"),
N_("Window changed"),
-/* Copyright (C) 1991, 92, 93, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 96, 98 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 PSEUDO_END
#define PSEUDO_END(sym)
#endif
+
+/* Wrappers around system calls should normally inline the system call code.
+ But sometimes it is not possible or implemented and we use this code. */
+#define INLINE_SYSCALL(name, nr, args...) __syscall_##name (args)
Boston, MA 02111-1307, USA. */
#include <aio.h>
+#include <errno.h>
#include <signal.h>
#include <unistd.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
#include "aio_misc.h"
extern int __syscall_rt_sigqueueinfo (int, int, siginfo_t *);
info.si_uid = getuid ();
info.si_value = val;
- return __syscall_rt_sigqueueinfo (info.si_pid, sig, &info);
+ return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, sig, &info);
}
# and one for timeval64 entry points
adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
+s_ustat ustat ustat 2 __syscall_ustat
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
+sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
--- /dev/null
+#include <sysdeps/unix/sysv/linux/i386/setregid.c>
--- /dev/null
+#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
s_setgid setgid setgid 1 __syscall_setgid
s_setgroups setgroups setgroups 2 __syscall_setgroups
+s_setregid setregid setregid 2 __syscall_setregid
s_setresgid setresgid setresgid 3 __syscall_setresgid
s_setresuid setresuid setresuid 3 __syscall_setresuid
+s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
syscall - syscall 5 syscall
vm86 - vm86 1 __vm86 vm86
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
+s_ustat ustat ustat 2 __syscall_ustat
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
+sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
/* fxstat using old-style Unix fstat system call.
- Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1995, 1996, 1997, 1998 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 <sys/stat.h>
#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
#include <xstatconv.c>
extern int __syscall_fstat (int, struct kernel_stat *);
int result;
if (vers == _STAT_VER_KERNEL)
- return __syscall_fstat (fd, (struct kernel_stat *) buf);
+ {
+ return INLINE_SYSCALL (fstat, 2, fd, (struct kernel_stat *) buf);
+ }
- result = __syscall_fstat (fd, &kbuf);
+ result = INLINE_SYSCALL (fstat, 2, fd, &kbuf);
if (result == 0)
result = xstat_conv (vers, &kbuf, buf);
/* fxstat64 using old-style Unix fstat system call.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 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 <sys/stat.h>
#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
#include <xstatconv.c>
extern int __syscall_fstat (int, struct kernel_stat *);
struct kernel_stat kbuf;
int result;
- result = __syscall_fstat (fd, &kbuf);
+ result = INLINE_SYSCALL (fstat, 2, fd, &kbuf);
if (result == 0)
result = xstat64_conv (vers, &kbuf, buf);
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
+
+#include <sysdep.h>
#include <sys/syscall.h>
{
int retval;
- retval = __syscall_getcwd (path, alloc_size);
+ retval = INLINE_SYSCALL (getcwd, 2, path, alloc_size);
if (retval >= 0)
{
if (buf == NULL)
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 1998 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
Boston, MA 02111-1307, USA. */
#include <alloca.h>
+#include <errno.h>
#include <dirent.h>
#include <stddef.h>
#include <string.h>
#include <sys/param.h>
#include <sys/types.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
#include <linux/posix_types.h>
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-extern int __getdents __P ((int fd, char *buf, size_t nbytes));
+extern int __syscall_getdents __P ((int fd, char *buf, size_t nbytes));
/* For Linux we need a special version of this file since the
definition of `struct dirent' is not the same for the kernel and
the libc. There is one additional field which might be introduced
in the kernel structure in the future.
- He is the kernel definition of `struct dirent' as of 2.1.20: */
+ Here is the kernel definition of `struct dirent' as of 2.1.20: */
struct kernel_dirent
{
dp = (struct dirent *) buf;
skdp = kdp = __alloca (red_nbytes);
- retval = __getdents (fd, (char *) kdp, red_nbytes);
+ retval = INLINE_SYSCALL (getdents, 3, fd, (char *) kdp, red_nbytes);
while ((char *) kdp < (char *) skdp + retval)
{
/* getpriority for Linux.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
#include <errno.h>
#include <sys/resource.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_getpriority (int, int);
/* The return value of __syscall_getpriority is biased by this value
{
int res;
- res = __syscall_getpriority ((int) which, who);
+ res = INLINE_SYSCALL (getpriority, 2, (int) which, who);
if (res >= 0)
res = PZERO - res;
return res;
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <linux/posix_types.h>
+#include <sysdep.h>
#include <sys/syscall.h>
#ifdef __NR_getresgid
getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
{
__kernel_gid_t k_rgid, k_egid, k_sgid;
+ int result;
- if (__syscall_getresgid (&k_rgid, &k_egid, &k_sgid) < 0)
- return -1;
+ result = INLINE_SYSCALL (getresgid, 3, &k_rgid, &k_egid, &k_sgid);
- *rgid = (gid_t) k_rgid;
- *egid = (gid_t) k_egid;
- *sgid = (gid_t) k_sgid;
- return 0;
+ if (result == 0)
+ {
+ *rgid = (gid_t) k_rgid;
+ *egid = (gid_t) k_egid;
+ *sgid = (gid_t) k_sgid;
+ }
+
+ return result;
}
#else
# include <sysdeps/generic/getresgid.c>
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <linux/posix_types.h>
+#include <sysdep.h>
#include <sys/syscall.h>
#ifdef __NR_getresuid
getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
{
__kernel_uid_t k_ruid, k_euid, k_suid;
+ int result;
- if (__syscall_getresuid (&k_ruid, &k_euid, &k_suid) < 0)
- return -1;
+ result = INLINE_SYSCALL (getresuid, 3, &k_ruid, &k_euid, &k_suid);
- *ruid = (uid_t) k_ruid;
- *euid = (uid_t) k_euid;
- *suid = (uid_t) k_suid;
- return 0;
+ if (result == 0)
+ {
+ *ruid = (uid_t) k_ruid;
+ *euid = (uid_t) k_euid;
+ *suid = (uid_t) k_suid;
+ }
+
+ return result;
}
#else
# include <sysdeps/generic/getresuid.c>
ifeq ($(subdir),misc)
-sysdep_routines += ioperm iopl vm86 s_pread64 s_pwrite64 setfsgid setfsuid \
- setresgid setresuid
+sysdep_routines += ioperm iopl vm86 setfsgid setfsuid setresgid setresuid
sysdep_headers += sys/elf.h sys/perm.h sys/reg.h sys/vm86.h sys/debugreg.h
endif
#include <errno.h>
#include <unistd.h>
+
+#include <sysdep.h>
#include <sys/syscall.h>
/*
if (!__libc_old_chown)
{
int saved_errno = errno;
- result = __syscall_chown (file, owner, group);
+ result = INLINE_SYSCALL (chown, 3, file, owner, group);
if (result >= 0 || errno != ENOSYS)
return result;
int
__chown_is_lchown (const char *file, uid_t owner, gid_t group)
{
- return __syscall_chown (file, owner, group);
+ return INLINE_SYSCALL (chown, 3, file, owner, group);
}
#elif defined HAVE_ELF && defined PIC && defined DO_VERSIONING
/* Compiling for compatibiity. */
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 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
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <sys/types.h>
#include <unistd.h>
+#include <sysdep.h>
#include <linux/posix_types.h>
extern int __syscall_getgroups __P ((int, __kernel_gid_t *));
int i, ngids;
__kernel_gid_t kernel_groups[n];
- ngids = __syscall_getgroups (n, kernel_groups);
+ ngids = INLINE_SYSCALL (getgroups, 2, n, kernel_groups);
if (n != 0 && ngids > 0)
for (i = 0; i < ngids; i++)
groups[i] = kernel_groups[i];
--- /dev/null
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_pread
+
+static ssize_t __emulate_pread (int fd, void *buf, size_t count,
+ off_t offset) internal_function;
+
+
+ssize_t
+__pread (fd, buf, count, offset)
+ int fd;
+ void *buf;
+ size_t count;
+ off_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+ result = INLINE_SYSCALL (pread, 5, fd, buf, count, offset, 0);
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pread (fd, buf, count, offset);
+
+ return result;
+}
+
+weak_alias (__pread, pread)
+
+#define __pread(fd, buf, count, offset) \
+ static internal_function __emulate_pread (fd, buf, count, offset)
+#endif
+#include <sysdeps/posix/pread.c>
--- /dev/null
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_pread
+
+extern ssize_t __syscall_pread64 (int fd, void *buf, size_t count,
+ off_t offset_hi, off_t offset_lo);
+
+static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
+ off64_t offset) internal_function;
+
+
+ssize_t
+__pread64 (fd, buf, count, offset)
+ int fd;
+ void *buf;
+ size_t count;
+ off64_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+ result = INLINE_SYSCALL (pread, 5, fd, buf, count,
+ (off_t) (offset & 0xffffffff),
+ (off_t) (offset >> 32));
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pread64 (fd, buf, count, offset);
+
+ return result;
+}
+
+weak_alias (__pread64, pread64)
+
+#define __pread64(fd, buf, count, offset) \
+ static internal_function __emulate_pread64 (fd, buf, count, offset)
+#endif
+#include <sysdeps/posix/pread64.c>
--- /dev/null
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_pwrite
+
+static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
+ off_t offset) internal_function;
+
+
+ssize_t
+__pwrite (fd, buf, count, offset)
+ int fd;
+ const void *buf;
+ size_t count;
+ off_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+ result = INLINE_SYSCALL (pwrite, 5, fd, buf, count, offset, 0);
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pwrite (fd, buf, count, offset);
+
+ return result;
+}
+
+weak_alias (__pwrite, pwrite)
+
+#define __pwrite(fd, buf, count, offset) \
+ static internal_function __emulate_pwrite (fd, buf, count, offset)
+#endif
+#include <sysdeps/posix/pwrite.c>
--- /dev/null
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_pwrite
+
+static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
+ off64_t offset) internal_function;
+
+
+ssize_t
+__pwrite64 (fd, buf, count, offset)
+ int fd;
+ const void *buf;
+ size_t count;
+ off64_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+ result = INLINE_SYSCALL (pwrite, 5, fd, buf, count,
+ (off_t) (offset & 0xffffffff),
+ (off_t) (offset >> 32));
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pwrite64 (fd, buf, count, offset);
+
+ return result;
+}
+
+weak_alias (__pwrite64, pwrite64)
+
+#define __pwrite64(fd, buf, count, offset) \
+ static internal_function __emulate_pwrite64 (fd, buf, count, offset)
+#endif
+#include <sysdeps/posix/pwrite64.c>
+++ /dev/null
-/* pread64 syscall for Linux/ix86.
- Copyright (C) 1997, 1998 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
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-#include <asm/errno.h>
-
-/* Please consult the file sysdeps/unix/sysv/linux/i386/sysdep.h for
- more information about the value -4095 used below.*/
-
- .text
-ENTRY (__syscall_pread64)
-
-#ifndef __NR_pread
- movl $-ENOSYS,%eax
-# ifndef PIC
- jmp syscall_error
-# endif
-#else
-
- PUSHARGS_5 /* Save register contents. */
-
- /* Load arguments. This is unfortunately a little bit of a problem
- since the kernel expects the arguments in a different order. */
- movl 0x20(%esp,1),%esi
- movl 0x1c(%esp,1),%edi
- movl 0x18(%esp,1),%edx
- movl 0x14(%esp,1),%ecx
- movl 0x10(%esp,1),%ebx
- /* Load syscall number into %eax. */
- movl $SYS_ify(pread), %eax
- int $0x80 /* Do the system call. */
- POPARGS_5 /* Restore register contents. */
- cmpl $-4095, %eax /* Check %eax for error. */
- jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
-#endif
-L(pseudo_end):
- ret /* Return to caller. */
-
-PSEUDO_END (__syscall_pread64)
+++ /dev/null
-/* pwrite64 syscall for Linux/ix86.
- Copyright (C) 1997, 1998 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
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-#include <asm/errno.h>
-
-/* Please consult the file sysdeps/unix/sysv/linux/i386/sysdep.h for
- more information about the value -4095 used below.*/
-
- .text
-ENTRY (__syscall_pwrite64)
-
-#ifndef __NR_pwrite
- movl $-ENOSYS,%eax
-# ifndef PIC
- jmp syscall_error
-# endif
-#else
-
- PUSHARGS_5 /* Save register contents. */
-
- /* Load arguments. This is unfortunately a little bit of a problem
- since the kernel expects the arguments in a different order. */
- movl 0x20(%esp,1),%esi
- movl 0x1c(%esp,1),%edi
- movl 0x18(%esp,1),%edx
- movl 0x14(%esp,1),%ecx
- movl 0x10(%esp,1),%ebx
- /* Load syscall number into %eax. */
- movl $SYS_ify(pwrite), %eax
- int $0x80 /* Do the system call. */
- POPARGS_5 /* Restore register contents. */
- cmpl $-4095, %eax /* Check %eax for error. */
- jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
-#endif
-L(pseudo_end):
- ret /* Return to caller. */
-
-PSEUDO_END (__syscall_pwrite64)
Boston, MA 02111-1307, USA. */
#include <errno.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
#include <unistd.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
#include <linux/posix_types.h>
return -1;
}
- return __syscall_setfsgid (gid);
-}
-#else
-int
-setfsgid (gid_t gid)
-{
- __set_errno (ENOSYS);
- return -1;
+ return INLINE_SYSCALL (setfsgid, 1, gid);
}
#endif
Boston, MA 02111-1307, USA. */
#include <errno.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
#include <unistd.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
#include <linux/posix_types.h>
return -1;
}
- return __syscall_setfsuid (uid);
-}
-#else
-int
-setfsuid (uid_t uid)
-{
- __set_errno (ENOSYS);
- return -1;
+ return INLINE_SYSCALL (setfsuid, 1, uid);
}
#endif
Boston, MA 02111-1307, USA. */
#include <errno.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
#include <unistd.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
#include <linux/posix_types.h>
return -1;
}
- return __syscall_setgid (gid);
+ return INLINE_SYSCALL (setgid, 1, gid);
}
weak_alias (__setgid, setgid)
Boston, MA 02111-1307, USA. */
#include <errno.h>
-#include <sys/types.h>
-#include <unistd.h>
#include <grp.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
#include <linux/posix_types.h>
return -1;
}
}
- return __syscall_setgroups (n, kernel_groups);
+
+ return INLINE_SYSCALL (setgroups, 2, n, kernel_groups);
}
--- /dev/null
+/* Copyright (C) 1998 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
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <linux/posix_types.h>
+
+extern int __syscall_setregid (__kernel_gid_t, __kernel_gid_t);
+
+int
+__setregid (gid_t rgid, gid_t egid)
+{
+ if ((rgid != (gid_t) -1 && rgid != (gid_t) (__kernel_gid_t) rgid)
+ || (egid != (gid_t) -1 && egid != (gid_t) (__kernel_gid_t) egid))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return INLINE_SYSCALL (setregid, 2, rgid, egid);
+}
+weak_alias (__setregid, setregid)
#include <linux/posix_types.h>
+#include <sysdep.h>
#include <sys/syscall.h>
#ifdef __NR_setresgid
int
setresgid (gid_t rgid, gid_t egid, gid_t sgid)
{
- if ((rgid != (gid_t) ((__kernel_gid_t) rgid))
- || (egid != (gid_t) ((__kernel_gid_t) egid))
- || (sgid != (gid_t) ((__kernel_gid_t) sgid)))
+ if ((rgid != (gid_t) -1 && rgid != (gid_t) (__kernel_gid_t) rgid)
+ || (egid != (gid_t) -1 && egid != (gid_t) (__kernel_gid_t) egid)
+ || (sgid != (gid_t) -1 && sgid != (gid_t) (__kernel_gid_t) sgid))
{
__set_errno (EINVAL);
return -1;
}
- return __syscall_setresgid (rgid, egid, sgid);
+ return INLINE_SYSCALL (setresgid, 3, rgid, egid, sgid);
}
#endif
#include <linux/posix_types.h>
+#include <sysdep.h>
#include <sys/syscall.h>
#ifdef __NR_setresuid
int
__setresuid (uid_t ruid, uid_t euid, uid_t suid)
{
- if ((ruid != (uid_t) ((__kernel_uid_t) ruid))
- || (euid != (uid_t) ((__kernel_uid_t) euid))
- || (suid != (uid_t) ((__kernel_uid_t) suid)))
+ if ((ruid != (uid_t) -1 && ruid != (uid_t) (__kernel_uid_t) ruid)
+ || (euid != (uid_t) -1 && euid != (uid_t) (__kernel_uid_t) euid)
+ || (suid != (uid_t) -1 && suid != (uid_t) (__kernel_uid_t) suid))
{
__set_errno (EINVAL);
return -1;
}
- return __syscall_setresuid (ruid, euid, suid);
+ return INLINE_SYSCALL (setresuid, 3, ruid, euid, suid);
}
weak_alias (__setresuid, setresuid)
#endif
--- /dev/null
+/* Copyright (C) 1998 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
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <linux/posix_types.h>
+
+extern int __syscall_setreuid (__kernel_uid_t, __kernel_uid_t);
+
+int
+__setreuid (uid_t ruid, uid_t euid)
+{
+ if ((ruid != (uid_t) -1 && ruid != (uid_t) (__kernel_uid_t) ruid)
+ || (euid != (uid_t) -1 && euid != (uid_t) (__kernel_uid_t) euid))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return INLINE_SYSCALL (setreuid, 2, ruid, euid);
+}
+weak_alias (__setreuid, setreuid)
Boston, MA 02111-1307, USA. */
#include <errno.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
#include <unistd.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
#include <linux/posix_types.h>
return -1;
}
- return __syscall_setuid (uid);
+ return INLINE_SYSCALL (setuid, 1, uid);
}
weak_alias (__setuid, setuid)
# File name Caller Syscall name # args Strong name Weak names
modify_ldt EXTRA modify_ldt 3 __modify_ldt modify_ldt
-s_chown chown chown 3 __syscall_chown
-s_getgroups getgroups getgroups 2 __syscall_getgroups
s_llseek llseek _llseek 5 __sys_llseek
-s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
-s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
-s_setgid setgid setgid 1 __syscall_setgid
-s_setgroups setgroups setgroups 2 __syscall_setgroups
-s_setresgid setresgid setresgid 3 __syscall_setresgid
-s_setresuid setresuid setresuid 3 __syscall_setresuid
-s_setuid setuid setuid 1 __syscall_setuid
vm86 - vm86 1 __vm86 vm86
/* lxstat using old-style Unix lstat system call.
- Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1995, 1996, 1997, 1998 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 <sys/stat.h>
#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
#include <xstatconv.c>
extern int __syscall_lstat (const char *, struct kernel_stat *);
int result;
if (vers == _STAT_VER_KERNEL)
- return __syscall_lstat (name, (struct kernel_stat *) buf);
+ {
+ return INLINE_SYSCALL (lstat, 2, name, (struct kernel_stat *) buf);
+ }
- result = __syscall_lstat (name, &kbuf);
+ result = INLINE_SYSCALL (lstat, 2, name, &kbuf);
if (result == 0)
result = xstat_conv (vers, &kbuf, buf);
/* lxstat64 using old-style Unix lstat system call.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 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 <sys/stat.h>
#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
#include <xstatconv.c>
extern int __syscall_lstat (const char *, struct kernel_stat *);
struct kernel_stat kbuf;
int result;
- result = __syscall_lstat (name, &kbuf);
+ result = INLINE_SYSCALL (lstat, 2, name, &kbuf);
if (result == 0)
result = xstat64_conv (vers, &kbuf, buf);
--- /dev/null
+#include <sysdeps/unix/sysv/linux/i386/setregid.c>
--- /dev/null
+#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
s_setgid setgid setgid 1 __syscall_setgid
s_setgroups setgroups setgroups 2 __syscall_setgroups
+s_setregid setregid setregid 2 __syscall_setregid
s_setresgid setresgid setresgid 3 __syscall_setresgid
s_setresuid setresuid setresuid 3 __syscall_setresuid
+s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
+s_ustat ustat ustat 2 __syscall_ustat
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
+sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
# There are defined locally because the caller is also defined in this dir.
#
s_llseek llseek _llseek 5 __sys_llseek
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
s_ustat ustat ustat 2 __syscall_ustat
-sys_mknod xmknod mknod 3 __syscall_mknod
sys_fstat fxstat fstat 2 __syscall_fstat
sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
#include <errno.h>
#include <sys/poll.h>
+#include <sysdep.h>
#include <sys/syscall.h>
#ifdef __NR_poll
extern int __syscall_poll __P ((struct pollfd *fds, unsigned int nfds,
int timeout));
-weak_extern (__syscall_poll)
static int __emulate_poll __P ((struct pollfd *fds, unsigned long int nfds,
int timeout)) internal_function;
int timeout;
{
static int must_emulate = 0;
- int (*syscall) __P ((struct pollfd *, unsigned int, int)) = __syscall_poll;
if (!must_emulate)
{
- if (syscall)
- {
- int errno_saved = errno;
- int retval = __syscall_poll (fds, nfds, timeout);
+ int errno_saved = errno;
+ int retval = INLINE_SYSCALL (poll, 3, fds, nfds, timeout);
- if (retval >= 0 || errno != ENOSYS)
- return retval;
-
- __set_errno (errno_saved);
- }
+ if (retval >= 0 || errno != ENOSYS)
+ return retval;
+ __set_errno (errno_saved);
must_emulate = 1;
}
s_chown chown chown 3 __syscall_chown
s_pread64 pread64 pread 4 __syscall_pread64
s_pwrite64 pwrite64 pwrite 4 __syscall_pwrite64
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
+s_ustat ustat ustat 2 __syscall_ustat
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
+sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
#include <errno.h>
#include <unistd.h>
+
+#include <sysdep.h>
#include <sys/syscall.h>
#ifdef __NR_pread
ssize_t result;
/* First try the syscall. */
- result = __syscall_pread64 (fd, buf, count, 0, offset);
+ result = INLINE_SYSCALL (pread, 5, fd, buf, count, 0, offset);
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pread (fd, buf, count, offset);
#include <errno.h>
#include <unistd.h>
+
+#include <sysdep.h>
#include <sys/syscall.h>
#ifdef __NR_pread
ssize_t result;
/* First try the syscall. */
- result = __syscall_pread64 (fd, buf, count, (off_t) (offset >> 32),
- (off_t) (offset & 0xffffffff));
+ result = INLINE_SYSCALL (pread, 5, fd, buf, count, (off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff));
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pread64 (fd, buf, count, offset);
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 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 <sys/ptrace.h>
#include <stdarg.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern long int __syscall_ptrace (int, pid_t, void *, void *);
long int
if (request > 0 && request < 4)
data = &ret;
- res = __syscall_ptrace (request, pid, addr, data);
-
- if (res >= 0)
+ res = INLINE_SYSCALL (ptrace, 4, request, pid, addr, data);
+ if (res >= 0 && request > 0 && request < 4)
{
- if (request > 0 && request < 4)
- {
- __set_errno (0);
- return ret;
- }
- return res;
+ __set_errno (0);
+ return ret;
}
- return -1;
+ return res;
}
#include <errno.h>
#include <unistd.h>
+
+#include <sysdep.h>
#include <sys/syscall.h>
#ifdef __NR_pwrite
ssize_t result;
/* First try the syscall. */
- result = __syscall_pwrite64 (fd, buf, count, 0, offset);
+ result = INLINE_SYSCALL (pwrite, 5, fd, buf, count, 0, offset);
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite (fd, buf, count, offset);
#include <errno.h>
#include <unistd.h>
+
+#include <sysdep.h>
#include <sys/syscall.h>
#ifdef __NR_pwrite
ssize_t result;
/* First try the syscall. */
- result = __syscall_pwrite64 (fd, buf, count, (off_t) (offset >> 32),
- (off_t) (offset & 0xffffffff));
+ result = INLINE_SYSCALL (pwrite, 5, fd, buf, count, (off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff));
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite64 (fd, buf, count, offset);
/* readv supports all Linux kernels >= 2.0.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 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 <sys/param.h>
#include <sys/uio.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern ssize_t __syscall_readv __P ((int, __const struct iovec *, int));
static ssize_t __atomic_readv_replacement __P ((int, __const struct iovec *,
int)) internal_function;
int errno_saved = errno;
ssize_t bytes_read;
- bytes_read = __syscall_readv (fd, vector, count);
+ bytes_read = INLINE_SYSCALL (readv, 3, fd, vector, count);
if (bytes_read >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
return bytes_read;
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 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
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <sys/reboot.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_reboot (int magic, int magic_too, int flag);
/* Call kernel with additional two arguments the syscall requires. */
int
reboot (int howto)
{
- return __syscall_reboot (0xfee1dead, 672274793, howto);
+ return INLINE_SYSCALL (reboot, 3, 0xfee1dead, 672274793, howto);
}
#include <signal.h>
#include <string.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
/* The difference here is that the sigaction structure used in the
kernel is not the same as we use in the libc. Therefore we must
translate it here. */
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
- result = __syscall_rt_sigaction (sig, act ? &kact : 0,
- oact ? &koact : 0, _NSIG / 8);
+ result = INLINE_SYSCALL (rt_sigaction, 4, sig, act ? &kact : 0,
+ oact ? &koact : 0, _NSIG / 8);
if (result >= 0 || errno != ENOSYS)
{
k_sigact.sa_restorer = act->sa_restorer;
#endif
}
- result = __syscall_sigaction (sig, act ? &k_sigact : 0,
- oact ? &k_osigact : 0);
+ result = INLINE_SYSCALL (sigaction, 3, sig, act ? &k_sigact : 0,
+ oact ? &k_osigact : 0);
if (oact && result >= 0)
{
oact->sa_handler = k_osigact.k_sa_handler;
init_sig (SIGHUP, "HUP", N_("Hangup"))
init_sig (SIGINT, "INT", N_("Interrupt"))
init_sig (SIGQUIT, "QUIT", N_("Quit"))
- init_sig (SIGILL, "ILL", N_("Illegal Instruction"))
+ init_sig (SIGILL, "ILL", N_("Illegal instruction"))
init_sig (SIGTRAP, "TRAP", N_("Trace/breakpoint trap"))
init_sig (SIGABRT, "ABRT", N_("Aborted"))
init_sig (SIGFPE, "FPE", N_("Floating point exception"))
#include <signal.h>
#include <unistd.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_sigpending (sigset_t *);
extern int __syscall_rt_sigpending (sigset_t *, size_t);
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
int saved_errno = errno;
- int result = __syscall_rt_sigpending (set, _NSIG / 8);
+ int result = INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8);
if (result >= 0 || errno != ENOSYS)
return result;
__libc_missing_rt_sigs = 1;
}
- return __syscall_sigpending (set);
+ return INLINE_SYSCALL (sigpending, 1, set);
}
#include <signal.h>
#include <unistd.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_sigprocmask (int, const sigset_t *, sigset_t *);
extern int __syscall_rt_sigprocmask (int, const sigset_t *, sigset_t *,
size_t);
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
int saved_errno = errno;
- int result = __syscall_rt_sigprocmask (how, set, oset, _NSIG / 8);
+ int result = INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset,
+ _NSIG / 8);
if (result >= 0 || errno != ENOSYS)
return result;
__libc_missing_rt_sigs = 1;
}
- return __syscall_sigprocmask (how, set, oset);
+ return INLINE_SYSCALL (sigprocmask, 3, how, set, oset);
}
weak_alias (__sigprocmask, sigprocmask)
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <signal.h>
#include <unistd.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_rt_sigqueueinfo (int, int, siginfo_t *);
info.si_uid = __getuid ();
info.si_value = val;
- return __syscall_rt_sigqueueinfo (pid, sig, &info);
+ return INLINE_SYSCALL (rt_sigqueueinfo, 3, pid, sig, &info);
}
weak_alias (__sigqueue, sigqueue)
#include <signal.h>
#include <unistd.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_sigsuspend (int, unsigned long int, unsigned long int);
extern int __syscall_rt_sigsuspend (const sigset_t *, size_t);
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
int saved_errno = errno;
- int result = __syscall_rt_sigsuspend (set, _NSIG / 8);
+ int result = INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
if (result >= 0 || errno != ENOSYS)
return result;
__libc_missing_rt_sigs = 1;
}
- return __syscall_sigsuspend (0, 0, set->__val[0]);
+ return INLINE_SYSCALL (sigsuspend, 3, 0, 0, set->__val[0]);
}
weak_alias (__sigsuspend, sigsuspend)
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 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
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <signal.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_rt_sigtimedwait (const sigset_t *, siginfo_t *,
const struct timespec *, size_t);
{
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
- return __syscall_rt_sigtimedwait (set, info, timeout, _NSIG / 8);
+ return INLINE_SYSCALL (rt_sigtimedwait, 4, set, info, timeout, _NSIG / 8);
}
weak_alias (__sigtimedwait, sigtimedwait)
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <signal.h>
#define __need_NULL
#include <stddef.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_rt_sigtimedwait (const sigset_t *, siginfo_t *,
const struct timespec *, size_t);
{
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
- return __syscall_rt_sigtimedwait (set, info, NULL, _NSIG / 8);
+ return INLINE_SYSCALL (rt_sigtimedwait, 4, set, info, NULL, _NSIG / 8);
}
weak_alias (__sigwaitinfo, sigwaitinfo)
--- /dev/null
+#include <sysdeps/unix/sysv/linux/i386/setregid.c>
--- /dev/null
+#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
s_llseek llseek _llseek 5 __sys_llseek
s_setgid setgid setgid 1 __syscall_setgid
s_setgroups setgroups setgroups 2 __syscall_setgroups
+s_setregid setregid setregid 2 __syscall_setregid
s_setresgid setresgid setresgid 3 __syscall_setresgid
s_setresuid setresuid setresuid 3 __syscall_setresuid
+s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
+s_ustat ustat ustat 2 __syscall_ustat
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
+sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
getresuid - getresuid 3 getresuid
getresgid - getresgid 3 getresuid
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
+s_ustat ustat ustat 2 __syscall_ustat
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
+sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
prctl EXTRA prctl 5 prctl
query_module EXTRA query_module 5 query_module
quotactl EXTRA quotactl 4 quotactl
-rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
-rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
-rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
-rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
-rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
-rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
-s_getcwd getcwd getcwd 2 __syscall_getcwd
-s_getdents getdents getdents 3 __getdents
-s_getpriority getpriority getpriority 2 __syscall_getpriority
-s_getresgid getresgid getresgid 3 __syscall_getresgid
-s_getresuid getresuid getresuid 3 __syscall_getresuid
-s_poll poll poll 3 __syscall_poll
-s_pread64 pread64 pread 5 __syscall_pread64
-s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
-s_reboot reboot reboot 3 __syscall_reboot
-s_sigaction sigaction sigaction 3 __syscall_sigaction
-s_sigpending sigpending sigpending 1 __syscall_sigpending
-s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
-s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
-s_sysctl sysctl _sysctl 1 __syscall__sysctl
-s_ustat ustat ustat 2 __syscall_ustat
sched_getp - sched_getparam 2 __sched_getparam sched_getparam
sched_gets - sched_getscheduler 1 __sched_getscheduler sched_getscheduler
sched_primax - sched_get_priority_max 1 __sched_get_priority_max sched_get_priority_max
setresuid EXTRA setresuid 3 __setresuid setresuid
setresgid EXTRA setresgid 3 setresgid
sigaltstack - sigaltstack 2 __sigaltstack sigaltstack
-sys_fstat fxstat fstat 2 __syscall_fstat
-sys_lstat lxstat lstat 2 __syscall_lstat
-sys_mknod xmknod mknod 3 __syscall_mknod
-sys_readv readv readv 3 __syscall_readv
-sys_stat xstat stat 2 __syscall_stat
-sys_writev writev writev 3 __syscall_writev
sysinfo EXTRA sysinfo 1 sysinfo
swapon - swapon 2 __swapon swapon
swapoff - swapoff 1 __swapoff swapoff
-/* sysctl - Read or write system information. Linux version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Read or write system information. Linux version.
+ Copyright (C) 1996, 1997, 1998 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
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <sys/sysctl.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
extern int __syscall__sysctl (struct __sysctl_args *args);
newlen: newlen
};
- return __syscall__sysctl (&args);
+ return INLINE_SYSCALL (_sysctl, 1, &args);
}
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <sys/ustat.h>
#include <sys/sysmacros.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
extern int __syscall_ustat (unsigned short int dev, struct ustat *ubuf);
/* We must convert the value to dev_t type used by the kernel. */
k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
- return __syscall_ustat (k_dev, ubuf);
+ return INLINE_SYSCALL (ustat, 2, k_dev, ubuf);
}
/* writev supports all Linux kernels >= 2.0.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 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 <sys/param.h>
#include <sys/uio.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern ssize_t __syscall_writev __P ((int, const struct iovec *, int));
static ssize_t __atomic_writev_replacement __P ((int, const struct iovec *,
int)) internal_function;
int errno_saved = errno;
ssize_t bytes_written;
- bytes_written = __syscall_writev (fd, vector, count);
+ bytes_written = INLINE_SYSCALL (writev, 3, fd, vector, count);
if (bytes_written >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
return bytes_written;
/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 95, 96, 97, 98 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 <sys/stat.h>
#include <sys/sysmacros.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_mknod (const char *, unsigned short int,
unsigned short int);
/* We must convert the value to dev_t type used by the kernel. */
k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
- return __syscall_mknod (path, mode, k_dev);
+ return INLINE_SYSCALL (mknod, 3, path, mode, k_dev);
}
weak_alias (__xmknod, _xmknod)
/* xstat using old-style Unix stat system call.
- Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1995, 1996, 1997, 1998 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 <sys/stat.h>
#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
#include <xstatconv.c>
extern int __syscall_stat (const char *, struct kernel_stat *);
int result;
if (vers == _STAT_VER_KERNEL)
- return __syscall_stat (name, (struct kernel_stat *) buf);
+ {
+ return INLINE_SYSCALL (stat, 2, name, (struct kernel_stat *) buf);
+ }
- result = __syscall_stat (name, &kbuf);
+ result = INLINE_SYSCALL (stat, 2, name, &kbuf);
if (result == 0)
result = xstat_conv (vers, &kbuf, buf);
/* xstat64 using old-style Unix stat system call.
- Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1995, 1996, 1997, 1998 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 <sys/stat.h>
#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
#include <xstatconv.c>
extern int __syscall_stat (const char *, struct kernel_stat *);
struct kernel_stat kbuf;
int result;
- result = __syscall_stat (name, &kbuf);
+ result = INLINE_SYSCALL (stat, 2, name, &kbuf);
if (result == 0)
result = xstat64_conv (vers, &kbuf, buf);