From: ceriel Date: Mon, 21 Aug 1989 11:43:41 +0000 (+0000) Subject: declaration of sprintf only if __STDC__ is not defined X-Git-Tag: release-5-5~2281 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=319d9bcfe0406e5071077c9029c3b0b04d2fd5f3;p=ack.git declaration of sprintf only if __STDC__ is not defined --- diff --git a/mach/proto/as/comm7.c b/mach/proto/as/comm7.c index 7c976cdf0..492a24445 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 eb75f93e2..1d66c749e 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 dd95f9801..993500020 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 7d62a381b..12cf181b4 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 f8e2747a7..7bf82b1ec 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;