mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
Update.
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-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.
This commit is contained in:
parent
6c6270e0a9
commit
0dee67386c
130
ChangeLog
130
ChangeLog
@ -1,3 +1,113 @@
|
||||
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.
|
||||
@ -13,16 +123,16 @@
|
||||
* 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.
|
||||
|
22
NEWS
22
NEWS
@ -61,24 +61,26 @@ Version 2.1
|
||||
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.
|
||||
|
||||
|
13
db/Makefile
13
db/Makefile
@ -50,23 +50,14 @@ CFLAGS-hash_func.c := -Wno-unused
|
||||
# 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)
|
||||
|
@ -47,6 +47,7 @@ const char main_rcsid[] =
|
||||
#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"
|
||||
@ -82,6 +83,7 @@ static int cppDefined = 0; /* explicit path for C preprocessor */
|
||||
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",
|
||||
@ -296,6 +298,18 @@ open_output (const char *infile, const char *outfile)
|
||||
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)
|
||||
{
|
||||
@ -354,7 +368,8 @@ open_input (const char *infile, const char *define)
|
||||
perror ("pipe");
|
||||
exit (1);
|
||||
}
|
||||
switch (fork ())
|
||||
cpp_pid = fork ();
|
||||
switch (cpp_pid)
|
||||
{
|
||||
case 0:
|
||||
find_cpp ();
|
||||
@ -384,6 +399,32 @@ open_input (const char *infile, const char *define)
|
||||
}
|
||||
}
|
||||
|
||||
/* 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[] =
|
||||
{
|
||||
@ -454,6 +495,8 @@ c_output (const char *infile, const char *define, int extend,
|
||||
|
||||
if (extend && tell == ftell (fout))
|
||||
unlink (outfilename);
|
||||
close_input ();
|
||||
close_output (outfilename);
|
||||
}
|
||||
|
||||
void
|
||||
@ -620,6 +663,8 @@ h_output (const char *infile, const char *define, int extend,
|
||||
}
|
||||
|
||||
fprintf (fout, "\n#endif /* !_%s */\n", guard);
|
||||
close_input ();
|
||||
close_output (outfilename);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -750,6 +795,8 @@ s_output (int argc, const char *argv[], const char *infile, const char *define,
|
||||
}
|
||||
write_rest ();
|
||||
}
|
||||
close_input ();
|
||||
close_output (outfilename);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -787,6 +834,8 @@ l_output (const char *infile, const char *define, int extend,
|
||||
return;
|
||||
}
|
||||
write_stubs ();
|
||||
close_input ();
|
||||
close_output (outfilename);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -814,6 +863,8 @@ t_output (const char *infile, const char *define, int extend,
|
||||
return;
|
||||
}
|
||||
write_tables ();
|
||||
close_input ();
|
||||
close_output (outfilename);
|
||||
}
|
||||
|
||||
/* sample routine for the server template */
|
||||
@ -851,6 +902,8 @@ svc_output (const char *infile, const char *define, int extend,
|
||||
{
|
||||
unlink (outfilename);
|
||||
}
|
||||
close_input ();
|
||||
close_output (outfilename);
|
||||
}
|
||||
|
||||
|
||||
@ -893,6 +946,8 @@ clnt_output (const char *infile, const char *define, int extend,
|
||||
{
|
||||
unlink (outfilename);
|
||||
}
|
||||
close_input ();
|
||||
close_output (outfilename);
|
||||
}
|
||||
|
||||
static char *
|
||||
@ -995,6 +1050,7 @@ $(LDLIBS) \n\n");
|
||||
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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -27,7 +27,7 @@ const char *const _sys_siglist[] =
|
||||
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"),
|
||||
@ -46,8 +46,8 @@ const char *const _sys_siglist[] =
|
||||
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"),
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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
|
||||
@ -47,3 +47,7 @@
|
||||
#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)
|
||||
|
@ -17,9 +17,13 @@
|
||||
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 *);
|
||||
@ -41,5 +45,5 @@ __aio_sigqueue (sig, val)
|
||||
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);
|
||||
}
|
||||
|
@ -79,3 +79,33 @@ old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLI
|
||||
|
||||
# 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
|
||||
|
1
sysdeps/unix/sysv/linux/arm/setregid.c
Normal file
1
sysdeps/unix/sysv/linux/arm/setregid.c
Normal file
@ -0,0 +1 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/setregid.c>
|
1
sysdeps/unix/sysv/linux/arm/setreuid.c
Normal file
1
sysdeps/unix/sysv/linux/arm/setreuid.c
Normal file
@ -0,0 +1 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
|
@ -6,8 +6,40 @@ 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_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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -26,6 +26,9 @@
|
||||
#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 *);
|
||||
@ -38,9 +41,11 @@ __fxstat (int vers, int fd, struct stat *buf)
|
||||
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);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -22,6 +22,9 @@
|
||||
#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 *);
|
||||
@ -33,7 +36,7 @@ __fxstat64 (int vers, int fd, struct stat64 *buf)
|
||||
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);
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
|
||||
@ -83,7 +85,7 @@ __getcwd (char *buf, size_t size)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = __syscall_getcwd (path, alloc_size);
|
||||
retval = INLINE_SYSCALL (getcwd, 2, path, alloc_size);
|
||||
if (retval >= 0)
|
||||
{
|
||||
if (buf == NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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
|
||||
@ -17,6 +17,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <alloca.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
@ -24,19 +25,22 @@
|
||||
#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
|
||||
{
|
||||
@ -76,7 +80,7 @@ __getdirentries (int fd, char *buf, size_t nbytes, off_t *basep)
|
||||
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)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -19,6 +19,9 @@
|
||||
#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
|
||||
@ -35,7 +38,7 @@ getpriority (enum __priority_which which, int who)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = __syscall_getpriority ((int) which, who);
|
||||
res = INLINE_SYSCALL (getpriority, 2, (int) which, who);
|
||||
if (res >= 0)
|
||||
res = PZERO - res;
|
||||
return res;
|
||||
|
@ -16,11 +16,13 @@
|
||||
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
|
||||
|
||||
@ -31,14 +33,18 @@ int
|
||||
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>
|
||||
|
@ -16,11 +16,13 @@
|
||||
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
|
||||
|
||||
@ -31,14 +33,18 @@ int
|
||||
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>
|
||||
|
@ -1,6 +1,5 @@
|
||||
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
|
||||
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
/*
|
||||
@ -45,7 +47,7 @@ __real_chown (const char *file, uid_t owner, gid_t group)
|
||||
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;
|
||||
@ -64,7 +66,7 @@ __real_chown (const char *file, uid_t owner, gid_t group)
|
||||
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. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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
|
||||
@ -16,9 +16,11 @@
|
||||
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 *));
|
||||
@ -33,7 +35,7 @@ __getgroups (n, groups)
|
||||
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];
|
||||
|
55
sysdeps/unix/sysv/linux/i386/pread.c
Normal file
55
sysdeps/unix/sysv/linux/i386/pread.c
Normal file
@ -0,0 +1,55 @@
|
||||
/* 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>
|
60
sysdeps/unix/sysv/linux/i386/pread64.c
Normal file
60
sysdeps/unix/sysv/linux/i386/pread64.c
Normal file
@ -0,0 +1,60 @@
|
||||
/* 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>
|
55
sysdeps/unix/sysv/linux/i386/pwrite.c
Normal file
55
sysdeps/unix/sysv/linux/i386/pwrite.c
Normal file
@ -0,0 +1,55 @@
|
||||
/* 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>
|
57
sysdeps/unix/sysv/linux/i386/pwrite64.c
Normal file
57
sysdeps/unix/sysv/linux/i386/pwrite64.c
Normal file
@ -0,0 +1,57 @@
|
||||
/* 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>
|
@ -1,55 +0,0 @@
|
||||
/* 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)
|
@ -1,55 +0,0 @@
|
||||
/* 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)
|
@ -17,9 +17,11 @@
|
||||
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>
|
||||
|
||||
@ -35,13 +37,6 @@ setfsgid (gid_t gid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return __syscall_setfsgid (gid);
|
||||
}
|
||||
#else
|
||||
int
|
||||
setfsgid (gid_t gid)
|
||||
{
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
return INLINE_SYSCALL (setfsgid, 1, gid);
|
||||
}
|
||||
#endif
|
||||
|
@ -17,9 +17,11 @@
|
||||
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>
|
||||
|
||||
@ -35,13 +37,6 @@ setfsuid (uid_t uid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return __syscall_setfsuid (uid);
|
||||
}
|
||||
#else
|
||||
int
|
||||
setfsuid (uid_t uid)
|
||||
{
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
return INLINE_SYSCALL (setfsuid, 1, uid);
|
||||
}
|
||||
#endif
|
||||
|
@ -17,9 +17,11 @@
|
||||
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>
|
||||
|
||||
@ -35,6 +37,6 @@ __setgid (gid_t gid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return __syscall_setgid (gid);
|
||||
return INLINE_SYSCALL (setgid, 1, gid);
|
||||
}
|
||||
weak_alias (__setgid, setgid)
|
||||
|
@ -17,9 +17,12 @@
|
||||
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>
|
||||
|
||||
@ -45,5 +48,6 @@ setgroups (n, groups)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return __syscall_setgroups (n, kernel_groups);
|
||||
|
||||
return INLINE_SYSCALL (setgroups, 2, n, kernel_groups);
|
||||
}
|
||||
|
42
sysdeps/unix/sysv/linux/i386/setregid.c
Normal file
42
sysdeps/unix/sysv/linux/i386/setregid.c
Normal file
@ -0,0 +1,42 @@
|
||||
/* 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)
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <linux/posix_types.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <sys/syscall.h>
|
||||
#ifdef __NR_setresgid
|
||||
|
||||
@ -31,14 +32,14 @@ extern int __syscall_setresgid (__kernel_gid_t rgid, __kernel_gid_t egid,
|
||||
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
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <linux/posix_types.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <sys/syscall.h>
|
||||
#ifdef __NR_setresuid
|
||||
|
||||
@ -31,15 +32,15 @@ extern int __syscall_setresuid (__kernel_uid_t rgid, __kernel_uid_t egid,
|
||||
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
|
||||
|
42
sysdeps/unix/sysv/linux/i386/setreuid.c
Normal file
42
sysdeps/unix/sysv/linux/i386/setreuid.c
Normal file
@ -0,0 +1,42 @@
|
||||
/* 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)
|
@ -17,9 +17,11 @@
|
||||
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>
|
||||
|
||||
@ -35,6 +37,6 @@ __setuid (uid_t uid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return __syscall_setuid (uid);
|
||||
return INLINE_SYSCALL (setuid, 1, uid);
|
||||
}
|
||||
weak_alias (__setuid, setuid)
|
||||
|
@ -1,14 +1,5 @@
|
||||
# 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -26,6 +26,9 @@
|
||||
#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 *);
|
||||
@ -38,9 +41,11 @@ __lxstat (int vers, const char *name, struct stat *buf)
|
||||
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);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -22,6 +22,9 @@
|
||||
#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 *);
|
||||
@ -33,7 +36,7 @@ __lxstat64 (int vers, const char *name, struct stat64 *buf)
|
||||
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);
|
||||
|
||||
|
1
sysdeps/unix/sysv/linux/m68k/setregid.c
Normal file
1
sysdeps/unix/sysv/linux/m68k/setregid.c
Normal file
@ -0,0 +1 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/setregid.c>
|
1
sysdeps/unix/sysv/linux/m68k/setreuid.c
Normal file
1
sysdeps/unix/sysv/linux/m68k/setreuid.c
Normal file
@ -0,0 +1 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
|
@ -8,6 +8,38 @@ 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_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
|
||||
|
@ -41,9 +41,33 @@ getresgid - getresgid 3 getresgid
|
||||
# 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
|
||||
|
@ -20,12 +20,12 @@
|
||||
#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;
|
||||
@ -38,21 +38,16 @@ __poll (fds, nfds, timeout)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -5,3 +5,33 @@ s_llseek llseek _llseek 5 __sys_llseek
|
||||
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
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_pread
|
||||
@ -40,7 +42,7 @@ __pread (fd, buf, count, offset)
|
||||
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);
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_pread
|
||||
@ -40,8 +42,8 @@ __pread64 (fd, buf, count, offset)
|
||||
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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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
|
||||
@ -21,6 +21,9 @@
|
||||
#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
|
||||
@ -40,17 +43,12 @@ ptrace (enum __ptrace_request request, ...)
|
||||
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;
|
||||
}
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_pwrite
|
||||
@ -40,7 +42,7 @@ __pwrite (fd, buf, count, offset)
|
||||
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);
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_pwrite
|
||||
@ -40,8 +42,8 @@ __pwrite64 (fd, buf, count, offset)
|
||||
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);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -22,6 +22,9 @@
|
||||
#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;
|
||||
@ -44,7 +47,7 @@ __readv (fd, vector, count)
|
||||
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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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
|
||||
@ -16,13 +16,17 @@
|
||||
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);
|
||||
}
|
||||
|
@ -20,6 +20,9 @@
|
||||
#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. */
|
||||
@ -64,8 +67,8 @@ __sigaction (sig, act, oact)
|
||||
|
||||
/* 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)
|
||||
{
|
||||
@ -94,8 +97,8 @@ __sigaction (sig, act, oact)
|
||||
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;
|
||||
|
@ -22,7 +22,7 @@
|
||||
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"))
|
||||
|
@ -20,6 +20,9 @@
|
||||
#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);
|
||||
|
||||
@ -41,7 +44,7 @@ sigpending (set)
|
||||
/* 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;
|
||||
@ -50,5 +53,5 @@ sigpending (set)
|
||||
__libc_missing_rt_sigs = 1;
|
||||
}
|
||||
|
||||
return __syscall_sigpending (set);
|
||||
return INLINE_SYSCALL (sigpending, 1, set);
|
||||
}
|
||||
|
@ -20,6 +20,9 @@
|
||||
#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);
|
||||
@ -42,7 +45,8 @@ __sigprocmask (how, set, oset)
|
||||
/* 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;
|
||||
@ -51,6 +55,6 @@ __sigprocmask (how, set, oset)
|
||||
__libc_missing_rt_sigs = 1;
|
||||
}
|
||||
|
||||
return __syscall_sigprocmask (how, set, oset);
|
||||
return INLINE_SYSCALL (sigprocmask, 3, how, set, oset);
|
||||
}
|
||||
weak_alias (__sigprocmask, sigprocmask)
|
||||
|
@ -16,9 +16,13 @@
|
||||
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 *);
|
||||
|
||||
|
||||
@ -39,6 +43,6 @@ __sigqueue (pid, sig, val)
|
||||
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)
|
||||
|
@ -20,6 +20,9 @@
|
||||
#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);
|
||||
|
||||
@ -41,7 +44,7 @@ __sigsuspend (set)
|
||||
/* 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;
|
||||
@ -50,6 +53,6 @@ __sigsuspend (set)
|
||||
__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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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
|
||||
@ -16,8 +16,12 @@
|
||||
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);
|
||||
|
||||
@ -31,6 +35,6 @@ __sigtimedwait (set, info, timeout)
|
||||
{
|
||||
/* 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)
|
||||
|
@ -16,10 +16,14 @@
|
||||
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);
|
||||
|
||||
@ -32,6 +36,6 @@ __sigwaitinfo (set, info)
|
||||
{
|
||||
/* 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)
|
||||
|
1
sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c
Normal file
1
sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c
Normal file
@ -0,0 +1 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/setregid.c>
|
1
sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c
Normal file
1
sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c
Normal file
@ -0,0 +1 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
|
@ -5,6 +5,38 @@ s_getpagesize getpagesize getpagesize 0 __syscall_getpagesize
|
||||
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
|
||||
|
@ -33,3 +33,33 @@ socketpair - socketpair 4 __socketpair socketpair
|
||||
|
||||
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
|
||||
|
@ -36,28 +36,6 @@ pipe - pipe 1 __pipe pipe
|
||||
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
|
||||
@ -74,12 +52,6 @@ setpgid - setpgid 2 __setpgid setpgid
|
||||
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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -17,8 +17,11 @@
|
||||
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);
|
||||
|
||||
@ -36,5 +39,5 @@ sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
|
||||
newlen: newlen
|
||||
};
|
||||
|
||||
return __syscall__sysctl (&args);
|
||||
return INLINE_SYSCALL (_sysctl, 1, &args);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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.
|
||||
|
||||
@ -17,9 +17,12 @@
|
||||
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);
|
||||
|
||||
@ -31,5 +34,5 @@ ustat (dev_t 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);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -22,6 +22,9 @@
|
||||
#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;
|
||||
@ -44,7 +47,7 @@ __writev (fd, vector, count)
|
||||
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;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -22,6 +22,9 @@
|
||||
#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);
|
||||
|
||||
@ -42,7 +45,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
|
||||
/* 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)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -26,6 +26,9 @@
|
||||
#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 *);
|
||||
@ -38,9 +41,11 @@ __xstat (int vers, const char *name, struct stat *buf)
|
||||
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);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -22,6 +22,9 @@
|
||||
#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 *);
|
||||
@ -33,7 +36,7 @@ __xstat64 (int vers, const char *name, struct stat64 *buf)
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user