From 6f23614b06d2e970658ac473759fe3cf368918a5 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 9 Dec 1993 16:31:05 +0000 Subject: [PATCH] Fixed problem with calloc() declaration --- mach/sun2/cv/cv.c | 7 +++++-- mach/sun3/cv/cv.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mach/sun2/cv/cv.c b/mach/sun2/cv/cv.c index cf075ab2e..b09345c63 100644 --- a/mach/sun2/cv/cv.c +++ b/mach/sun2/cv/cv.c @@ -14,6 +14,11 @@ #include long lseek(); +#if __STDC__ +#include +#else +char *calloc(), *malloc(); +#endif #define OMAGIC 0407 /* old-fashioned */ #define NMAGIC 0410 /* text write protexted */ @@ -285,7 +290,6 @@ writef(addr,sz,cnt) */ emits(section) struct outsect *section ; { char *p; - char *calloc(), *malloc(); long sz = section->os_flen; rd_outsect(section - outsect); @@ -499,7 +503,6 @@ emit_symtab() register struct outname *A; struct sym *MACHnames; register struct sym *M; - extern char *malloc(), *calloc(); char *chars; long offX = OFF_CHAR(outhead) - 4; diff --git a/mach/sun3/cv/cv.c b/mach/sun3/cv/cv.c index cf075ab2e..b09345c63 100644 --- a/mach/sun3/cv/cv.c +++ b/mach/sun3/cv/cv.c @@ -14,6 +14,11 @@ #include long lseek(); +#if __STDC__ +#include +#else +char *calloc(), *malloc(); +#endif #define OMAGIC 0407 /* old-fashioned */ #define NMAGIC 0410 /* text write protexted */ @@ -285,7 +290,6 @@ writef(addr,sz,cnt) */ emits(section) struct outsect *section ; { char *p; - char *calloc(), *malloc(); long sz = section->os_flen; rd_outsect(section - outsect); @@ -499,7 +503,6 @@ emit_symtab() register struct outname *A; struct sym *MACHnames; register struct sym *M; - extern char *malloc(), *calloc(); char *chars; long offX = OFF_CHAR(outhead) - 4;