diff options
56 files changed, 42 insertions, 610 deletions
diff --git a/games/snake/snake/move.c b/games/snake/snake/move.c index 6ef17bd..31acbac 100644 --- a/games/snake/snake/move.c +++ b/games/snake/snake/move.c @@ -96,11 +96,7 @@ static const char rcsid[] = ******************************************************************************/ #include <errno.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include <string.h> #include <termcap.h> #include <unistd.h> @@ -399,46 +395,25 @@ pch(c) } void -#if __STDC__ apr(struct point *ps, const char *fmt, ...) -#else -apr(ps, fmt, va_alist) - struct point *ps; - char *fmt; - va_dcl -#endif { struct point p; va_list ap; p.line = ps->line+1; p.col = ps->col+1; move(&p); -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif (void)vsprintf(str, fmt, ap); va_end(ap); pstring(str); } void -#if __STDC__ pr(const char *fmt, ...) -#else -pr(fmt, va_alist) - char *fmt; - va_dcl -#endif { va_list ap; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif (void)vsprintf(str, fmt, ap); va_end(ap); pstring(str); diff --git a/games/snake/snake/snake.h b/games/snake/snake/snake.h index 9392791..e6ed4bd 100644 --- a/games/snake/snake/snake.h +++ b/games/snake/snake/snake.h @@ -77,12 +77,7 @@ struct sgttyb orig, new; struct ltchars olttyc, nlttyc; #endif struct point *point(); -#if __STDC__ void apr(struct point *, const char *, ...) __printflike(2, 3); void pr(const char *, ...) __printflike(1, 2); -#else -void apr(); -void pr(); -#endif #define same(s1, s2) ((s1)->line == (s2)->line && (s1)->col == (s2)->col) diff --git a/lib/libc/compat-43/gethostid.c b/lib/libc/compat-43/gethostid.c index 0652230..cc1b905 100644 --- a/lib/libc/compat-43/gethostid.c +++ b/lib/libc/compat-43/gethostid.c @@ -40,13 +40,8 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/sysctl.h> -#if __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 2ab3c3b..3eafc76 100644 --- a/lib/libc/compat-43/killpg.c +++ b/lib/libc/compat-43/killpg.c @@ -45,13 +45,7 @@ __FBSDID("$FreeBSD$"); * Backwards-compatible killpg(). */ int -#if __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/sethostid.c b/lib/libc/compat-43/sethostid.c index 1cb73b2..55ad658 100644 --- a/lib/libc/compat-43/sethostid.c +++ b/lib/libc/compat-43/sethostid.c @@ -40,14 +40,8 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/sysctl.h> -#if __STDC__ long sethostid(long hostid) -#else -long -sethostid(hostid) - long hostid; -#endif { int mib[2]; diff --git a/lib/libc/compat-43/setpgrp.c b/lib/libc/compat-43/setpgrp.c index cf0c08e..381c018 100644 --- a/lib/libc/compat-43/setpgrp.c +++ b/lib/libc/compat-43/setpgrp.c @@ -41,12 +41,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> int -#if __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 4b6d751..1617ab13 100644 --- a/lib/libc/compat-43/setrgid.c +++ b/lib/libc/compat-43/setrgid.c @@ -40,12 +40,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> int -#ifdef __STDC__ setrgid(gid_t rgid) -#else -setrgid(rgid) - int rgid; -#endif { return (setregid(rgid, -1)); diff --git a/lib/libc/compat-43/setruid.c b/lib/libc/compat-43/setruid.c index 37b2b5b..a0a6e81 100644 --- a/lib/libc/compat-43/setruid.c +++ b/lib/libc/compat-43/setruid.c @@ -40,12 +40,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> int -#ifdef __STDC__ setruid(uid_t ruid) -#else -setruid(ruid) - int ruid; -#endif { return (setreuid(ruid, -1)); diff --git a/lib/libc/db/test/dbtest.c b/lib/libc/db/test/dbtest.c index ec367e1..4d81aee 100644 --- a/lib/libc/db/test/dbtest.c +++ b/lib/libc/db/test/dbtest.c @@ -725,27 +725,14 @@ usage() exit(1); } -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif void -#if __STDC__ err(const char *fmt, ...) -#else -err(fmt, va_alist) - char *fmt; - va_dcl -#endif { va_list ap; -#if __STDC__ + va_start(ap, fmt); -#else - va_start(ap); -#endif (void)fprintf(stderr, "dbtest: "); (void)vfprintf(stderr, fmt, ap); va_end(ap); diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index 1cb8db7..99e3806 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -48,34 +48,19 @@ __FBSDID("$FreeBSD$"); #include <stdio.h> #include <paths.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "un-namespace.h" extern char **environ; int -#if __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; -#if __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; while (va_arg(ap, char *) != NULL) n++; @@ -85,11 +70,7 @@ execl(name, arg, va_alist) errno = ENOMEM; return (-1); } -#if __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; argv[0] = (char *)arg; while ((argv[n] = va_arg(ap, char *)) != NULL) @@ -99,24 +80,13 @@ execl(name, arg, va_alist) } int -#if __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; -#if __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; while (va_arg(ap, char *) != NULL) n++; @@ -126,11 +96,7 @@ execle(name, arg, va_alist) errno = ENOMEM; return (-1); } -#if __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; argv[0] = (char *)arg; while ((argv[n] = va_arg(ap, char *)) != NULL) @@ -141,25 +107,14 @@ execle(name, arg, va_alist) } int -#if __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; int sverrno; char **argv; int n; -#if __STDC__ va_start(ap, arg); -#else - va_start(ap); -#endif n = 1; while (va_arg(ap, char *) != NULL) n++; @@ -169,11 +124,7 @@ execlp(name, arg, va_alist) errno = ENOMEM; return (-1); } -#if __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/getosreldate.c b/lib/libc/gen/getosreldate.c index 6cc3f5c..b0421a3 100644 --- a/lib/libc/gen/getosreldate.c +++ b/lib/libc/gen/getosreldate.c @@ -40,13 +40,8 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/sysctl.h> -#if __STDC__ int getosreldate(void) -#else -int -getosreldate() -#endif { int mib[2]; size_t size; diff --git a/lib/libc/gen/semctl.c b/lib/libc/gen/semctl.c index a64e125..a449cac 100644 --- a/lib/libc/gen/semctl.c +++ b/lib/libc/gen/semctl.c @@ -4,30 +4,16 @@ __FBSDID("$FreeBSD$"); #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; -#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/gen/sethostname.c b/lib/libc/gen/sethostname.c index 1f0a14a..769401a 100644 --- a/lib/libc/gen/sethostname.c +++ b/lib/libc/gen/sethostname.c @@ -40,15 +40,8 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/sysctl.h> -#if __STDC__ int sethostname(const char *name, int namelen) -#else -int -sethostname(name, namelen) - char *name; - int namelen; -#endif { int mib[2]; diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index 621e63a..fa19907 100644 --- a/lib/libc/gen/syslog.c +++ b/lib/libc/gen/syslog.c @@ -54,11 +54,7 @@ __FBSDID("$FreeBSD$"); #include <time.h> #include <unistd.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "un-namespace.h" #include "libc_private.h" @@ -113,22 +109,11 @@ int writehook(cookie, buf, len) * print message on log file; output is intended for syslogd(8). */ void -#if __STDC__ syslog(int pri, const char *fmt, ...) -#else -syslog(pri, fmt, va_alist) - int pri; - char *fmt; - va_dcl -#endif { va_list ap; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif vsyslog(pri, fmt, ap); va_end(ap); } diff --git a/lib/libc/gen/termios.c b/lib/libc/gen/termios.c index 592d7bf..cc57cf8 100644 --- a/lib/libc/gen/termios.c +++ b/lib/libc/gen/termios.c @@ -83,13 +83,7 @@ tcsetattr(fd, opt, t) } int -#if __STDC__ tcsetpgrp(int fd, pid_t pgrp) -#else -tcsetpgrp(fd, pgrp) - int fd; - pid_t pgrp; -#endif { int s; diff --git a/lib/libc/gen/vis.c b/lib/libc/gen/vis.c index bc4903c..640ae3af 100644 --- a/lib/libc/gen/vis.c +++ b/lib/libc/gen/vis.c @@ -97,11 +97,7 @@ vis(dst, c, flag, nextc) *dst++ = '\\'; *dst++ = 'b'; goto done; -#if __STDC__ case '\a': -#else - case '\007': -#endif *dst++ = '\\'; *dst++ = 'a'; goto done; diff --git a/lib/libc/net/nsdispatch.c b/lib/libc/net/nsdispatch.c index 307b2c6..25da107 100644 --- a/lib/libc/net/nsdispatch.c +++ b/lib/libc/net/nsdispatch.c @@ -212,18 +212,8 @@ _nsdbtput(dbt) int -#if __STDC__ nsdispatch(void *retval, const ns_dtab disp_tab[], const char *database, const char *method, const ns_src defaults[], ...) -#else -nsdispatch(retval, disp_tab, database, method, defaults, va_alist) - void *retval; - const ns_dtab disp_tab[]; - const char *database; - const char *method; - const ns_src defaults[]; - va_dcl -#endif { va_list ap; int i, curdisp, result; @@ -250,11 +240,7 @@ nsdispatch(retval, disp_tab, database, method, defaults, va_alist) break; result = 0; if (disp_tab[curdisp].callback) { -#if __STDC__ va_start(ap, defaults); -#else - va_start(ap); -#endif result = disp_tab[curdisp].callback(retval, disp_tab[curdisp].cb_data, ap); va_end(ap); diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c index 276f86f..57116e6 100644 --- a/lib/libc/stdio/asprintf.c +++ b/lib/libc/stdio/asprintf.c @@ -33,33 +33,18 @@ __FBSDID("$FreeBSD$"); #include <stdio.h> #include <stdlib.h> #include <errno.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "local.h" 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; -#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 53c1328..55ae1d5 100644 --- a/lib/libc/stdio/fprintf.c +++ b/lib/libc/stdio/fprintf.c @@ -41,30 +41,15 @@ static char sccsid[] = "@(#)fprintf.c 8.1 (Berkeley) 6/4/93"; __FBSDID("$FreeBSD$"); #include <stdio.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#if __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; -#if __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 e147e79..1c376a8 100644 --- a/lib/libc/stdio/fscanf.c +++ b/lib/libc/stdio/fscanf.c @@ -42,33 +42,17 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include <stdio.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "un-namespace.h" #include "libc_private.h" -#if __STDC__ int -fscanf(FILE *fp, char const *fmt, ...) { - int ret; - va_list ap; - - va_start(ap, fmt); -#else -int -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); FLOCKFILE(fp); ret = __svfscanf(fp, fmt, ap); va_end(ap); diff --git a/lib/libc/stdio/funopen.c b/lib/libc/stdio/funopen.c index 28da521..459cd5c 100644 --- a/lib/libc/stdio/funopen.c +++ b/lib/libc/stdio/funopen.c @@ -49,11 +49,7 @@ FILE * funopen(cookie, readfn, writefn, seekfn, closefn) const void *cookie; int (*readfn)(), (*writefn)(); -#if __STDC__ fpos_t (*seekfn)(void *cookie, fpos_t off, int whence); -#else - fpos_t (*seekfn)(); -#endif int (*closefn)(); { FILE *fp; diff --git a/lib/libc/stdio/fvwrite.h b/lib/libc/stdio/fvwrite.h index e55341b..df59bf0 100644 --- a/lib/libc/stdio/fvwrite.h +++ b/lib/libc/stdio/fvwrite.h @@ -50,8 +50,4 @@ struct __suio { int uio_resid; }; -#if __STDC__ || 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 1d24931..bd7d16c 100644 --- a/lib/libc/stdio/printf.c +++ b/lib/libc/stdio/printf.c @@ -41,29 +41,15 @@ static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 6/4/93"; __FBSDID("$FreeBSD$"); #include <stdio.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#if __STDC__ printf(char const *fmt, ...) -#else -printf(fmt, va_alist) - char *fmt; - va_dcl -#endif { int ret; va_list ap; -#if __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 98cd4e2..990c9b0 100644 --- a/lib/libc/stdio/scanf.c +++ b/lib/libc/stdio/scanf.c @@ -42,32 +42,17 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include <stdio.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "un-namespace.h" #include "libc_private.h" -#if __STDC__ int scanf(char const *fmt, ...) -#else -int -scanf(fmt, va_alist) - char *fmt; - va_dcl -#endif { int ret; va_list ap; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif FLOCKFILE(stdin); ret = __svfscanf(stdin, fmt, ap); FUNLOCKFILE(stdin); diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c index 0a09bac..e3e71f2 100644 --- a/lib/libc/stdio/snprintf.c +++ b/lib/libc/stdio/snprintf.c @@ -42,25 +42,12 @@ __FBSDID("$FreeBSD$"); #include <limits.h> #include <stdio.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "local.h" -#if __STDC__ int snprintf(char *str, size_t n, char const *fmt, ...) -#else -int -snprintf(str, n, fmt, va_alist) - char *str; - size_t n; - char *fmt; - va_dcl -#endif { size_t on; int ret; @@ -72,11 +59,7 @@ snprintf(str, n, fmt, va_alist) n--; if (n > INT_MAX) n = INT_MAX; -#if __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 075ac63..7b81c1f 100644 --- a/lib/libc/stdio/sprintf.c +++ b/lib/libc/stdio/sprintf.c @@ -41,23 +41,12 @@ static char sccsid[] = "@(#)sprintf.c 8.1 (Berkeley) 6/4/93"; __FBSDID("$FreeBSD$"); #include <stdio.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include <limits.h> #include "local.h" int -#if __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; @@ -67,11 +56,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; -#if __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 5a9ada6..d988326 100644 --- a/lib/libc/stdio/sscanf.c +++ b/lib/libc/stdio/sscanf.c @@ -42,11 +42,7 @@ __FBSDID("$FreeBSD$"); #include <stdio.h> #include <string.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "local.h" static int eofread(void *, char *, int); @@ -62,16 +58,8 @@ eofread(cookie, buf, len) return (0); } -#if __STDC__ int sscanf(const char *str, char const *fmt, ...) -#else -int -sscanf(str, fmt, va_alist) - char *str; - char *fmt; - va_dcl -#endif { int ret; va_list ap; @@ -87,11 +75,7 @@ sscanf(str, fmt, va_alist) f._lb._base = NULL; f._extra = &extra; INITEXTRA(&f); -#if __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 b723c67..55fc82c 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -58,11 +58,7 @@ __FBSDID("$FreeBSD$"); #include <stdlib.h> #include <string.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "un-namespace.h" #include "libc_private.h" diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index a31d6ad0..e329eed 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -46,11 +46,7 @@ __FBSDID("$FreeBSD$"); #include <stdio.h> #include <stdlib.h> #include <stddef.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include <string.h> #include "un-namespace.h" diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index 0a72ca8..aa9b318 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -33,11 +33,7 @@ __FBSDID("$FreeBSD$"); #include <errno.h> #include <limits.h> #include <locale.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -91,17 +87,8 @@ static void __setup_vars(int, char *, char *, char *, char **); static int __calc_left_pad(int, char *); static char *__format_grouped_double(double, int *, int, int, int); -#if __STDC__ ssize_t strfmon(char *s, size_t maxsize, const char *format, ...) -#else -ssize_t -strfmon(s, maxsize, format, va_alist) - char *s; - size_t maxsize; - const char *format; - va_dcl -#endif { va_list ap; char *dst; /* output destination pointer */ @@ -127,11 +114,7 @@ strfmon(s, maxsize, format, va_alist) char *tmpptr; /* temporary vars */ int *ntmp; -#if __STDC__ va_start(ap, format); -#else - va_start(ap); -#endif lc = localeconv(); dst = s; diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c index 9258d71..eaa7ad0 100644 --- a/lib/libc/stdlib/strtod.c +++ b/lib/libc/stdlib/strtod.c @@ -1378,18 +1378,7 @@ strtod if (e1 > DBL_MAX_10_EXP) { ovfl: errno = ERANGE; -#ifdef __STDC__ rv = HUGE_VAL; -#else - /* Can't trust HUGE_VAL */ -#ifdef IEEE_Arith - word0(rv) = Exp_mask; - word1(rv) = 0; -#else - word0(rv) = Big0; - word1(rv) = Big1; -#endif -#endif goto ret; } if (e1 >>= 4) { diff --git a/lib/libc/stdtime/private.h b/lib/libc/stdtime/private.h index 8568ab1..214442c 100644 --- a/lib/libc/stdtime/private.h +++ b/lib/libc/stdtime/private.h @@ -107,19 +107,6 @@ static char privatehid[] = "@(#)private.h 7.43"; #define is_digit(c) ((unsigned)(c) - '0' <= 9) /* -** Workarounds for compilers/systems. -*/ - -#ifndef P -#ifdef __STDC__ -#define P(x) x -#endif /* defined __STDC__ */ -#ifndef __STDC__ -#define P(x) () -#endif /* !defined __STDC__ */ -#endif /* !defined P */ - -/* ** SunOS 4.1.1 headers lack FILENAME_MAX. */ diff --git a/lib/libcompat/4.1/ascftime.c b/lib/libcompat/4.1/ascftime.c index 088143c..b3c15e4 100644 --- a/lib/libcompat/4.1/ascftime.c +++ b/lib/libcompat/4.1/ascftime.c @@ -39,14 +39,7 @@ #define MAXLEN 1000 /* just a guess, only the user knows... */ int -#if __STDC__ ascftime(char *s, const char *format, const struct tm *tmptr) -#else -ascftime(s, format, tmptr) - char *s; - char *format; - struct tm *tmptr; -#endif { return strftime(s, MAXLEN, format? format: "%C", tmptr); } diff --git a/lib/libcompat/4.1/cftime.c b/lib/libcompat/4.1/cftime.c index 777055f..8033e44 100644 --- a/lib/libcompat/4.1/cftime.c +++ b/lib/libcompat/4.1/cftime.c @@ -39,14 +39,7 @@ #define MAXLEN 1000 /* just a guess, only the user knows... */ int -#if __STDC__ cftime(char *s, char *format, const time_t *clock) -#else -cftime(s, format, clock) - char *s; - char *format; - time_t *clock; -#endif { return strftime(s, MAXLEN, format? format: "%C", localtime(clock)); } diff --git a/lib/libcompat/4.1/getpw.c b/lib/libcompat/4.1/getpw.c index 96b4c12..d6f4f8b 100644 --- a/lib/libcompat/4.1/getpw.c +++ b/lib/libcompat/4.1/getpw.c @@ -38,13 +38,7 @@ #include <stdio.h> int -#if __STDC__ getpw(uid_t uid, char *buf) -#else -getpw(uid, buf) - uid_t uid; - char *buf; -#endif { struct passwd *pw; diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c index dfc21e4..f0a6352 100644 --- a/lib/libkvm/kvm.c +++ b/lib/libkvm/kvm.c @@ -81,11 +81,7 @@ kvm_geterr(kd) return (kd->errbuf); } -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif /* * Report an error using printf style arguments. "program" is kd->program @@ -94,22 +90,11 @@ kvm_geterr(kd) * generate tons of error messages when trying to access bogus pointers). */ void -#if __STDC__ _kvm_err(kvm_t *kd, const char *program, const char *fmt, ...) -#else -_kvm_err(kd, program, fmt, va_alist) - kvm_t *kd; - char *program, *fmt; - va_dcl -#endif { va_list ap; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif if (program != NULL) { (void)fprintf(stderr, "%s: ", program); (void)vfprintf(stderr, fmt, ap); @@ -122,23 +107,12 @@ _kvm_err(kd, program, fmt, va_alist) } void -#if __STDC__ _kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...) -#else -_kvm_syserr(kd, program, fmt, va_alist) - kvm_t *kd; - char *program, *fmt; - va_dcl -#endif { va_list ap; int n; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif if (program != NULL) { (void)fprintf(stderr, "%s: ", program); (void)vfprintf(stderr, fmt, ap); diff --git a/lib/msun/bsdsrc/mathimpl.h b/lib/msun/bsdsrc/mathimpl.h index b9b0295..d8e39f3 100644 --- a/lib/msun/bsdsrc/mathimpl.h +++ b/lib/msun/bsdsrc/mathimpl.h @@ -40,11 +40,7 @@ #if defined(vax)||defined(tahoe) /* Deal with different ways to concatenate in cpp */ -# ifdef __STDC__ # define cat3(a,b,c) a ## b ## c -# else -# define cat3(a,b,c) a/**/b/**/c -# endif /* Deal with vax/tahoe byte order issues */ # ifdef vax diff --git a/lib/msun/src/e_acos.c b/lib/msun/src/e_acos.c index 7bdb79c..86cc0ff 100644 --- a/lib/msun/src/e_acos.c +++ b/lib/msun/src/e_acos.c @@ -41,11 +41,7 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */ pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ @@ -61,12 +57,8 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ -#ifdef __STDC__ - double __generic___ieee754_acos(double x) -#else - double __generic___ieee754_acos(x) - double x; -#endif +double +__generic___ieee754_acos(double x) { double z,p,q,r,w,s,c,df; int32_t hx,ix; diff --git a/lib/msun/src/e_acosf.c b/lib/msun/src/e_acosf.c index b249710..0688edf 100644 --- a/lib/msun/src/e_acosf.c +++ b/lib/msun/src/e_acosf.c @@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const float -#else -static float -#endif one = 1.0000000000e+00, /* 0x3F800000 */ pi = 3.1415925026e+00, /* 0x40490fda */ pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */ @@ -40,12 +36,8 @@ qS2 = 2.0209457874e+00, /* 0x4001572d */ qS3 = -6.8828397989e-01, /* 0xbf303361 */ qS4 = 7.7038154006e-02; /* 0x3d9dc62e */ -#ifdef __STDC__ - float __ieee754_acosf(float x) -#else - float __ieee754_acosf(x) - float x; -#endif +float +__ieee754_acosf(float x) { float z,p,q,r,w,s,c,df; int32_t hx,ix; diff --git a/lib/msun/src/e_acosh.c b/lib/msun/src/e_acosh.c index 434e879..98938f9 100644 --- a/lib/msun/src/e_acosh.c +++ b/lib/msun/src/e_acosh.c @@ -31,20 +31,12 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif one = 1.0, ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ -#ifdef __STDC__ - double __ieee754_acosh(double x) -#else - double __ieee754_acosh(x) - double x; -#endif +double +__ieee754_acosh(double x) { double t; int32_t hx; diff --git a/lib/msun/src/e_acoshf.c b/lib/msun/src/e_acoshf.c index ad0e3a3..5138d72 100644 --- a/lib/msun/src/e_acoshf.c +++ b/lib/msun/src/e_acoshf.c @@ -20,20 +20,12 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const float -#else -static float -#endif one = 1.0, ln2 = 6.9314718246e-01; /* 0x3f317218 */ -#ifdef __STDC__ - float __ieee754_acoshf(float x) -#else - float __ieee754_acoshf(x) - float x; -#endif +float +__ieee754_acoshf(float x) { float t; int32_t hx; diff --git a/lib/msun/src/e_asin.c b/lib/msun/src/e_asin.c index de7af9e..8c94700 100644 --- a/lib/msun/src/e_asin.c +++ b/lib/msun/src/e_asin.c @@ -48,11 +48,7 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ huge = 1.000e+300, pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ @@ -70,12 +66,8 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ -#ifdef __STDC__ - double __generic___ieee754_asin(double x) -#else - double __generic___ieee754_asin(x) - double x; -#endif +double +__generic___ieee754_asin(double x) { double t=0.0,w,p,q,c,r,s; int32_t hx,ix; diff --git a/lib/msun/src/e_asinf.c b/lib/msun/src/e_asinf.c index 2f1e2e2..178289a 100644 --- a/lib/msun/src/e_asinf.c +++ b/lib/msun/src/e_asinf.c @@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const float -#else -static float -#endif one = 1.0000000000e+00, /* 0x3F800000 */ huge = 1.000e+30, pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */ @@ -42,12 +38,8 @@ qS2 = 2.0209457874e+00, /* 0x4001572d */ qS3 = -6.8828397989e-01, /* 0xbf303361 */ qS4 = 7.7038154006e-02; /* 0x3d9dc62e */ -#ifdef __STDC__ - float __ieee754_asinf(float x) -#else - float __ieee754_asinf(x) - float x; -#endif +float +__ieee754_asinf(float x) { float t=0.0,w,p,q,c,r,s; int32_t hx,ix; diff --git a/lib/msun/src/e_atan2.c b/lib/msun/src/e_atan2.c index b07d543..61d49c7 100644 --- a/lib/msun/src/e_atan2.c +++ b/lib/msun/src/e_atan2.c @@ -44,11 +44,7 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif tiny = 1.0e-300, zero = 0.0, pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */ @@ -56,12 +52,8 @@ pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */ pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ -#ifdef __STDC__ - double __generic___ieee754_atan2(double y, double x) -#else - double __generic___ieee754_atan2(y,x) - double y,x; -#endif +double +__generic___ieee754_atan2(double y, double x) { double z; int32_t k,m,hx,hy,ix,iy; diff --git a/lib/msun/src/e_atan2f.c b/lib/msun/src/e_atan2f.c index 6e6c181..d521942 100644 --- a/lib/msun/src/e_atan2f.c +++ b/lib/msun/src/e_atan2f.c @@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const float -#else -static float -#endif tiny = 1.0e-30, zero = 0.0, pi_o_4 = 7.8539818525e-01, /* 0x3f490fdb */ @@ -32,12 +28,8 @@ pi_o_2 = 1.5707963705e+00, /* 0x3fc90fdb */ pi = 3.1415925026e+00, /* 0x40490fda */ pi_lo = 1.5099578832e-07; /* 0x34222168 */ -#ifdef __STDC__ - float __ieee754_atan2f(float y, float x) -#else - float __ieee754_atan2f(y,x) - float y,x; -#endif +float +__ieee754_atan2f(float y, float x) { float z; int32_t k,m,hx,hy,ix,iy; diff --git a/lib/msun/src/e_atanh.c b/lib/msun/src/e_atanh.c index 97a79f0..d838c13 100644 --- a/lib/msun/src/e_atanh.c +++ b/lib/msun/src/e_atanh.c @@ -35,24 +35,11 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double one = 1.0, huge = 1e300; -#else -static double one = 1.0, huge = 1e300; -#endif - -#ifdef __STDC__ static const double zero = 0.0; -#else -static double zero = 0.0; -#endif -#ifdef __STDC__ - double __ieee754_atanh(double x) -#else - double __ieee754_atanh(x) - double x; -#endif +double +__ieee754_atanh(double x) { double t; int32_t hx,ix; diff --git a/lib/msun/src/e_atanhf.c b/lib/msun/src/e_atanhf.c index dc55b3b..c7cf3e0 100644 --- a/lib/msun/src/e_atanhf.c +++ b/lib/msun/src/e_atanhf.c @@ -20,24 +20,12 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const float one = 1.0, huge = 1e30; -#else -static float one = 1.0, huge = 1e30; -#endif -#ifdef __STDC__ static const float zero = 0.0; -#else -static float zero = 0.0; -#endif -#ifdef __STDC__ - float __ieee754_atanhf(float x) -#else - float __ieee754_atanhf(x) - float x; -#endif +float +__ieee754_atanhf(float x) { float t; int32_t hx,ix; diff --git a/lib/msun/src/e_cosh.c b/lib/msun/src/e_cosh.c index 47723c5..1a67f9a 100644 --- a/lib/msun/src/e_cosh.c +++ b/lib/msun/src/e_cosh.c @@ -38,18 +38,10 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double one = 1.0, half=0.5, huge = 1.0e300; -#else -static double one = 1.0, half=0.5, huge = 1.0e300; -#endif -#ifdef __STDC__ - double __ieee754_cosh(double x) -#else - double __ieee754_cosh(x) - double x; -#endif +double +__ieee754_cosh(double x) { double t,w; int32_t ix; diff --git a/lib/msun/src/e_coshf.c b/lib/msun/src/e_coshf.c index 9ea0416..d2368a6 100644 --- a/lib/msun/src/e_coshf.c +++ b/lib/msun/src/e_coshf.c @@ -20,18 +20,10 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const float one = 1.0, half=0.5, huge = 1.0e30; -#else -static float one = 1.0, half=0.5, huge = 1.0e30; -#endif -#ifdef __STDC__ - float __ieee754_coshf(float x) -#else - float __ieee754_coshf(x) - float x; -#endif +float +__ieee754_coshf(float x) { float t,w; int32_t ix; diff --git a/lib/msun/src/e_exp.c b/lib/msun/src/e_exp.c index 2fc04c6..1870466 100644 --- a/lib/msun/src/e_exp.c +++ b/lib/msun/src/e_exp.c @@ -80,11 +80,7 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double -#else -static double -#endif one = 1.0, halF[2] = {0.5,-0.5,}, huge = 1.0e+300, @@ -103,12 +99,8 @@ P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ -#ifdef __STDC__ - double __generic___ieee754_exp(double x) /* default IEEE double exp */ -#else - double __generic___ieee754_exp(x) /* default IEEE double exp */ - double x; -#endif +double +__generic___ieee754_exp(double x) /* default IEEE double exp */ { double y,hi=0.0,lo=0.0,c,t; int32_t k=0,xsb; diff --git a/lib/msun/src/e_expf.c b/lib/msun/src/e_expf.c index 8f37f6f..5858d2c 100644 --- a/lib/msun/src/e_expf.c +++ b/lib/msun/src/e_expf.c @@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const float -#else -static float -#endif one = 1.0, halF[2] = {0.5,-0.5,}, huge = 1.0e+30, @@ -42,12 +38,8 @@ P3 = 6.6137559770e-05, /* 0x388ab355 */ P4 = -1.6533901999e-06, /* 0xb5ddea0e */ P5 = 4.1381369442e-08; /* 0x3331bb4c */ -#ifdef __STDC__ - float __ieee754_expf(float x) /* default IEEE double exp */ -#else - float __ieee754_expf(x) /* default IEEE double exp */ - float x; -#endif +float +__ieee754_expf(float x) /* default IEEE double exp */ { float y,hi=0.0,lo=0.0,c,t; int32_t k=0,xsb; diff --git a/lib/msun/src/e_fmod.c b/lib/msun/src/e_fmod.c index f168630..48a2e95 100644 --- a/lib/msun/src/e_fmod.c +++ b/lib/msun/src/e_fmod.c @@ -23,18 +23,10 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const double one = 1.0, Zero[] = {0.0, -0.0,}; -#else -static double one = 1.0, Zero[] = {0.0, -0.0,}; -#endif -#ifdef __STDC__ - double __generic___ieee754_fmod(double x, double y) -#else - double __generic___ieee754_fmod(x,y) - double x,y ; -#endif +double +__generic___ieee754_fmod(double x, double y) { int32_t n,hx,hy,hz,ix,iy,sx,i; u_int32_t lx,ly,lz; diff --git a/lib/msun/src/e_fmodf.c b/lib/msun/src/e_fmodf.c index 01d85d0..e3865c4 100644 --- a/lib/msun/src/e_fmodf.c +++ b/lib/msun/src/e_fmodf.c @@ -26,18 +26,10 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ static const float one = 1.0, Zero[] = {0.0, -0.0,}; -#else -static float one = 1.0, Zero[] = {0.0, -0.0,}; -#endif -#ifdef __STDC__ - float __ieee754_fmodf(float x, float y) -#else - float __ieee754_fmodf(x,y) - float x,y ; -#endif +float +__ieee754_fmodf(float x, float y) { int32_t n,hx,hy,hz,ix,iy,sx,i; diff --git a/lib/msun/src/e_gamma.c b/lib/msun/src/e_gamma.c index bad4569..6cfbe17 100644 --- a/lib/msun/src/e_gamma.c +++ b/lib/msun/src/e_gamma.c @@ -26,12 +26,8 @@ static char rcsid[] = "$FreeBSD$"; extern int signgam; -#ifdef __STDC__ - double __ieee754_gamma(double x) -#else - double __ieee754_gamma(x) - double x; -#endif +double +__ieee754_gamma(double x) { return __ieee754_gamma_r(x,&signgam); } diff --git a/lib/msun/src/e_gamma_r.c b/lib/msun/src/e_gamma_r.c index 7d5197f..79ae4ea 100644 --- a/lib/msun/src/e_gamma_r.c +++ b/lib/msun/src/e_gamma_r.c @@ -24,12 +24,8 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - double __ieee754_gamma_r(double x, int *signgamp) -#else - double __ieee754_gamma_r(x,signgamp) - double x; int *signgamp; -#endif +double +__ieee754_gamma_r(double x, int *signgamp) { return __ieee754_lgamma_r(x,signgamp); } diff --git a/lib/msun/src/e_gammaf.c b/lib/msun/src/e_gammaf.c index f05ebef..da31d9f 100644 --- a/lib/msun/src/e_gammaf.c +++ b/lib/msun/src/e_gammaf.c @@ -28,12 +28,8 @@ static char rcsid[] = "$FreeBSD$"; extern int signgam; -#ifdef __STDC__ - float __ieee754_gammaf(float x) -#else - float __ieee754_gammaf(x) - float x; -#endif +float +__ieee754_gammaf(float x) { return __ieee754_gammaf_r(x,&signgam); } |