diff options
author | 2002-02-19 19:39:35 +0000 | |
---|---|---|
committer | 2002-02-19 19:39:35 +0000 | |
commit | e7beb4a7d58a6a0955c07ef9465f5caa3383f928 (patch) | |
tree | a90c75bb4a04ab98987b06850cbdffd6c1903e17 /lib/libc | |
parent | Every command should have a manual page. (diff) | |
download | wireguard-openbsd-e7beb4a7d58a6a0955c07ef9465f5caa3383f928.tar.xz wireguard-openbsd-e7beb4a7d58a6a0955c07ef9465f5caa3383f928.zip |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'lib/libc')
59 files changed, 87 insertions, 778 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; \ diff --git a/lib/libc/compat-43/creat.c b/lib/libc/compat-43/creat.c index e99660ea370..4a536fce7d0 100644 --- a/lib/libc/compat-43/creat.c +++ b/lib/libc/compat-43/creat.c @@ -32,19 +32,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: creat.c,v 1.3 1997/07/25 20:29:57 mickey Exp $"; +static char *rcsid = "$OpenBSD: creat.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <fcntl.h> int -#ifdef __STDC__ creat(const char *path, mode_t mode) -#else -creat(path, mode) - char *path; - mode_t mode; -#endif { return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)); } diff --git a/lib/libc/compat-43/gethostid.c b/lib/libc/compat-43/gethostid.c index 17feea9d0f1..31a1fab8431 100644 --- a/lib/libc/compat-43/gethostid.c +++ b/lib/libc/compat-43/gethostid.c @@ -32,19 +32,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: gethostid.c,v 1.3 1997/07/25 20:29:58 mickey Exp $"; +static char *rcsid = "$OpenBSD: gethostid.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> #include <sys/sysctl.h> -#ifdef __STDC__ long gethostid(void) -#else -long -gethostid() -#endif { int mib[2]; size_t size; diff --git a/lib/libc/compat-43/killpg.c b/lib/libc/compat-43/killpg.c index 2be8dcc6f5d..ce10d9c78e9 100644 --- a/lib/libc/compat-43/killpg.c +++ b/lib/libc/compat-43/killpg.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: killpg.c,v 1.3 1997/07/25 20:29:58 mickey Exp $"; +static char *rcsid = "$OpenBSD: killpg.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -43,13 +43,7 @@ static char *rcsid = "$OpenBSD: killpg.c,v 1.3 1997/07/25 20:29:58 mickey Exp $" * Backwards-compatible killpg(). */ int -#ifdef __STDC__ killpg(pid_t pgid, int sig) -#else -killpg(pgid, sig) - pid_t pgid; - int sig; -#endif { if (pgid == 1) { errno = ESRCH; diff --git a/lib/libc/compat-43/setpgrp.c b/lib/libc/compat-43/setpgrp.c index cb1d6a71d80..7592e56ea4b 100644 --- a/lib/libc/compat-43/setpgrp.c +++ b/lib/libc/compat-43/setpgrp.c @@ -32,19 +32,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: setpgrp.c,v 1.3 1997/07/25 20:29:59 mickey Exp $"; +static char *rcsid = "$OpenBSD: setpgrp.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> #include <unistd.h> int -#ifdef __STDC__ setpgrp(pid_t pid, pid_t pgid) -#else -setpgrp(pid, pgid) - pid_t pid, pgid; -#endif { return(setpgid(pid, pgid)); } diff --git a/lib/libc/compat-43/setrgid.c b/lib/libc/compat-43/setrgid.c index 20540d0affa..1ce12ce86ac 100644 --- a/lib/libc/compat-43/setrgid.c +++ b/lib/libc/compat-43/setrgid.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: setrgid.c,v 1.7 2002/02/16 21:27:21 millert Exp $"; +static char *rcsid = "$OpenBSD: setrgid.c,v 1.8 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -43,12 +43,7 @@ __warn_references(setrgid, "warning: this program uses setrgid(), which is depre extern int __setregid(gid_t, gid_t); int -#ifdef __STDC__ setrgid(gid_t rgid) -#else -setrgid(rgid) - gid_t rgid; -#endif { return (__setregid(rgid, (gid_t)-1)); } diff --git a/lib/libc/compat-43/setruid.c b/lib/libc/compat-43/setruid.c index b4b85cf7267..78d7372e791 100644 --- a/lib/libc/compat-43/setruid.c +++ b/lib/libc/compat-43/setruid.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: setruid.c,v 1.7 2002/02/16 21:27:21 millert Exp $"; +static char *rcsid = "$OpenBSD: setruid.c,v 1.8 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -43,12 +43,7 @@ __warn_references(setruid, "warning: this program uses setruid(), which is depre extern int __setreuid(uid_t, uid_t); int -#ifdef __STDC__ setruid(uid_t ruid) -#else -setruid(ruid) - uid_t ruid; -#endif { return (__setreuid(ruid, (uid_t)-1)); } diff --git a/lib/libc/crypt/bcrypt.c b/lib/libc/crypt/bcrypt.c index f3ea849f006..dec0093dd8c 100644 --- a/lib/libc/crypt/bcrypt.c +++ b/lib/libc/crypt/bcrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcrypt.c,v 1.15 2002/02/16 21:27:21 millert Exp $ */ +/* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ /* * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> @@ -97,16 +97,8 @@ const static u_int8_t index_64[128] = }; #define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)]) -#ifdef __STDC__ static void decode_base64(u_int8_t *buffer, u_int16_t len, u_int8_t *data) -#else -static void -decode_base64(buffer, len, data) - u_int8_t *buffer; - u_int16_t len; - u_int8_t *data; -#endif { u_int8_t *bp = buffer; u_int8_t *p = data; @@ -140,17 +132,8 @@ decode_base64(buffer, len, data) } } -#ifdef __STDC__ static void encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr) -#else -static void -encode_salt(salt, csalt, clen, logr) - char *salt; - u_int8_t *csalt; - u_int16_t clen; - u_int8_t logr; -#endif { salt[0] = '$'; salt[1] = BCRYPT_VERSION; @@ -166,14 +149,8 @@ encode_salt(salt, csalt, clen, logr) seems sensible. */ -#ifdef __STDC__ char * bcrypt_gensalt(u_int8_t log_rounds) -#else -char * -bcrypt_gensalt(log_rounds) - u_int8_t log_rounds; -#endif { u_int8_t csalt[BCRYPT_MAXSALT]; u_int16_t i; @@ -296,16 +273,8 @@ bcrypt(key, salt) return encrypted; } -#ifdef __STDC__ static void encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len) -#else -static void -encode_base64(buffer, data, len) - u_int8_t *buffer; - u_int8_t *data; - u_int16_t len; -#endif { u_int8_t *bp = buffer; u_int8_t *p = data; diff --git a/lib/libc/crypt/blowfish.c b/lib/libc/crypt/blowfish.c index 695fc00a6af..8be04a6463a 100644 --- a/lib/libc/crypt/blowfish.c +++ b/lib/libc/crypt/blowfish.c @@ -1,4 +1,4 @@ -/* $OpenBSD: blowfish.c,v 1.15 2001/01/04 21:45:30 todd Exp $ */ +/* $OpenBSD: blowfish.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ /* * Blowfish block cipher for OpenBSD * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> @@ -402,16 +402,8 @@ Blowfish_initstate(c) } -#ifdef __STDC__ u_int32_t Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, u_int16_t *current) -#else -u_int32_t -Blowfish_stream2word(data, databytes, current) - const u_int8_t *data; - u_int16_t databytes; - u_int16_t *current; -#endif { u_int8_t i; u_int16_t j; @@ -430,16 +422,8 @@ Blowfish_stream2word(data, databytes, current) return temp; } -#if __STDC__ void Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes) -#else -void -Blowfish_expand0state(c, key, keybytes) - blf_ctx *c; - const u_int8_t *key; - u_int16_t keybytes; -#endif { u_int16_t i; u_int16_t j; @@ -476,19 +460,9 @@ Blowfish_expand0state(c, key, keybytes) } -#if __STDC__ void Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes, const u_int8_t *key, u_int16_t keybytes) -#else -void -Blowfish_expandstate(c, data, databytes, key, keybytes) - blf_ctx *c; - const u_int8_t *data; - u_int16_t databytes; - const u_int8_t *key; - u_int16_t keybytes; -#endif { u_int16_t i; u_int16_t j; @@ -529,16 +503,8 @@ Blowfish_expandstate(c, data, databytes, key, keybytes) } -#if __STDC__ void blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len) -#else -void -blf_key(c, k, len) - blf_ctx *c; - const u_int8_t *k; - u_int16_t len; -#endif { /* Initialize S-boxes and subkeys with Pi */ Blowfish_initstate(c); @@ -547,16 +513,8 @@ blf_key(c, k, len) Blowfish_expand0state(c, k, len); } -#if __STDC__ void blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks) -#else -void -blf_enc(c, data, blocks) - blf_ctx *c; - u_int32_t *data; - u_int16_t blocks; -#endif { u_int32_t *d; u_int16_t i; @@ -568,16 +526,8 @@ blf_enc(c, data, blocks) } } -#if __STDC__ void blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks) -#else -void -blf_dec(c, data, blocks) - blf_ctx *c; - u_int32_t *data; - u_int16_t blocks; -#endif { u_int32_t *d; u_int16_t i; @@ -589,16 +539,8 @@ blf_dec(c, data, blocks) } } -#if __STDC__ void blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len) -#else -void -blf_ecb_encrypt(c, data, len) - blf_ctx *c; - u_int8_t *data; - u_int32_t len; -#endif { u_int32_t l, r; u_int32_t i; @@ -619,16 +561,8 @@ blf_ecb_encrypt(c, data, len) } } -#if __STDC__ void blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len) -#else -void -blf_ecb_decrypt(c, data, len) - blf_ctx *c; - u_int8_t *data; - u_int32_t len; -#endif { u_int32_t l, r; u_int32_t i; @@ -649,17 +583,8 @@ blf_ecb_decrypt(c, data, len) } } -#if __STDC__ void blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len) -#else -void -blf_cbc_encrypt(c, iv, data, len) - blf_ctx *c; - u_int8_t *iv; - u_int8_t *data; - u_int32_t len; -#endif { u_int32_t l, r; u_int32_t i, j; @@ -683,17 +608,8 @@ blf_cbc_encrypt(c, iv, data, len) } } -#if __STDC__ void blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len) -#else -void -blf_cbc_decrypt(c, iva, data, len) - blf_ctx *c; - u_int8_t *iva; - u_int8_t *data; - u_int32_t len; -#endif { u_int32_t l, r; u_int8_t *iv; diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c index 5749b3fada8..701551c3705 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -32,36 +32,18 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: err.c,v 1.4 1997/07/25 20:30:01 mickey Exp $"; +static char rcsid[] = "$OpenBSD: err.c,v 1.5 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <err.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif __dead void -#ifdef __STDC__ _err(int eval, const char *fmt, ...) -#else -_err(va_alist) - va_dcl -#endif { va_list ap; -#ifdef __STDC__ - va_start(ap, fmt); -#else - int eval; - const char *fmt; - va_start(ap); - eval = va_arg(ap, int); - fmt = va_arg(ap, const char *); -#endif + va_start(ap, fmt); _verr(eval, fmt, ap); va_end(ap); } diff --git a/lib/libc/gen/errx.c b/lib/libc/gen/errx.c index 8f80294af8d..9b109de9039 100644 --- a/lib/libc/gen/errx.c +++ b/lib/libc/gen/errx.c @@ -32,36 +32,18 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: errx.c,v 1.3 1997/07/25 20:30:02 mickey Exp $"; +static char rcsid[] = "$OpenBSD: errx.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <err.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif __dead void -#ifdef __STDC__ _errx(int eval, const char *fmt, ...) -#else -_errx(va_alist) - va_dcl -#endif { va_list ap; -#ifdef __STDC__ - va_start(ap, fmt); -#else - int eval; - const char *fmt; - va_start(ap); - eval = va_arg(ap, int); - fmt = va_arg(ap, const char *); -#endif + va_start(ap, fmt); _verrx(eval, fmt, ap); va_end(ap); } diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index 6f42fa3c18a..9341d4f4c4d 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: exec.c,v 1.11 2000/08/22 18:46:04 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: exec.c,v 1.12 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -44,34 +44,18 @@ static char rcsid[] = "$OpenBSD: exec.c,v 1.11 2000/08/22 18:46:04 deraadt Exp $ #include <string.h> #include <stdio.h> #include <paths.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif extern char **environ; int -#ifdef __STDC__ execl(const char *name, const char *arg, ...) -#else -execl(name, arg, va_alist) - const char *name; - const char *arg; - va_dcl -#endif { va_list ap; char **argv; int n; -#ifdef __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; while (va_arg(ap, char *) != NULL) n++; @@ -81,11 +65,7 @@ execl(name, arg, va_alist) errno = ENOMEM; return (-1); } -#ifdef __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; argv[0] = (char *)arg; while ((argv[n] = va_arg(ap, char *)) != NULL) @@ -95,24 +75,13 @@ execl(name, arg, va_alist) } int -#ifdef __STDC__ execle(const char *name, const char *arg, ...) -#else -execle(name, arg, va_alist) - const char *name; - const char *arg; - va_dcl -#endif { va_list ap; char **argv, **envp; int n; -#ifdef __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; while (va_arg(ap, char *) != NULL) n++; @@ -122,11 +91,7 @@ execle(name, arg, va_alist) errno = ENOMEM; return (-1); } -#ifdef __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; argv[0] = (char *)arg; while ((argv[n] = va_arg(ap, char *)) != NULL) @@ -137,24 +102,13 @@ execle(name, arg, va_alist) } int -#ifdef __STDC__ execlp(const char *name, const char *arg, ...) -#else -execlp(name, arg, va_alist) - const char *name; - const char *arg; - va_dcl -#endif { va_list ap; char **argv; int n; -#ifdef __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; while (va_arg(ap, char *) != NULL) n++; @@ -164,11 +118,7 @@ execlp(name, arg, va_alist) errno = ENOMEM; return (-1); } -#ifdef __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; argv[0] = (char *)arg; while ((argv[n] = va_arg(ap, char *)) != NULL) diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c index 53bf7965a37..065bc51e1ef 100644 --- a/lib/libc/gen/fnmatch.c +++ b/lib/libc/gen/fnmatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fnmatch.c,v 1.8 2002/02/16 21:27:22 millert Exp $ */ +/* $OpenBSD: fnmatch.c,v 1.9 2002/02/19 19:39:36 millert Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94"; #else -static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.8 2002/02/16 21:27:22 millert Exp $"; +static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.9 2002/02/19 19:39:36 millert Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -165,15 +165,7 @@ fnmatch(pattern, string, flags) } static int -#ifdef __STDC__ rangematch(const char *pattern, char test, int flags, char **newp) -#else -rangematch(pattern, test, flags, newp) - char *pattern; - char test; - int flags; - char **newp; -#endif { int negate, ok; char c, c2; diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index aa071665213..0ddc32e44b4 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -33,7 +33,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getpwent.c,v 1.23 2002/02/16 21:27:22 millert Exp $"; +static char rcsid[] = "$OpenBSD: getpwent.c,v 1.24 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -746,12 +746,7 @@ pwnam_netgrp: } struct passwd * -#ifdef __STDC__ getpwuid(uid_t uid) -#else -getpwuid(uid) - uid_t uid; -#endif { DBT key; char bf[sizeof(_pw_keynum) + 1]; diff --git a/lib/libc/gen/setdomainname.c b/lib/libc/gen/setdomainname.c index 815ab68a197..068a0e859b1 100644 --- a/lib/libc/gen/setdomainname.c +++ b/lib/libc/gen/setdomainname.c @@ -32,21 +32,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: setdomainname.c,v 1.4 1998/05/13 08:50:59 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: setdomainname.c,v 1.5 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> #include <sys/sysctl.h> -#ifdef __STDC__ int setdomainname(const char *name, size_t namelen) -#else -int -setdomainname(name, namelen) - char *name; - size_t namelen; -#endif { int mib[2]; diff --git a/lib/libc/gen/sethostname.c b/lib/libc/gen/sethostname.c index cfadd83be91..26a3cc533f4 100644 --- a/lib/libc/gen/sethostname.c +++ b/lib/libc/gen/sethostname.c @@ -32,21 +32,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: sethostname.c,v 1.4 1998/05/13 08:51:00 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: sethostname.c,v 1.5 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> #include <sys/sysctl.h> -#ifdef __STDC__ int sethostname(const char *name, size_t namelen) -#else -int -sethostname(name, namelen) - char *name; - size_t namelen; -#endif { int mib[2]; diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c index 228a046560d..f5e2fb08cc7 100644 --- a/lib/libc/gen/setmode.c +++ b/lib/libc/gen/setmode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setmode.c,v 1.10 2002/02/16 21:27:23 millert Exp $ */ +/* $OpenBSD: setmode.c,v 1.11 2002/02/19 19:39:36 millert Exp $ */ /* $NetBSD: setmode.c,v 1.15 1997/02/07 22:21:06 christos Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)setmode.c 8.2 (Berkeley) 3/25/94"; #else -static char rcsid[] = "$OpenBSD: setmode.c,v 1.10 2002/02/16 21:27:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: setmode.c,v 1.11 2002/02/19 19:39:36 millert Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -86,13 +86,7 @@ static void dumpmode(BITCMD *); * bits) followed by a '+' (set bits). */ mode_t -#ifdef __STDC__ getmode(const void *bbox, mode_t omode) -#else -getmode(bbox, omode) - const void *bbox; - mode_t omode; -#endif { register const BITCMD *set; register mode_t clrval, newmode, value; diff --git a/lib/libc/gen/setproctitle.c b/lib/libc/gen/setproctitle.c index 7d16d03e795..fd23dbdab3e 100644 --- a/lib/libc/gen/setproctitle.c +++ b/lib/libc/gen/setproctitle.c @@ -30,7 +30,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: setproctitle.c,v 1.8 2001/11/06 19:21:40 art Exp $"; +static char rcsid[] = "$OpenBSD: setproctitle.c,v 1.9 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -41,25 +41,14 @@ static char rcsid[] = "$OpenBSD: setproctitle.c,v 1.8 2001/11/06 19:21:40 art Ex #include <stdio.h> #include <stdlib.h> #include <string.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #define MAX_PROCTITLE 2048 extern char *__progname; /* Program name, from crt0. */ void -#ifdef __STDC__ setproctitle(const char *fmt, ...) -#else -setproctitle(fmt, va_alist) - const char *fmt; - va_dcl -#endif { static struct ps_strings *ps; va_list ap; @@ -67,11 +56,7 @@ setproctitle(fmt, va_alist) static char buf[MAX_PROCTITLE], *bufp = buf; size_t used; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif if (fmt != NULL) { used = snprintf(buf, MAX_PROCTITLE, "%s: ", __progname); if (used >= MAX_PROCTITLE) diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index dcfc0b9ac01..a10ecf37702 100644 --- a/lib/libc/gen/syslog.c +++ b/lib/libc/gen/syslog.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: syslog.c,v 1.15 2002/02/18 00:07:56 millert Exp $"; +static char rcsid[] = "$OpenBSD: syslog.c,v 1.16 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -49,12 +49,7 @@ static char rcsid[] = "$OpenBSD: syslog.c,v 1.15 2002/02/18 00:07:56 millert Exp #include <string.h> #include <time.h> #include <unistd.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif static struct syslog_data sdata = SYSLOG_DATA_INIT; @@ -70,22 +65,11 @@ static void connectlog_r(struct syslog_data *); * print message on log file; output is intended for syslogd(8). */ void -#ifdef __STDC__ syslog(int pri, const char *fmt, ...) -#else -syslog(pri, fmt, va_alist) - int pri; - char *fmt; - va_dcl -#endif { va_list ap; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif vsyslog(pri, fmt, ap); va_end(ap); } @@ -136,23 +120,11 @@ setlogmask(pmask) /* Reentrant version of syslog, i.e. syslog_r() */ void -#ifdef __STDC__ syslog_r(int pri, struct syslog_data *data, const char *fmt, ...) -#else -syslog_r(pri, data, fmt, va_alist) - int pri; - struct syslog_data *data; - char *fmt; - va_dcl -#endif { va_list ap; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif vsyslog_r(pri, data, fmt, ap); va_end(ap); } diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c index c494c1c1965..6f0d2ebd593 100644 --- a/lib/libc/gen/unvis.c +++ b/lib/libc/gen/unvis.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: unvis.c,v 1.6 1997/07/25 20:30:05 mickey Exp $"; +static char rcsid[] = "$OpenBSD: unvis.c,v 1.7 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -56,14 +56,7 @@ static char rcsid[] = "$OpenBSD: unvis.c,v 1.6 1997/07/25 20:30:05 mickey Exp $" * unvis - decode characters previously encoded by vis */ int -#ifdef __STDC__ unvis(char *cp, char c, int *astate, int flag) -#else -unvis(cp, c, astate, flag) - char *cp; - char c; - int *astate, flag; -#endif { if (flag & UNVIS_END) { diff --git a/lib/libc/gen/verr.c b/lib/libc/gen/verr.c index a95590f7bcc..512d2565b7e 100644 --- a/lib/libc/gen/verr.c +++ b/lib/libc/gen/verr.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: verr.c,v 1.2 1996/08/19 08:27:30 tholo Exp $"; +static char rcsid[] = "$OpenBSD: verr.c,v 1.3 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <err.h> @@ -40,12 +40,7 @@ static char rcsid[] = "$OpenBSD: verr.c,v 1.2 1996/08/19 08:27:30 tholo Exp $"; #include <stdio.h> #include <stdlib.h> #include <string.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif extern char *__progname; /* Program name, from crt0. */ diff --git a/lib/libc/gen/verrx.c b/lib/libc/gen/verrx.c index 6724c2cd682..3c336c75a88 100644 --- a/lib/libc/gen/verrx.c +++ b/lib/libc/gen/verrx.c @@ -32,18 +32,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: verrx.c,v 1.2 1996/08/19 08:27:32 tholo Exp $"; +static char rcsid[] = "$OpenBSD: verrx.c,v 1.3 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <err.h> #include <stdio.h> #include <stdlib.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif extern char *__progname; /* Program name, from crt0. */ diff --git a/lib/libc/gen/vis.c b/lib/libc/gen/vis.c index 45abbf7aff7..894366e8cc1 100644 --- a/lib/libc/gen/vis.c +++ b/lib/libc/gen/vis.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: vis.c,v 1.7 2001/08/13 15:30:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: vis.c,v 1.8 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -80,11 +80,7 @@ vis(dst, c, flag, nextc) *dst++ = '\\'; *dst++ = 'b'; goto done; -#ifdef __STDC__ case '\a': -#else - case '\007': -#endif *dst++ = '\\'; *dst++ = 'a'; goto done; diff --git a/lib/libc/gen/vwarn.c b/lib/libc/gen/vwarn.c index b5b051cac47..d659ace55c8 100644 --- a/lib/libc/gen/vwarn.c +++ b/lib/libc/gen/vwarn.c @@ -32,19 +32,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: vwarn.c,v 1.2 1996/08/19 08:27:38 tholo Exp $"; +static char rcsid[] = "$OpenBSD: vwarn.c,v 1.3 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <err.h> #include <errno.h> #include <stdio.h> #include <string.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif extern char *__progname; /* Program name, from crt0. */ diff --git a/lib/libc/gen/vwarnx.c b/lib/libc/gen/vwarnx.c index cc7adb146e5..40619302413 100644 --- a/lib/libc/gen/vwarnx.c +++ b/lib/libc/gen/vwarnx.c @@ -32,17 +32,12 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.2 1996/08/19 08:27:39 tholo Exp $"; +static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.3 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <err.h> #include <stdio.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif extern char *__progname; /* Program name, from crt0. */ diff --git a/lib/libc/gen/waitpid.c b/lib/libc/gen/waitpid.c index 87b485fdba0..c38aea6f75b 100644 --- a/lib/libc/gen/waitpid.c +++ b/lib/libc/gen/waitpid.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: waitpid.c,v 1.3 1997/07/25 20:30:06 mickey Exp $"; +static char rcsid[] = "$OpenBSD: waitpid.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -41,14 +41,7 @@ static char rcsid[] = "$OpenBSD: waitpid.c,v 1.3 1997/07/25 20:30:06 mickey Exp #include <sys/resource.h> pid_t -#ifdef __STDC__ waitpid(pid_t pid, int *istat, int options) -#else -waitpid(pid, istat, options) - pid_t pid; - int *istat; - int options; -#endif { return (wait4(pid, istat, options, (struct rusage *)0)); } diff --git a/lib/libc/gen/warn.c b/lib/libc/gen/warn.c index 422d94b2059..cfb4e66c363 100644 --- a/lib/libc/gen/warn.c +++ b/lib/libc/gen/warn.c @@ -32,34 +32,18 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: warn.c,v 1.3 1997/07/25 20:30:06 mickey Exp $"; +static char rcsid[] = "$OpenBSD: warn.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <err.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif void -#ifdef __STDC__ _warn(const char *fmt, ...) -#else -_warn(va_alist) - va_dcl -#endif { va_list ap; -#ifdef __STDC__ - va_start(ap, fmt); -#else - const char *fmt; - va_start(ap); - fmt = va_arg(ap, const char *); -#endif + va_start(ap, fmt); _vwarn(fmt, ap); va_end(ap); } diff --git a/lib/libc/gen/warnx.c b/lib/libc/gen/warnx.c index 02367b0ec88..f7255262716 100644 --- a/lib/libc/gen/warnx.c +++ b/lib/libc/gen/warnx.c @@ -32,34 +32,18 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: warnx.c,v 1.2 1996/08/19 08:27:50 tholo Exp $"; +static char rcsid[] = "$OpenBSD: warnx.c,v 1.3 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <err.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif void -#ifdef __STDC__ _warnx(const char *fmt, ...) -#else -_warnx(va_alist) - va_dcl -#endif { va_list ap; -#ifdef __STDC__ - va_start(ap, fmt); -#else - const char *fmt; - va_start(ap); - fmt = va_arg(ap, const char *); -#endif + va_start(ap, fmt); _vwarnx(fmt, ap); va_end(ap); } diff --git a/lib/libc/net/htons.c b/lib/libc/net/htons.c index 47cf25952db..ded70712ea0 100644 --- a/lib/libc/net/htons.c +++ b/lib/libc/net/htons.c @@ -4,7 +4,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: htons.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; +static char *rcsid = "$OpenBSD: htons.c,v 1.7 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -13,12 +13,7 @@ static char *rcsid = "$OpenBSD: htons.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; #undef htons u_int16_t -#ifdef __STDC__ htons(u_int16_t x) -#else -htons(x) - u_int16_t x; -#endif { #if BYTE_ORDER == LITTLE_ENDIAN u_char *s = (u_char *) &x; diff --git a/lib/libc/net/ntohs.c b/lib/libc/net/ntohs.c index cf6414d4a63..4c3ab33f31c 100644 --- a/lib/libc/net/ntohs.c +++ b/lib/libc/net/ntohs.c @@ -4,7 +4,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: ntohs.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; +static char *rcsid = "$OpenBSD: ntohs.c,v 1.7 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -13,12 +13,7 @@ static char *rcsid = "$OpenBSD: ntohs.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; #undef ntohs u_int16_t -#ifdef __STDC__ ntohs(u_int16_t x) -#else -ntohs(x) - u_int16_t x; -#endif { #if BYTE_ORDER == LITTLE_ENDIAN u_char *s = (u_char *) &x; diff --git a/lib/libc/net/res_comp.c b/lib/libc/net/res_comp.c index 948923cf37d..25e196b2cfb 100644 --- a/lib/libc/net/res_comp.c +++ b/lib/libc/net/res_comp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_comp.c,v 1.9 2002/02/17 19:42:23 millert Exp $ */ +/* $OpenBSD: res_comp.c,v 1.10 2002/02/19 19:39:36 millert Exp $ */ /* * ++Copyright++ 1985, 1993 @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; static char rcsid[] = "$From: res_comp.c,v 8.11 1996/12/02 09:17:22 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: res_comp.c,v 1.9 2002/02/17 19:42:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: res_comp.c,v 1.10 2002/02/19 19:39:36 millert Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -489,13 +489,7 @@ _getlong(msgp) } void -#if defined(__STDC__) || defined(__cplusplus) -__putshort(register u_int16_t s, register u_char *msgp) /* must match proto */ -#else -__putshort(s, msgp) - register u_int16_t s; - register u_char *msgp; -#endif +__putshort(register u_int16_t s, register u_char *msgp) { PUTSHORT(s, msgp); } diff --git a/lib/libc/net/res_random.c b/lib/libc/net/res_random.c index 6a6a142e96b..7a7d0bd6777 100644 --- a/lib/libc/net/res_random.c +++ b/lib/libc/net/res_random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_random.c,v 1.10 2002/02/16 21:27:23 millert Exp $ */ +/* $OpenBSD: res_random.c,v 1.11 2002/02/19 19:39:36 millert Exp $ */ /* * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> @@ -100,14 +100,8 @@ static void res_initid(void); * of 0 - (mod-1) */ -#ifdef __STDC__ static u_int16_t pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod) -#else -static u_int16_t -pmod(gen, exp, mod) - u_int16_t gen, exp, mod; -#endif { u_int16_t s, t, u; diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c index f08e6c96f42..5aad5df40f2 100644 --- a/lib/libc/stdio/asprintf.c +++ b/lib/libc/stdio/asprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asprintf.c,v 1.7 2001/09/05 22:32:33 deraadt Exp $ */ +/* $OpenBSD: asprintf.c,v 1.8 2002/02/19 19:39:36 millert Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -28,38 +28,23 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: asprintf.c,v 1.7 2001/09/05 22:32:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: asprintf.c,v 1.8 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> #include <stdlib.h> #include <errno.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#if __STDC__ asprintf(char **str, char const *fmt, ...) -#else -asprintf(str, fmt, va_alist) - char **str; - const char *fmt; - va_dcl -#endif { int ret; va_list ap; FILE f; unsigned char *_base; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif f._file = -1; f._flags = __SWR | __SSTR | __SALC; f._bf._base = f._p = (unsigned char *)malloc(128); diff --git a/lib/libc/stdio/fprintf.c b/lib/libc/stdio/fprintf.c index 2d7a793c3c4..e2a8b53f3e3 100644 --- a/lib/libc/stdio/fprintf.c +++ b/lib/libc/stdio/fprintf.c @@ -35,34 +35,19 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: fprintf.c,v 1.3 1997/07/25 20:30:09 mickey Exp $"; +static char rcsid[] = "$OpenBSD: fprintf.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#ifdef __STDC__ fprintf(FILE *fp, const char *fmt, ...) -#else -fprintf(fp, fmt, va_alist) - FILE *fp; - char *fmt; - va_dcl -#endif { int ret; va_list ap; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vfprintf(fp, fmt, ap); va_end(ap); return (ret); diff --git a/lib/libc/stdio/fscanf.c b/lib/libc/stdio/fscanf.c index 009dbe8202e..dcd1a9050f5 100644 --- a/lib/libc/stdio/fscanf.c +++ b/lib/libc/stdio/fscanf.c @@ -35,34 +35,19 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: fscanf.c,v 1.4 2001/07/09 06:57:44 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fscanf.c,v 1.5 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#ifdef __STDC__ -fscanf(FILE *fp, char const *fmt, ...) { - int ret; - va_list ap; - - va_start(ap, fmt); -#else -fscanf(fp, fmt, va_alist) - FILE *fp; - char *fmt; - va_dcl +fscanf(FILE *fp, char const *fmt, ...) { int ret; va_list ap; - va_start(ap); -#endif + va_start(ap, fmt); ret = __svfscanf(fp, fmt, ap); va_end(ap); return (ret); diff --git a/lib/libc/stdio/funopen.c b/lib/libc/stdio/funopen.c index 6b9eb87d895..c2fcb5461cd 100644 --- a/lib/libc/stdio/funopen.c +++ b/lib/libc/stdio/funopen.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: funopen.c,v 1.3 1997/07/25 20:30:09 mickey Exp $"; +static char rcsid[] = "$OpenBSD: funopen.c,v 1.4 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -46,11 +46,7 @@ FILE * funopen(cookie, readfn, writefn, seekfn, closefn) const void *cookie; int (*readfn)(), (*writefn)(); -#ifdef __STDC__ fpos_t (*seekfn)(void *cookie, fpos_t off, int whence); -#else - fpos_t (*seekfn)(); -#endif int (*closefn)(); { register FILE *fp; diff --git a/lib/libc/stdio/fvwrite.h b/lib/libc/stdio/fvwrite.h index bd7bcde8e9c..013f4abc69f 100644 --- a/lib/libc/stdio/fvwrite.h +++ b/lib/libc/stdio/fvwrite.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fvwrite.h,v 1.3 1997/07/25 20:30:10 mickey Exp $ */ +/* $OpenBSD: fvwrite.h,v 1.4 2002/02/19 19:39:36 millert Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -49,8 +49,4 @@ struct __suio { int uio_resid; }; -#if defined(__STDC__) || defined(c_plusplus) extern int __sfvwrite(FILE *, struct __suio *); -#else -extern int __sfvwrite(); -#endif diff --git a/lib/libc/stdio/printf.c b/lib/libc/stdio/printf.c index bdae6aec7ce..bfdacd6a970 100644 --- a/lib/libc/stdio/printf.c +++ b/lib/libc/stdio/printf.c @@ -35,33 +35,19 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: printf.c,v 1.3 1997/07/25 20:30:10 mickey Exp $"; +static char rcsid[] = "$OpenBSD: printf.c,v 1.4 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#ifdef __STDC__ printf(char const *fmt, ...) -#else -printf(fmt, va_alist) - char *fmt; - va_dcl -#endif { int ret; va_list ap; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vfprintf(stdout, fmt, ap); va_end(ap); return (ret); diff --git a/lib/libc/stdio/scanf.c b/lib/libc/stdio/scanf.c index 0897f817979..0efe9150da9 100644 --- a/lib/libc/stdio/scanf.c +++ b/lib/libc/stdio/scanf.c @@ -35,33 +35,19 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: scanf.c,v 1.4 2001/07/09 06:57:44 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: scanf.c,v 1.5 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#ifdef __STDC__ scanf(char const *fmt, ...) -#else -scanf(fmt, va_alist) - char *fmt; - va_dcl -#endif { int ret; va_list ap; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = __svfscanf(stdin, fmt, ap); va_end(ap); return (ret); diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c index 5bd97f0bead..d8d6ccb74d4 100644 --- a/lib/libc/stdio/snprintf.c +++ b/lib/libc/stdio/snprintf.c @@ -35,27 +35,15 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: snprintf.c,v 1.6 1998/01/12 06:20:56 millert Exp $"; +static char rcsid[] = "$OpenBSD: snprintf.c,v 1.7 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <limits.h> #include <stdio.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#ifdef __STDC__ snprintf(char *str, size_t n, char const *fmt, ...) -#else -snprintf(str, n, fmt, va_alist) - char *str; - size_t n; - char *fmt; - va_dcl -#endif { int ret; va_list ap; @@ -64,11 +52,7 @@ snprintf(str, n, fmt, va_alist) /* While snprintf(3) specifies size_t stdio uses an int internally */ if (n > INT_MAX) n = INT_MAX; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif f._file = -1; f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c index 994192f04bc..c2d757af4c8 100644 --- a/lib/libc/stdio/sprintf.c +++ b/lib/libc/stdio/sprintf.c @@ -35,27 +35,16 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: sprintf.c,v 1.4 1998/01/12 06:14:31 millert Exp $"; +static char rcsid[] = "$OpenBSD: sprintf.c,v 1.5 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include <limits.h> #include "local.h" int -#ifdef __STDC__ sprintf(char *str, char const *fmt, ...) -#else -sprintf(str, fmt, va_alist) - char *str; - char *fmt; - va_dcl -#endif { int ret; va_list ap; @@ -65,11 +54,7 @@ sprintf(str, fmt, va_alist) f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = INT_MAX; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vfprintf(&f, fmt, ap); va_end(ap); *f._p = '\0'; diff --git a/lib/libc/stdio/sscanf.c b/lib/libc/stdio/sscanf.c index f5bee8f9b70..7a9606e3abb 100644 --- a/lib/libc/stdio/sscanf.c +++ b/lib/libc/stdio/sscanf.c @@ -35,16 +35,12 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: sscanf.c,v 1.4 2001/07/09 06:57:44 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: sscanf.c,v 1.5 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> #include <string.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "local.h" /* ARGSUSED */ @@ -59,14 +55,7 @@ eofread(cookie, buf, len) } int -#ifdef __STDC__ sscanf(const char *str, char const *fmt, ...) -#else -sscanf(str, fmt, va_alist) - const char *str; - char *fmt; - va_dcl -#endif { int ret; va_list ap; @@ -78,11 +67,7 @@ sscanf(str, fmt, va_alist) f._read = eofread; f._ub._base = NULL; f._lb._base = NULL; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = __svfscanf(&f, fmt, ap); va_end(ap); return (ret); diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 326a6e92746..24a9355942b 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: vfprintf.c,v 1.16 2002/02/17 19:42:24 millert Exp $"; +static char *rcsid = "$OpenBSD: vfprintf.c,v 1.17 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -50,12 +50,7 @@ static char *rcsid = "$OpenBSD: vfprintf.c,v 1.16 2002/02/17 19:42:24 millert Ex #include <stdlib.h> #include <string.h> #include <errno.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "local.h" #include "fvwrite.h" diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index cd533cae684..942b37a9d3b 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -35,17 +35,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: vfscanf.c,v 1.7 2001/07/09 06:57:45 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: vfscanf.c,v 1.8 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> #include <stdlib.h> #include <ctype.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "local.h" #ifdef FLOATING_POINT diff --git a/lib/libc/stdlib/multibyte.c b/lib/libc/stdlib/multibyte.c index 12e70c4a2c7..6f08bbe3425 100644 --- a/lib/libc/stdlib/multibyte.c +++ b/lib/libc/stdlib/multibyte.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: multibyte.c,v 1.2 1996/08/19 08:33:39 tholo Exp $"; +static char *rcsid = "$OpenBSD: multibyte.c,v 1.3 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdlib.h> @@ -73,13 +73,7 @@ mbtowc(pwc, s, n) /*ARGSUSED*/ int -#ifdef __STDC__ wctomb(char *s, wchar_t wchar) -#else -wctomb(s, wchar) - char *s; - wchar_t wchar; -#endif { if (s == NULL) return 0; diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c index 44cc369b16f..ce7ce9fe562 100644 --- a/lib/libc/stdlib/strtod.c +++ b/lib/libc/stdlib/strtod.c @@ -90,7 +90,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: strtod.c,v 1.14 2001/07/09 06:57:45 deraadt Exp $"; +static char *rcsid = "$OpenBSD: strtod.c,v 1.15 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ @@ -153,7 +153,6 @@ extern void *MALLOC(size_t); #include "errno.h" #ifdef Bad_float_h -#undef __STDC__ #ifdef IEEE_BIG_ENDIAN #define IEEE_ARITHMETIC #endif @@ -1429,7 +1428,7 @@ strtod if (e1 > DBL_MAX_10_EXP) { ovfl: errno = ERANGE; -#ifdef __STDC__ +#ifndef Bad_float_h value(rv) = HUGE_VAL; #else /* Can't trust HUGE_VAL */ diff --git a/lib/libc/sys/Lint_syscall.c b/lib/libc/sys/Lint_syscall.c index d1afedad86c..367a7aac179 100644 --- a/lib/libc/sys/Lint_syscall.c +++ b/lib/libc/sys/Lint_syscall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: Lint_syscall.c,v 1.1 1998/02/08 22:45:14 tholo Exp $ */ +/* $OpenBSD: Lint_syscall.c,v 1.2 2002/02/19 19:39:37 millert Exp $ */ /* $NetBSD: Lint_syscall.c,v 1.1 1997/11/06 00:53:22 cgd Exp $ */ /* @@ -7,21 +7,11 @@ */ #include <unistd.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif /*ARGSUSED*/ int -#ifdef __STDC__ syscall(int arg1, ...) -#else -syscall(arg1, va_alist) - int arg1; - va_dcl -#endif { return (0); } diff --git a/lib/libc/sys/semctl.c b/lib/libc/sys/semctl.c index 7a933897d66..64bf75114ab 100644 --- a/lib/libc/sys/semctl.c +++ b/lib/libc/sys/semctl.c @@ -30,36 +30,22 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: semctl.c,v 1.5 1998/06/10 08:46:22 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: semctl.c,v 1.6 2002/02/19 19:39:37 millert Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> #include <sys/ipc.h> #include <sys/sem.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include <stdlib.h> -#if __STDC__ int semctl(int semid, int semnum, int cmd, ...) -#else -int semctl(semid, semnum, cmd, va_alist) - int semid, semnum; - int cmd; - va_dcl -#endif { va_list ap; union semun semun; union semun *semun_ptr = NULL; -#if __STDC__ + va_start(ap, cmd); -#else - va_start(ap); -#endif if (cmd == IPC_SET || cmd == IPC_STAT || cmd == GETALL || cmd == SETVAL || cmd == SETALL) { semun = va_arg(ap, union semun); diff --git a/lib/libc/termios/tcsetpgrp.c b/lib/libc/termios/tcsetpgrp.c index 91d65fa84d7..33508a6c1fb 100644 --- a/lib/libc/termios/tcsetpgrp.c +++ b/lib/libc/termios/tcsetpgrp.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tcsetpgrp.c,v 1.3 1997/07/25 20:30:15 mickey Exp $"; +static char rcsid[] = "$OpenBSD: tcsetpgrp.c,v 1.4 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -40,13 +40,7 @@ static char rcsid[] = "$OpenBSD: tcsetpgrp.c,v 1.3 1997/07/25 20:30:15 mickey Ex #include <termios.h> int -#ifdef __STDC__ tcsetpgrp(int fd, pid_t pgrp) -#else -tcsetpgrp(fd, pgrp) - int fd; - pid_t pgrp; -#endif { int s; |