From 11e165ebcdcd1b58f8e6a12cd9b7e39bed159566 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 26 Aug 2004 23:36:04 +0000 Subject: Partial patch from Alexandre Oliva: - adjust licensing terms of sources for crt*.o - change the stat ABI to speed it up, matching changes in the kernel - assorted bug-fixes, improvements and updates in the FR-V port etc. --- libc/sysdeps/linux/frv/bits/syscalls.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libc/sysdeps/linux/frv/bits/syscalls.h') diff --git a/libc/sysdeps/linux/frv/bits/syscalls.h b/libc/sysdeps/linux/frv/bits/syscalls.h index 44dba866b..23219d602 100644 --- a/libc/sysdeps/linux/frv/bits/syscalls.h +++ b/libc/sysdeps/linux/frv/bits/syscalls.h @@ -9,9 +9,6 @@ * programs. */ #include -#ifndef __set_errno -# define __set_errno(val) ((*__errno_location ()) = (val)) -#endif #ifndef SYS_ify # define SYS_ify(syscall_name) (__NR_##syscall_name) #endif @@ -19,7 +16,7 @@ #ifndef __ASSEMBLER__ /* user-visible error numbers are in the range -1 - -4095: see */ -#ifdef _LIBC +#if defined _LIBC && !defined __set_errno # define __syscall_return(type, res) \ do { \ unsigned long __sr2 = (res); \ @@ -43,6 +40,10 @@ do { \ } while (0) #endif +#ifndef __set_errno +# define __set_errno(val) ((*__errno_location ()) = (val)) +#endif + /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ #define _syscall0(type,name) \ -- cgit v1.2.3