mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-05 21:00:05 +00:00
* hurd/hurdstartup.c (_hurd_startup): Use new
exec_startup_get_info RPC from exec_startup.defs in place of old exec_startup from exec.defs. Remove kludge to guess user entry and phdr locations, since the new RPC gives us that info. * sysdeps/generic/_strerror.c: Undo last change.
This commit is contained in:
parent
f44f9c33df
commit
c14e4c326d
@ -1,6 +1,13 @@
|
||||
Wed Oct 25 14:23:35 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* hurd/hurdstartup.c (_hurd_startup): Use new
|
||||
exec_startup_get_info RPC from exec_startup.defs
|
||||
in place of old exec_startup from exec.defs. Remove kludge to
|
||||
guess user entry and phdr locations, since the new RPC gives us
|
||||
that info.
|
||||
|
||||
* stdio/stdio.h (sys_errlist, _sys_errlist): Declare const.
|
||||
* sysdeps/generic/_strerror.c: Undo last change.
|
||||
|
||||
* sysdeps/unix/sysv/linux/stat.c: New file.
|
||||
* sysdeps/unix/sysv/linux/fstat.c: New file.
|
||||
|
@ -31,9 +31,6 @@ _strerror_internal (errnum, buf, buflen)
|
||||
char *buf;
|
||||
size_t buflen;
|
||||
{
|
||||
extern const char *const _sys_errlist[];
|
||||
extern const int _sys_nerr;
|
||||
|
||||
if (errnum < 0 || errnum > _sys_nerr)
|
||||
{
|
||||
int len = __snprintf (buf, buflen, _("Unknown error %d"), errnum);
|
||||
|
@ -70,8 +70,8 @@ for unix_function in \
|
||||
dup2 lstat mkdir rmdir readlink symlink rename swapon \
|
||||
access select getgroups setgroups \
|
||||
getitimer setitimer \
|
||||
getdomainname/getdomain=bsd/bsd4.4 \
|
||||
setdomainname/setdomain=bsd/bsd4.4 \
|
||||
getdomainname:getdomain=bsd/bsd4.4 \
|
||||
setdomainname:setdomain=bsd/bsd4.4 \
|
||||
fchdir=bsd/bsd4.4 \
|
||||
profil=bsd readv=bsd writev=bsd \
|
||||
getpriority setpriority \
|
||||
@ -85,7 +85,7 @@ do
|
||||
unix_srcdir=common
|
||||
eval "unix_syscall=`echo $unix_function | \
|
||||
sed -e 's@=\(.*\)$@ unix_srcdir=\1@' \
|
||||
-e 's@/\([^=/]*\)$@ unix_srcname=\1@'`"
|
||||
-e 's@:\(.*\)@ unix_srcname=\1@'`"
|
||||
test -z "$unix_srcname" && unix_srcname=$unix_syscall
|
||||
|
||||
unix_implementor=none
|
||||
|
@ -32,8 +32,8 @@ C_LABEL(__curbrk)
|
||||
#endif
|
||||
|
||||
.text
|
||||
.globl C_SYMBOL_NAME(syscall_error)
|
||||
|
||||
SYSCALL_ERROR_HANDLER
|
||||
ENTRY (__brk)
|
||||
movl %ebx, %edx
|
||||
movl $SYS_ify(brk), %eax
|
||||
|
@ -18,7 +18,8 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
.globl syscall_error
|
||||
.text
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
ENTRY (__mmap)
|
||||
|
||||
|
@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
|
||||
.globl C_SYMBOL_NAME(__curbrk)
|
||||
|
||||
.text
|
||||
.globl C_SYMBOL_NAME(syscall_error)
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
ENTRY (__sbrk)
|
||||
|
||||
@ -53,7 +53,7 @@ ENTRY (__sbrk)
|
||||
movl C_SYMBOL_NAME(__curbrk), %ebx
|
||||
movl %ebx, %eax
|
||||
#endif
|
||||
|
||||
|
||||
addl 4(%esp), %ebx
|
||||
cmpl %ebx, %eax
|
||||
je .L2
|
||||
|
@ -22,7 +22,8 @@ Cambridge, MA 02139, USA. */
|
||||
#define P(a, b) P2(a, b)
|
||||
#define P2(a, b) a##b
|
||||
|
||||
.globl syscall_error
|
||||
.text
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
/* The socket-oriented system calls are handled unusally in Linux.
|
||||
They are all gated through the single `socketcall' system call number.
|
||||
|
@ -18,14 +18,14 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
.globl syscall_error
|
||||
.text
|
||||
SYSCALL_ERROR_HANDLER /* Define error handler for PIC. */
|
||||
ENTRY (syscall)
|
||||
popl %ecx /* Pop return address into %ecx. */
|
||||
popl %eax /* Pop syscall number into %eax. */
|
||||
pushl %ecx /* Push back return address. */
|
||||
DO_CALL (5) /* Frob the args and do the system call. */
|
||||
movl (%esp), %ecx
|
||||
pushl %ecx
|
||||
PUSHARGS_5 /* Save register contents. */
|
||||
_DOARGS_5(36) /* Load arguments. */
|
||||
movl 16(%esp), %eax /* Load syscall number into %eax. */
|
||||
int $0x80 /* Do the system call. */
|
||||
POPARGS_5 /* Restore register contents. */
|
||||
testl %eax, %eax /* Check %eax for error. */
|
||||
jl JUMPTARGET(syscall_error) /* Jump to error handler if negative. */
|
||||
ret /* Return to caller. */
|
||||
|
@ -44,8 +44,7 @@ Cambridge, MA 02139, USA. */
|
||||
.text; \
|
||||
SYSCALL_ERROR_HANDLER \
|
||||
ENTRY (name) \
|
||||
movl $SYS_ify (syscall_name), %eax; \
|
||||
DO_CALL (args); \
|
||||
DO_CALL (args, syscall_name); \
|
||||
testl %eax, %eax; \
|
||||
jl syscall_error;
|
||||
|
||||
@ -62,7 +61,7 @@ syscall_error: \
|
||||
movl errno@GOT(%ecx), %ecx; \
|
||||
movl %eax, (%ecx); \
|
||||
movl $-1, %eax; \
|
||||
ret
|
||||
ret;
|
||||
#endif
|
||||
|
||||
/* We define our own ENTRY macro because the alignment should be 16 for
|
||||
@ -119,9 +118,10 @@ syscall_error: \
|
||||
i386 and i486 processors though. */
|
||||
|
||||
#undef DO_CALL
|
||||
#define DO_CALL(args) \
|
||||
#define DO_CALL(args, syscall_name) \
|
||||
PUSHARGS_##args \
|
||||
DOARGS_##args \
|
||||
movl $SYS_ify (syscall_name), %eax; \
|
||||
int $0x80 \
|
||||
POPARGS_##args
|
||||
|
||||
|
@ -19,21 +19,20 @@ Cambridge, MA 02139, USA. */
|
||||
#include <sysdep.h>
|
||||
#include <errnos.h>
|
||||
|
||||
.globl syscall_error
|
||||
.text
|
||||
SYSCALL_ERROR_HANDLER /* Error handler for PIC. */
|
||||
ENTRY (__xmknod)
|
||||
popl %ecx /* Pop return address into %eax. */
|
||||
popl %edx /* Pop version number into %edx. */
|
||||
pushl %ecx /* Push back the return address. */
|
||||
|
||||
movl $SYS_ify(mknod), %eax
|
||||
/* Load syscall number for prev_stat in %eax. */
|
||||
cmpl $1, %edx /* Version 1 xstat call? */
|
||||
je .L1 /* Yes, do syscall. */
|
||||
|
||||
movl $-EINVAL, %eax /* Load error code into %eax. */
|
||||
jmp .L2
|
||||
|
||||
.L1: DO_CALL (3) /* Do the syscall. */
|
||||
.L1: DO_CALL (3, mknod) /* Do the syscall. */
|
||||
|
||||
movl (%esp), %ecx
|
||||
testl %eax, %eax /* Check for error. */
|
||||
|
@ -19,23 +19,20 @@ Cambridge, MA 02139, USA. */
|
||||
#include <sysdep.h>
|
||||
#include <errnos.h>
|
||||
|
||||
#define SYS_expand(name) SYS_ify(name)
|
||||
|
||||
.globl syscall_error
|
||||
.text
|
||||
SYSCALL_ERROR_HANDLER /* Error handler for PIC. */
|
||||
ENTRY (__xstat)
|
||||
popl %ecx /* Pop return address into %eax. */
|
||||
popl %edx /* Pop version number into %edx. */
|
||||
pushl %ecx /* Push back the return address. */
|
||||
|
||||
movl $SYS_expand(stat), %eax
|
||||
/* Load syscall number for prev_stat in %eax. */
|
||||
cmpl $1, %edx /* Version 1 xstat call? */
|
||||
je .L1 /* Yes, do syscall. */
|
||||
|
||||
movl $-EINVAL, %eax /* Load error code into %eax. */
|
||||
jmp .L2
|
||||
|
||||
.L1: DO_CALL (2) /* Do the syscall. */
|
||||
.L1: DO_CALL (2, stat) /* Do the syscall. */
|
||||
|
||||
movl (%esp), %ecx
|
||||
testl %eax, %eax /* Check for error. */
|
||||
|
@ -1,24 +0,0 @@
|
||||
/* Copyright (C) 1995 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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
SYSCALL__ (sigaction, 3)
|
||||
ret
|
||||
|
||||
weak_alias (__sigaction, sigaction)
|
54
sysdeps/unix/sysv/linux/sigaction.h
Normal file
54
sysdeps/unix/sysv/linux/sigaction.h
Normal file
@ -0,0 +1,54 @@
|
||||
/* The proper definitions for Linux's sigaction.
|
||||
Copyright (C) 1993, 1994, 1995 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. */
|
||||
|
||||
/* Structure describing the action to be taken when a signal arrives. */
|
||||
struct sigaction
|
||||
{
|
||||
/* Signal handler. */
|
||||
__sighandler_t sa_handler;
|
||||
|
||||
/* Additional set of signals to be blocked. */
|
||||
__sigset_t sa_mask;
|
||||
|
||||
/* Special flags. */
|
||||
unsigned long sa_flags;
|
||||
|
||||
/* Restore handler. */
|
||||
void (*sa_restorer) __P ((void));
|
||||
};
|
||||
|
||||
/* Bits in `sa_flags'. */
|
||||
#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
|
||||
#ifdef __USE_MISC
|
||||
#define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
|
||||
#define SA_RESTART 0x10000000 /* Don't restart syscall on signal return. */
|
||||
#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
|
||||
#define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
|
||||
its handler is being executed. */
|
||||
#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
|
||||
|
||||
/* Some aliases for the SA_ constants. */
|
||||
#define SA_NOMASK SA_NODEFER
|
||||
#define SA_ONESHOT SA_RESETHAND
|
||||
#endif
|
||||
|
||||
/* Values for the HOW argument to `sigprocmask'. */
|
||||
#define SIG_BLOCK 0 /* Block signals. */
|
||||
#define SIG_UNBLOCK 1 /* Unblock signals. */
|
||||
#define SIG_SETMASK 2 /* Set the set of blocked signals. */
|
@ -1,8 +0,0 @@
|
||||
#include <sysdeps/unix/sysv/signal.S>
|
||||
|
||||
/* Used in siginterrupt() */
|
||||
|
||||
.data
|
||||
.globl _sigintr
|
||||
_sigintr:
|
||||
.long 0
|
@ -25,34 +25,10 @@ Cambridge, MA 02139, USA. */
|
||||
#include <asm/unistd.h>
|
||||
|
||||
/* Among the system calls defined there are
|
||||
_dup2
|
||||
_mkdir
|
||||
_rmdir
|
||||
_readlink
|
||||
_symlink
|
||||
_rename
|
||||
_swapon
|
||||
_access
|
||||
_select
|
||||
_getgroups
|
||||
_setgroups
|
||||
_getitimer
|
||||
_setitimer
|
||||
_setdomainname
|
||||
_getrlimit
|
||||
_setrlimit
|
||||
_getrusage
|
||||
_getpriority
|
||||
_setpriority
|
||||
_truncate
|
||||
_ftruncate
|
||||
_setpgid
|
||||
_fchmod
|
||||
_fchdir
|
||||
_fchown
|
||||
_setregid
|
||||
_setreuid
|
||||
_vhangup
|
||||
_readv
|
||||
_writev
|
||||
(This is a hack for the autoconf mechanism. Don't change a single
|
||||
character, esp white spaces, unless you know what you are doing!) */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user