diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/s_pread64.S | 9 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/s_pwrite64.S | 9 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sigaction.c | 21 |
3 files changed, 31 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/s_pread64.S b/sysdeps/unix/sysv/linux/i386/s_pread64.S index 22ce79b3f0..9e14aa815f 100644 --- a/sysdeps/unix/sysv/linux/i386/s_pread64.S +++ b/sysdeps/unix/sysv/linux/i386/s_pread64.S @@ -18,6 +18,7 @@ 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.*/ @@ -25,6 +26,13 @@ .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 @@ -41,5 +49,6 @@ ENTRY (__syscall_pread64) cmpl $-4095, %eax /* Check %eax for error. */ jae syscall_error /* Jump to error handler if error. */ ret /* Return to caller. */ +#endif PSEUDO_END (__syscall_pread64) diff --git a/sysdeps/unix/sysv/linux/i386/s_pwrite64.S b/sysdeps/unix/sysv/linux/i386/s_pwrite64.S index 6a1987b72e..a21fe2f99f 100644 --- a/sysdeps/unix/sysv/linux/i386/s_pwrite64.S +++ b/sysdeps/unix/sysv/linux/i386/s_pwrite64.S @@ -18,6 +18,7 @@ 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.*/ @@ -25,6 +26,13 @@ .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 @@ -41,5 +49,6 @@ ENTRY (__syscall_pwrite64) cmpl $-4095, %eax /* Check %eax for error. */ jae syscall_error /* Jump to error handler if error. */ ret /* Return to caller. */ +#endif PSEUDO_END (__syscall_pwrite64) diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index 90d61a08a1..05d187c432 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -47,19 +47,24 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact) /* First try the RT signals. */ if (__libc_have_rt_sigs) { - struct sigaction nact; + struct sigaction nact, *nactp; - nact.sa_handler = act->sa_handler; - memcpy (&nact.sa_mask, &act->sa_mask, sizeof (sigset_t)); - nact.sa_flags = act->sa_flags; + if (act) + { + nact.sa_handler = act->sa_handler; + memcpy (&nact.sa_mask, &act->sa_mask, sizeof (sigset_t)); + nact.sa_flags = act->sa_flags; - nact.sa_restorer = ((act->sa_flags & SA_NOMASK) - ? &&restore_nomask : &&restore); + nact.sa_restorer = ((act->sa_flags & SA_NOMASK) + ? &&restore_nomask : &&restore); + nactp = &nact; + } + else + nactp = NULL; /* 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, &nact, oact, - _NSIG / (8 * sizeof (long int))); + result = __syscall_rt_sigaction (sig, nactp, oact, _NSIG / 8); if (result >= 0 || errno != ENOSYS) return result; |