From 3d4d05dbadf098845328149e3fb0acc48c4ee207 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 19 Feb 2006 10:37:20 +0000 Subject: rename file and fix setting of errno --- libc/sysdeps/linux/alpha/Makefile.arch | 2 +- libc/sysdeps/linux/alpha/__syscall_error.c | 16 ++++++++++++++++ libc/sysdeps/linux/alpha/sysdep.c | 15 --------------- 3 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 libc/sysdeps/linux/alpha/__syscall_error.c delete mode 100644 libc/sysdeps/linux/alpha/sysdep.c (limited to 'libc/sysdeps/linux/alpha') diff --git a/libc/sysdeps/linux/alpha/Makefile.arch b/libc/sysdeps/linux/alpha/Makefile.arch index 4d33cef26..2a66bc1a4 100644 --- a/libc/sysdeps/linux/alpha/Makefile.arch +++ b/libc/sysdeps/linux/alpha/Makefile.arch @@ -5,7 +5,7 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -CSRC := sysdep.c +CSRC := __syscall_error.c SSRC := \ __longjmp.S brk.S bsd-_setjmp.S bsd-setjmp.S clone.S \ diff --git a/libc/sysdeps/linux/alpha/__syscall_error.c b/libc/sysdeps/linux/alpha/__syscall_error.c new file mode 100644 index 000000000..7c081f3b5 --- /dev/null +++ b/libc/sysdeps/linux/alpha/__syscall_error.c @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include + +/* This routine is jumped to by all the syscall handlers, to stash + an error number into errno. */ +int attribute_hidden __syscall_error (void) +{ + register int err_no __asm__("$0"); + __set_errno (err_no); + return -1; +} diff --git a/libc/sysdeps/linux/alpha/sysdep.c b/libc/sysdeps/linux/alpha/sysdep.c deleted file mode 100644 index cb3cb2639..000000000 --- a/libc/sysdeps/linux/alpha/sysdep.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2000-2006 Erik Andersen - * - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - */ - -#include - -/* This routine is jumped to by all the syscall handlers, to stash - an error number into errno. */ -int attribute_hidden __syscall_error (int err_no) -{ - __set_errno (err_no); - return -1; -} -- cgit v1.2.3