diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/arch/amd64/SYS.h | 12 | ||||
-rw-r--r-- | lib/libc/arch/arm/SYS.h | 15 | ||||
-rw-r--r-- | lib/libc/arch/i386/SYS.h | 15 | ||||
-rw-r--r-- | lib/libc/arch/m88k/SYS.h | 6 | ||||
-rw-r--r-- | lib/libc/arch/mips64/SYS.h | 17 | ||||
-rw-r--r-- | lib/libc/arch/powerpc/SYS.h | 10 | ||||
-rw-r--r-- | lib/libc/arch/sh/SYS.h | 19 | ||||
-rw-r--r-- | lib/libc/arch/sparc/SYS.h | 6 | ||||
-rw-r--r-- | lib/libc/arch/sparc64/SYS.h | 6 | ||||
-rw-r--r-- | lib/libc/arch/vax/SYS.h | 13 |
10 files changed, 10 insertions, 109 deletions
diff --git a/lib/libc/arch/amd64/SYS.h b/lib/libc/arch/amd64/SYS.h index a7864ffa2ad..f5710a879c4 100644 --- a/lib/libc/arch/amd64/SYS.h +++ b/lib/libc/arch/amd64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.8 2012/08/22 17:19:34 pascal Exp $ */ +/* $OpenBSD: SYS.h,v 1.9 2014/06/04 20:13:49 matthew Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -38,22 +38,12 @@ #include <machine/asm.h> #include <sys/syscall.h> -#ifdef __STDC__ #define SYSTRAP(x) movl $(SYS_ ## x),%eax; movq %rcx, %r10; syscall #define SYSENTRY(x) \ ENTRY(_thread_sys_ ## x); \ .weak _C_LABEL(x); \ _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x) -#else - -#define SYSTRAP(x) movl $(SYS_/**/x),%eax; movq %rcx, %r10; syscall -#define SYSENTRY(x) \ - ENTRY(_thread_sys_/**/x); \ - .weak _C_LABEL(x); \ - _C_LABEL(x) = _C_LABEL(_thread_sys_/**/x) - -#endif #define CERROR _C_LABEL(__cerror) #define _CERROR _C_LABEL(___cerror) diff --git a/lib/libc/arch/arm/SYS.h b/lib/libc/arch/arm/SYS.h index 2bb82f1199f..f62bd14665d 100644 --- a/lib/libc/arch/arm/SYS.h +++ b/lib/libc/arch/arm/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.6 2013/12/24 05:31:13 deraadt Exp $ */ +/* $OpenBSD: SYS.h,v 1.7 2014/06/04 20:13:49 matthew Exp $ */ /* $NetBSD: SYS.h,v 1.8 2003/08/07 16:42:02 agc Exp $ */ /*- @@ -39,27 +39,14 @@ #include <sys/syscall.h> #include <arm/swi.h> -#ifdef __STDC__ #define SYSENTRY(x) \ .weak _C_LABEL(x); \ _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x); \ ENTRY(_thread_sys_ ## x) -#else /* ! __STDC__ */ -#define SYSENTRY(x) \ - .weak _C_LABEL(x); \ - _C_LABEL(x) = _C_LABEL(_thread_sys_/**/x); \ - ENTRY(_thread_sys_/**/x) -#endif /* ! __STDC__ */ -#ifdef __STDC__ #define SYSTRAP(x) \ ldr r12, =SYS_ ## x; \ swi SWI_OS_NETBSD | SYS_ ## x -#else -#define SYSTRAP(x) \ - ldr r12, =SYS_/**/x; \ - swi SWI_OS_NETBSD | SYS_/**/x -#endif #define CERROR _C_LABEL(__cerror) #define _CERROR _C_LABEL(___cerror) diff --git a/lib/libc/arch/i386/SYS.h b/lib/libc/arch/i386/SYS.h index 40428b0619c..cc199d6bf3d 100644 --- a/lib/libc/arch/i386/SYS.h +++ b/lib/libc/arch/i386/SYS.h @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: SYS.h,v 1.18 2012/08/22 17:19:34 pascal Exp $ + * $OpenBSD: SYS.h,v 1.19 2014/06/04 20:13:49 matthew Exp $ */ #include <machine/asm.h> @@ -45,27 +45,14 @@ /* Use both _thread_sys_{syscall} and [weak] {syscall}. */ -#ifdef __STDC__ #define SYSENTRY(x) \ ENTRY(_thread_sys_ ## x); \ .weak _C_LABEL(x); \ _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x) -#else /* ! __STDC__ */ -#define SYSENTRY(x) \ - ENTRY(_thread_sys_/**/x); \ - .weak _C_LABEL(x); \ - _C_LABEL(x) = _C_LABEL(_thread_sys_/**/x) -#endif /* ! __STDC__ */ -#ifdef __STDC__ #define __DO_SYSCALL(x) \ movl $(SYS_ ## x),%eax; \ int $0x80 -#else /* ! __STDC__ */ -#define __DO_SYSCALL(x) \ - movl $(SYS_/**/x),%eax; \ - int $0x80 -#endif /* ! __STDC__ */ #define CERROR _C_LABEL(__cerror) #define _CERROR _C_LABEL(___cerror) diff --git a/lib/libc/arch/m88k/SYS.h b/lib/libc/arch/m88k/SYS.h index ded09283f1e..9d6de9d755e 100644 --- a/lib/libc/arch/m88k/SYS.h +++ b/lib/libc/arch/m88k/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.17 2013/04/11 19:15:21 miod Exp $*/ +/* $OpenBSD: SYS.h,v 1.18 2014/06/04 20:13:49 matthew Exp $*/ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -37,11 +37,7 @@ #include <sys/syscall.h> #include <machine/asm.h> -#ifdef __STDC__ #define __CONCAT(p,x) p##x -#else -#define __CONCAT(p,x) p/**/x -#endif #define __ENTRY(p,x) ENTRY(__CONCAT(p,x)) #define __END(p,x) END(__CONCAT(p,x)) #define __SYSCALLNAME(p,x) __CONCAT(p,x) diff --git a/lib/libc/arch/mips64/SYS.h b/lib/libc/arch/mips64/SYS.h index d4d7f754932..885ca700cec 100644 --- a/lib/libc/arch/mips64/SYS.h +++ b/lib/libc/arch/mips64/SYS.h @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: SYS.h,v 1.5 2011/04/04 12:42:39 guenther Exp $ + * $OpenBSD: SYS.h,v 1.6 2014/06/04 20:13:49 matthew Exp $ */ #include <sys/syscall.h> @@ -38,7 +38,6 @@ #define CERROR _C_LABEL(__cerror) #define _CERROR _C_LABEL(___cerror) -#ifdef __STDC__ # define __ENTRY(p,x) ENTRY(p ## x) # define __DO_SYSCALL(x) \ @@ -51,20 +50,6 @@ # define __END2(p,x) END(p ## x) # define __CLABEL2(p,x) _C_LABEL(p ## x) -#else -# define __ENTRY(p,x) ENTRY(p/**/x) - -# define __DO_SYSCALL(x) \ - li v0,SYS_/**/x; \ - syscall - -# define __LEAF2(p,x,sz) LEAF(p/**/x, sz) \ - WEAK_ALIAS(x, p/**/x); - -# define __END2(p,x) END(p/**/x) - -# define __CLABEL2(p,x) _C_LABEL(p/**/x) -#endif #define __PSEUDO_NOERROR(p,x,y) \ __LEAF2(p,x, 0); \ diff --git a/lib/libc/arch/powerpc/SYS.h b/lib/libc/arch/powerpc/SYS.h index 67915bc56c0..218c49f5878 100644 --- a/lib/libc/arch/powerpc/SYS.h +++ b/lib/libc/arch/powerpc/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.14 2010/10/01 05:02:19 guenther Exp $ */ +/* $OpenBSD: SYS.h,v 1.15 2014/06/04 20:13:49 matthew Exp $ */ /*- * Copyright (c) 1994 * Andrew Cagney. All rights reserved. @@ -44,19 +44,11 @@ #include "machine/asm.h" -#ifdef __STDC__ #define _CONCAT(x,y) x##y #define PSEUDO_PREFIX(p,x,y) .extern _ASM_LABEL(__cerror) ; \ ENTRY(p##x) \ li 0, SYS_##y ; \ /* sc */ -#else /* !__STDC__ */ -#define _CONCAT(x,y) x/**/y -#define PSEUDO_PREFIX(p,x,y) .extern _ASM_LABEL(__cerror) ; \ - ENTRY(p/**/x) \ - li 0, SYS_/**/y ; \ - /* sc */ -#endif /* !__STDC__ */ #define PSEUDO_SUFFIX cmpwi 0, 0 ; \ beqlr+ ; \ b PIC_PLT(_ASM_LABEL(__cerror)) diff --git a/lib/libc/arch/sh/SYS.h b/lib/libc/arch/sh/SYS.h index 81dcfb9873f..4a9f22ac32c 100644 --- a/lib/libc/arch/sh/SYS.h +++ b/lib/libc/arch/sh/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.4 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: SYS.h,v 1.5 2014/06/04 20:13:49 matthew Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -37,17 +37,10 @@ #include <machine/asm.h> #include <sys/syscall.h> -#ifdef __STDC__ #define SYSENTRY(x) \ WEAK_ALIAS(x,_thread_sys_ ## x); \ ENTRY(_thread_sys_ ## x) -#else -#define SYSENTRY(x) \ - WEAK_ALIAS(x,_thread_sys_/**/x); \ - ENTRY(_thread_sys_/**/x) -#endif -#ifdef __STDC__ #define SYSTRAP(x) \ mov.l 903f, r0; \ .word 0xc380; /* trapa #0x80; */ \ @@ -56,16 +49,6 @@ .align 2; \ 903: .long (SYS_ ## x); \ 904: -#else -#define SYSTRAP(x) \ - mov.l 903f, r0; \ - trapa #0x80; \ - bra 904f; \ - nop; \ - .align 2; \ - 903: .long (SYS_/**/x); \ - 904: -#endif #define CERROR _C_LABEL(__cerror) #define _CERROR _C_LABEL(___cerror) diff --git a/lib/libc/arch/sparc/SYS.h b/lib/libc/arch/sparc/SYS.h index d44e0797fe4..f010285062d 100644 --- a/lib/libc/arch/sparc/SYS.h +++ b/lib/libc/arch/sparc/SYS.h @@ -30,18 +30,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: SYS.h,v 1.15 2012/09/04 19:08:13 deraadt Exp $ + * $OpenBSD: SYS.h,v 1.16 2014/06/04 20:13:49 matthew Exp $ */ #include <machine/asm.h> #include <sys/syscall.h> #include <machine/trap.h> -#ifdef __STDC__ #define _CAT(x,y) x##y -#else -#define _CAT(x,y) x/**/y -#endif #define __ENTRY(p,x) ENTRY(_CAT(p,x)) ; .weak x ; x = _CAT(p,x) diff --git a/lib/libc/arch/sparc64/SYS.h b/lib/libc/arch/sparc64/SYS.h index 7f167c9de56..f47a4d47da7 100644 --- a/lib/libc/arch/sparc64/SYS.h +++ b/lib/libc/arch/sparc64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.10 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: SYS.h,v 1.11 2014/06/04 20:13:49 matthew Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -41,11 +41,7 @@ #include <sys/syscall.h> #include <machine/trap.h> -#ifdef __STDC__ #define _CAT(x,y) x##y -#else -#define _CAT(x,y) x/**/y -#endif #define __ENTRY(p,x) ENTRY(_CAT(p,x)) ; .weak x; x = _CAT(p,x) diff --git a/lib/libc/arch/vax/SYS.h b/lib/libc/arch/vax/SYS.h index 32404db4134..816c700f2ff 100644 --- a/lib/libc/arch/vax/SYS.h +++ b/lib/libc/arch/vax/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.15 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: SYS.h,v 1.16 2014/06/04 20:13:49 matthew Exp $ */ /* $NetBSD: SYS.h,v 1.4 1997/05/02 18:15:32 kleink Exp $ */ /* @@ -33,15 +33,9 @@ #include <machine/asm.h> #include <sys/syscall.h> -#ifdef __STDC__ #define _CAT(x,y) x##y #define __ENTRY(p,x) ENTRY(p##x,0) #define __DO_SYSCALL(x) chmk $ SYS_ ## x -#else -#define _CAT(x,y) x/**/y -#define __ENTRY(p,x) ENTRY(p/**/x,0) -#define __DO_SYSCALL(x) chmk $ SYS_/**/x -#endif #define __SYSCALL(p,x,y) \ err: jmp _C_LABEL(__cerror); \ @@ -61,13 +55,8 @@ __DO_SYSCALL(y); \ ret -#ifdef __STDC__ #define __ALIAS(prefix,name) \ WEAK_ALIAS(name,prefix##name); -#else -#define __ALIAS(prefix,name) \ - WEAK_ALIAS(name,prefix/**/name); -#endif /* * For the thread_safe versions, we prepend _thread_sys_ to the function |