diff --git a/mach/proto/as/comm7.c b/mach/proto/as/comm7.c index 7c976cdf..492a2444 100644 --- a/mach/proto/as/comm7.c +++ b/mach/proto/as/comm7.c @@ -12,7 +12,11 @@ #include "comm1.h" #include "y.tab.h" -extern char *sprintf(); +#ifndef __STDC__ +extern char *sprintf(); +#else +/* sprintf should be declared in stdio.h, as returning an int */ +#endif valu_t load(ip) diff --git a/mach/proto/ncg/compute.c b/mach/proto/ncg/compute.c index eb75f93e..1d66c749 100644 --- a/mach/proto/ncg/compute.c +++ b/mach/proto/ncg/compute.c @@ -19,7 +19,11 @@ static char rcsid[] = "$Header$"; * Author: Hans van Staveren */ -extern char *sprintf(); +#ifndef __STDC__ +extern char *sprintf(); +#else +/* sprintf should be declared in stdio.h, as returning an int */ +#endif #define LLEAF 01 #define LDEF 02 diff --git a/mach/proto/ncg/fillem.c b/mach/proto/ncg/fillem.c index dd95f980..99350002 100644 --- a/mach/proto/ncg/fillem.c +++ b/mach/proto/ncg/fillem.c @@ -29,7 +29,11 @@ static char rcsid2[] = "$Header$"; * Author: Hans van Staveren */ -extern char *sprintf(); +#ifndef __STDC__ +extern char *sprintf(); +#else +/* sprintf should be declared in stdio.h, as returning an int */ +#endif #ifndef newplb /* retrofit for older mach.h */ #define newplb newilb diff --git a/mach/proto/ncg/gencode.c b/mach/proto/ncg/gencode.c index 7d62a381..12cf181b 100644 --- a/mach/proto/ncg/gencode.c +++ b/mach/proto/ncg/gencode.c @@ -19,7 +19,11 @@ static char rcsid[] = "$Header$"; * Author: Hans van Staveren */ -extern char *sprintf(); +#ifndef __STDC__ +extern char *sprintf(); +#else +/* sprintf should be declared in stdio.h, as returning an int */ +#endif string mystrcpy(); diff --git a/util/cgg/main.c b/util/cgg/main.c index f8e2747a..7bf82b1e 100644 --- a/util/cgg/main.c +++ b/util/cgg/main.c @@ -7,7 +7,12 @@ #include "booth.h" -char *strncpy(), *strcpy(), *sprintf(); +extern char *strncpy(), *strcpy(); +#ifndef __STDC__ +extern char *sprintf(); +#else +/* sprintf should be declared in stdio.h, as returning an int */ +#endif char * myalloc(n) { register char *p;