From 01be8af60bc85cf8671c5582559174abfaf333ab Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Tue, 11 Feb 1997 21:01:23 +0000 Subject: [PATCH] Declare malloc and friends From-SVN: r13628 --- gcc/config/rs6000/xm-rs6000.h | 7 +++++++ gcc/config/rs6000/xm-sysv4.h | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/gcc/config/rs6000/xm-rs6000.h b/gcc/config/rs6000/xm-rs6000.h index 9dbd41ed7ba..df6e4e7ad97 100644 --- a/gcc/config/rs6000/xm-rs6000.h +++ b/gcc/config/rs6000/xm-rs6000.h @@ -59,3 +59,10 @@ extern char *alloca (); collect has a chance to see them, so scan the object files directly. */ #define COLLECT_EXPORT_LIST #endif + +#ifndef __STDC__ +extern char *malloc (), *realloc (), *calloc (); +#else +extern void *malloc (), *realloc (), *calloc (); +#endif +extern void free (); diff --git a/gcc/config/rs6000/xm-sysv4.h b/gcc/config/rs6000/xm-sysv4.h index 5d654f4a156..4e8ee79cbd4 100644 --- a/gcc/config/rs6000/xm-sysv4.h +++ b/gcc/config/rs6000/xm-sysv4.h @@ -58,3 +58,12 @@ extern char *alloca (); /* Solaris has a different declaration of sys_siglist than collect uses. */ #define DONT_DECLARE_SYS_SIGLIST + +#ifdef __PPC__ +#ifndef __STDC__ +extern char *malloc (), *realloc (), *calloc (); +#else +extern void *malloc (), *realloc (), *calloc (); +#endif +extern void free (); +#endif -- 2.30.2