diff --git a/util/cgg/booth.h b/util/cgg/booth.h index e44c8a4c7..7c5d944fe 100644 --- a/util/cgg/booth.h +++ b/util/cgg/booth.h @@ -53,7 +53,13 @@ extern char *iname; /* stdin */ typedef char byte; typedef char * string; -extern char *malloc(),*myalloc(); +extern char *myalloc(); + +#if __STDC__ +#include +#else +extern char *malloc(); +#endif #include diff --git a/util/cgg/main.c b/util/cgg/main.c index 7bf82b1ec..9254df430 100644 --- a/util/cgg/main.c +++ b/util/cgg/main.c @@ -17,7 +17,7 @@ extern char *sprintf(); char * myalloc(n) { register char *p; - p= (char*) malloc((unsigned)n); + p= malloc((unsigned)n); if (p==0) { yyerror("Out of core"); exit(1); diff --git a/util/int/dump.c b/util/int/dump.c index e64db3e96..1ddea517c 100644 --- a/util/int/dump.c +++ b/util/int/dump.c @@ -31,8 +31,6 @@ extern long inr; /* from log.c */ although it is not directly evident how. */ -extern char *sprintf(); - PRIVATE char *displ_undefs(), *displ_fil(), *displ_sh(), *displ_code(); PRIVATE ptr std_raw(), std_rsb(); PRIVATE int std_bytes(), dtd_bytes(), FRAd_bytes(); diff --git a/util/int/io.c b/util/int/io.c index 176320755..45188a0a2 100644 --- a/util/int/io.c +++ b/util/int/io.c @@ -12,9 +12,6 @@ #include "mem.h" #include "linfil.h" -extern char *sprintf(); -extern _doprnt(); - extern int running; /* from main.c */ extern char *prog_name; /* from main.c */ extern char *load_name; /* from init.c */ @@ -162,7 +159,7 @@ PRIVATE do_fatal(fp, fmt, ap) fprintf(fp, "(Fatal error) "); if (load_name) fprintf(fp, "%s: ", load_name); - _doprnt(fmt, ap, fp); + vfprintf(fp, fmt, ap); fputc('\n', fp); } @@ -177,7 +174,7 @@ message(va_alist) va_start(ap); { register char *fmt = va_arg(ap, char *); - _doprnt(fmt, ap, mess_fp); + vfprintf(mess_fp, fmt, ap); } va_end(ap); diff --git a/util/int/log.c b/util/int/log.c index 9cd174ee7..b75922d3f 100644 --- a/util/int/log.c +++ b/util/int/log.c @@ -13,7 +13,6 @@ #ifdef LOGGING -extern char *sprintf(); extern int strlen(); extern char *strcpy(); @@ -256,10 +255,10 @@ do_log(va_alist) if (fmt[0] == '@') { /* include position */ fprintf(log_fp, "%.4s%s, ", fmt, position()); - _doprnt(&fmt[4], ap, log_fp); + vfprintf(log_fp, &fmt[4], ap); } else { - _doprnt(&fmt[0], ap, log_fp); + vfprintf(log_fp, &fmt[0], ap); } } va_end(ap); diff --git a/util/int/moncalls.c b/util/int/moncalls.c index 7a6d955af..d229b657c 100644 --- a/util/int/moncalls.c +++ b/util/int/moncalls.c @@ -11,6 +11,9 @@ #include #include +#if __STDC__ +#include +#endif #include extern int errno; /* UNIX error number */ @@ -54,7 +57,6 @@ struct timeb { /* non-existing; we use an ad-hoc definition */ #define DUPMASK 0x40 -extern long times(); extern long lseek(); #ifdef SYS_V extern unsigned int alarm(); diff --git a/util/int/monstruct.c b/util/int/monstruct.c index 557018b90..780d089f6 100644 --- a/util/int/monstruct.c +++ b/util/int/monstruct.c @@ -12,6 +12,9 @@ #include #include +#if __STDC__ +#include +#endif #include #include diff --git a/util/int/switch/mkiswitch.c b/util/int/switch/mkiswitch.c index 080c744ef..6c5d05bdc 100644 --- a/util/int/switch/mkiswitch.c +++ b/util/int/switch/mkiswitch.c @@ -11,7 +11,6 @@ #include -extern char *sprintf(); extern FILE *popen(); #include diff --git a/util/int/switch/mkswitch.c b/util/int/switch/mkswitch.c index 720755f3b..d4d3ce40d 100644 --- a/util/int/switch/mkswitch.c +++ b/util/int/switch/mkswitch.c @@ -13,7 +13,6 @@ #include -extern char *sprintf(); extern FILE *popen(); char *progname; diff --git a/util/int/trap.c b/util/int/trap.c index f54e22ace..39729c56d 100644 --- a/util/int/trap.c +++ b/util/int/trap.c @@ -18,8 +18,6 @@ #include "rsb.h" #include "fra.h" -extern char *sprintf(); - extern jmp_buf trapbuf; /* from main.c */ int must_test; /* TEST-bit on in EM header word 2 */