declaration of sprintf only if __STDC__ is not defined
authorceriel <none@none>
Mon, 21 Aug 1989 11:43:41 +0000 (11:43 +0000)
committerceriel <none@none>
Mon, 21 Aug 1989 11:43:41 +0000 (11:43 +0000)
mach/proto/as/comm7.c
mach/proto/ncg/compute.c
mach/proto/ncg/fillem.c
mach/proto/ncg/gencode.c
util/cgg/main.c

index 7c976cd..492a244 100644 (file)
 #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)
index eb75f93..1d66c74 100644 (file)
@@ -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
index dd95f98..9935000 100644 (file)
@@ -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
index 7d62a38..12cf181 100644 (file)
@@ -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();
 
index f8e2747..7bf82b1 100644 (file)
@@ -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;