diff options
Diffstat (limited to 'lib/libc/arch')
-rw-r--r-- | lib/libc/arch/i386/SYS.h | 19 | ||||
-rw-r--r-- | lib/libc/arch/m68k/SYS.h | 16 | ||||
-rw-r--r-- | lib/libc/arch/m88k/SYS.h | 24 | ||||
-rw-r--r-- | lib/libc/arch/m88k/gen/modf.c | 16 | ||||
-rw-r--r-- | lib/libc/arch/mips/SYS.h | 22 | ||||
-rw-r--r-- | lib/libc/arch/mvme88k/SYS.h | 24 | ||||
-rw-r--r-- | lib/libc/arch/powerpc/SYS.h | 11 | ||||
-rw-r--r-- | lib/libc/arch/powerpc/gen/modf.c | 16 | ||||
-rw-r--r-- | lib/libc/arch/sparc/SYS.h | 7 | ||||
-rw-r--r-- | lib/libc/arch/sparc64/SYS.h | 6 | ||||
-rw-r--r-- | lib/libc/arch/vax/SYS.h | 8 |
11 files changed, 26 insertions, 143 deletions
diff --git a/lib/libc/arch/i386/SYS.h b/lib/libc/arch/i386/SYS.h index a4d0fe9d6aa..90f6beab34d 100644 --- a/lib/libc/arch/i386/SYS.h +++ b/lib/libc/arch/i386/SYS.h @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: SYS.h,v 1.9 2001/09/20 20:52:09 millert Exp $ + * $OpenBSD: SYS.h,v 1.10 2002/02/19 19:39:36 millert Exp $ */ #include <machine/asm.h> @@ -51,11 +51,7 @@ #ifdef _THREAD_SAFE /* Use _thread_sys_{syscall} when compiled with -D_THREAD_SAFE */ -#ifdef __STDC__ #define SYSENTRY(x) ENTRY(_thread_sys_ ## x) -#else /* ! __STDC__ */ -#define SYSENTRY(x) ENTRY(_thread_sys_/**/x) -#endif /* ! __STDC__ */ #else /* ! _THREAD_SAFE */ /* Use {syscall} when compiling without -D_THREAD_SAFE */ #define SYSENTRY(x) ENTRY(x) @@ -65,28 +61,15 @@ /* 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__ */ #endif /* WEAK_ALIASES */ -#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__ */ /* perform a syscall */ #define _SYSCALL_NOERROR(x,y) \ diff --git a/lib/libc/arch/m68k/SYS.h b/lib/libc/arch/m68k/SYS.h index 2ed3760422c..bba1c3f53e0 100644 --- a/lib/libc/arch/m68k/SYS.h +++ b/lib/libc/arch/m68k/SYS.h @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: SYS.h,v 1.7 2001/09/21 14:23:05 millert Exp $ + * $OpenBSD: SYS.h,v 1.8 2002/02/19 19:39:36 millert Exp $ */ #include <sys/syscall.h> @@ -42,19 +42,11 @@ #define _IMMEDIATE_ # -#ifdef __STDC__ -# define __ENTRY(p,x) ENTRY(p##x) -# define __DO_SYSCALL(x) \ +#define __ENTRY(p,x) ENTRY(p##x) +#define __DO_SYSCALL(x) \ movl _IMMEDIATE_ SYS_##x, d0; \ trap _IMMEDIATE_ 0 -# define __LABEL2(p,x) _C_LABEL(p##x) -#else -# define __ENTRY(p,x) ENTRY(p/**/x) -# define __DO_SYSCALL(x) \ - movl _IMMEDIATE_ SYS_/**/x, d0; \ - trap _IMMEDIATE_ 0 -# define __LABEL2(p,x) _C_LABEL(p/**/x) -#endif +#define __LABEL2(p,x) _C_LABEL(p##x) /* perform a syscall */ diff --git a/lib/libc/arch/m88k/SYS.h b/lib/libc/arch/m88k/SYS.h index 7dbbe09d978..e49ff210324 100644 --- a/lib/libc/arch/m88k/SYS.h +++ b/lib/libc/arch/m88k/SYS.h @@ -1,4 +1,4 @@ -/* * $OpenBSD: SYS.h,v 1.3 2001/09/20 20:52:09 millert Exp $*/ +/* * $OpenBSD: SYS.h,v 1.4 2002/02/19 19:39:36 millert Exp $*/ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -41,8 +41,6 @@ #include <sys/syscall.h> #include <machine/asm.h> -#ifdef __STDC__ - #define _SYSCALL(x,y) align 8; \ ENTRY(x); \ ld r10,r31,32; \ @@ -60,26 +58,6 @@ or r13,r0, SYS_ ## y; \ tb0 0,r0,128; or r0,r0,r0;jmp r1 -#else /* !__STDC__ */ - -#define _SYSCALL(x,y) align 8; \ - ENTRY(x); \ - ld r10,r31,32; \ - ld r11,r31,36; \ - ld r12,r31,40; \ - or r13,r0, SYS_/**/y; \ - tb0 0, r0, 128; \ - br cerror -#define SYSCALL(x) _SYSCALL(x,x) -#define RSYSCALL(x) SYSCALL(x); \ - jmp r1 -#define PSEUDO(x,y) _SYSCALL(x,y); \ - jmp r1 -#define PSEUDO_NOERROR(x,y) ENTRY(x); \ - or r13,r0, SYS_/**/y; \ - tb0 0,r0,128; or r0,r0,r0; jmp r1 -#endif /* !__STDC__ */ - #define ASMSTR .asciz .globl cerror diff --git a/lib/libc/arch/m88k/gen/modf.c b/lib/libc/arch/m88k/gen/modf.c index f896fe392ed..74bcf56ef78 100644 --- a/lib/libc/arch/m88k/gen/modf.c +++ b/lib/libc/arch/m88k/gen/modf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: modf.c,v 1.3 2002/02/16 21:27:21 millert Exp $ */ +/* $OpenBSD: modf.c,v 1.4 2002/02/19 19:39:36 millert Exp $ */ /* @(#)s_modf.c 5.1 93/09/24 */ /* * ==================================================== @@ -12,7 +12,7 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: modf.c,v 1.3 2002/02/16 21:27:21 millert Exp $"; +static char rcsid[] = "$OpenBSD: modf.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* @@ -253,18 +253,10 @@ extern float __kernel_tanf(float,float,int); extern int __kernel_rem_pio2f(float*,float*,int,int,int,const int*); #endif /* _MATH_PRIVATE_H_ */ -#ifdef __STDC__ static const double one = 1.0; -#else -static double one = 1.0; -#endif -#ifdef __STDC__ - double modf(double x, double *iptr) -#else - double modf(x, iptr) - double x,*iptr; -#endif +double +modf(double x, double *iptr) { int32_t i0,i1,j0; u_int32_t i; diff --git a/lib/libc/arch/mips/SYS.h b/lib/libc/arch/mips/SYS.h index 89ff3f8e1b0..5a5fb83dc4a 100644 --- a/lib/libc/arch/mips/SYS.h +++ b/lib/libc/arch/mips/SYS.h @@ -33,29 +33,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: SYS.h,v 1.7 2001/09/20 20:52:09 millert Exp $ + * $OpenBSD: SYS.h,v 1.8 2002/02/19 19:39:36 millert Exp $ */ #include <sys/syscall.h> #include <machine/asm.h> -#ifdef __STDC__ -# define __ENTRY(p,x) ENTRY(p ## x) -# define __DO_SYSCALL(x) \ +#define __ENTRY(p,x) ENTRY(p ## x) +#define __DO_SYSCALL(x) \ li v0,SYS_ ## x; \ syscall -# define __LEAF2(p,x) LEAF(p ## x) -# 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) LEAF(p/**/x) -# define __END2(p,x) END(p/**/x) -# define __CLABEL2(p,x) _C_LABEL(p/**/x) -#endif +#define __LEAF2(p,x) LEAF(p ## x) +#define __END2(p,x) END(p ## x) +#define __CLABEL2(p,x) _C_LABEL(p ## x) #define __PSEUDO_NOERROR(p,x,y) \ __LEAF2(p,x); \ diff --git a/lib/libc/arch/mvme88k/SYS.h b/lib/libc/arch/mvme88k/SYS.h index 29f81db8f31..74fc735d5f5 100644 --- a/lib/libc/arch/mvme88k/SYS.h +++ b/lib/libc/arch/mvme88k/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.3 2001/09/20 20:52:10 millert Exp $ */ +/* $OpenBSD: SYS.h,v 1.4 2002/02/19 19:39:36 millert Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -41,8 +41,6 @@ #include <sys/syscall.h> #include <machine/asm.h> -#ifdef __STDC__ - #define _SYSCALL(x,y) align 8; \ ENTRY(x); \ ld r10,r31,32; \ @@ -60,26 +58,6 @@ or r13,r0, SYS_ ## y; \ tb0 0,r0,128; or r0,r0,r0;jmp r1 -#else /* !__STDC__ */ - -#define _SYSCALL(x,y) align 8; \ - ENTRY(x); \ - ld r10,r31,32; \ - ld r11,r31,36; \ - ld r12,r31,40; \ - or r13,r0, SYS_/**/y; \ - tb0 0, r0, 128; \ - br cerror -#define SYSCALL(x) _SYSCALL(x,x) -#define RSYSCALL(x) SYSCALL(x); \ - jmp r1 -#define PSEUDO(x,y) _SYSCALL(x,y); \ - jmp r1 -#define PSEUDO_NOERROR(x,y) ENTRY(x); \ - or r13,r0, SYS_/**/y; \ - tb0 0,r0,128; or r0,r0,r0; jmp r1 -#endif /* !__STDC__ */ - #define ASMSTR .asciz .globl cerror diff --git a/lib/libc/arch/powerpc/SYS.h b/lib/libc/arch/powerpc/SYS.h index d51ae24b978..fafee734273 100644 --- a/lib/libc/arch/powerpc/SYS.h +++ b/lib/libc/arch/powerpc/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.10 2001/09/20 21:13:27 drahn Exp $ */ +/* $OpenBSD: SYS.h,v 1.11 2002/02/19 19:39:36 millert Exp $ */ /*- * Copyright (c) 1994 * Andrew Cagney. All rights reserved. @@ -44,19 +44,12 @@ #include "machine/asm.h" -#ifdef __STDC__ #define _CONCAT(x,y) x##y #define PSEUDO_PREFIX(p,x,y) .extern cerror ; \ ENTRY(p##x) \ li 0, SYS_##y ; \ /* sc */ -#else /* !__STDC__ */ -#define _CONCAT(x,y) x/**/y -#define PSEUDO_PREFIX(p,x,y) .extern 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/powerpc/gen/modf.c b/lib/libc/arch/powerpc/gen/modf.c index 73cf1bc85b8..f968ee9856b 100644 --- a/lib/libc/arch/powerpc/gen/modf.c +++ b/lib/libc/arch/powerpc/gen/modf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: modf.c,v 1.5 2002/02/16 21:27:21 millert Exp $ */ +/* $OpenBSD: modf.c,v 1.6 2002/02/19 19:39:36 millert Exp $ */ /* @(#)s_modf.c 5.1 93/09/24 */ /* * ==================================================== @@ -12,7 +12,7 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: modf.c,v 1.5 2002/02/16 21:27:21 millert Exp $"; +static char rcsid[] = "$OpenBSD: modf.c,v 1.6 2002/02/19 19:39:36 millert Exp $"; #endif /* @@ -253,18 +253,10 @@ extern float __kernel_tanf(float,float,int); extern int __kernel_rem_pio2f(float*,float*,int,int,int,const int*); #endif /* _MATH_PRIVATE_H_ */ -#ifdef __STDC__ static const double one = 1.0; -#else -static double one = 1.0; -#endif -#ifdef __STDC__ - double modf(double x, double *iptr) -#else - double modf(x, iptr) - double x,*iptr; -#endif +double +modf(double x, double *iptr) { int32_t i0,i1,j0; u_int32_t i; diff --git a/lib/libc/arch/sparc/SYS.h b/lib/libc/arch/sparc/SYS.h index cfaefa3805c..8970b18317e 100644 --- a/lib/libc/arch/sparc/SYS.h +++ b/lib/libc/arch/sparc/SYS.h @@ -34,20 +34,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: SYS.h,v 1.9 2001/09/20 20:52:10 millert Exp $ + * $OpenBSD: SYS.h,v 1.10 2002/02/19 19:39:36 millert Exp $ */ #include <machine/asm.h> #include <sys/syscall.h> #include <machine/trap.h> -#ifdef __STDC__ #define _CAT(x,y) x##y #define __ENTRY(p,x) ENTRY(p##x) -#else -#define _CAT(x,y) x/**/y -#define __ENTRY(p,x) ENTRY(p/**/x) -#endif /* * ERROR branches to cerror. This is done with a macro so that I can diff --git a/lib/libc/arch/sparc64/SYS.h b/lib/libc/arch/sparc64/SYS.h index 467194f0e47..a89eb59398a 100644 --- a/lib/libc/arch/sparc64/SYS.h +++ b/lib/libc/arch/sparc64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.6 2002/01/03 01:11:10 art Exp $ */ +/* $OpenBSD: SYS.h,v 1.7 2002/02/19 19:39:36 millert Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -45,11 +45,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 ace50176650..170e23eb712 100644 --- a/lib/libc/arch/vax/SYS.h +++ b/lib/libc/arch/vax/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.6 2001/09/20 20:52:10 millert Exp $ */ +/* $OpenBSD: SYS.h,v 1.7 2002/02/19 19:39:36 millert Exp $ */ /* $NetBSD: SYS.h,v 1.4 1997/05/02 18:15:32 kleink Exp $ */ /* @@ -37,15 +37,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 cerror; \ |