Preliminary cleanup for splitting host/native/target.
[deliverable/binutils-gdb.git] / gdb / mcheck.c
index 68424cd8e490edea9240bd7a9a5514c2b6eabdd7..38b997a97e82c71d7afd23e0dd3cc7ed0fce8941 100755 (executable)
@@ -20,6 +20,10 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "ansidecl.h"
+#define size_t unsigned int
+#define ptrdiff_t int
+#define NULL 0
+#define __ONEFILE
 #include "gmalloc.h"
 
 /* Old hook values.  */
@@ -27,15 +31,10 @@ static void EXFUN((*old_free_hook), (PTR ptr));
 static PTR EXFUN((*old_malloc_hook), (size_t size));
 static PTR EXFUN((*old_realloc_hook), (PTR ptr, size_t size));
 
-#ifdef sgi
-#define ABORT_RETURNS int
-#else
-#define ABORT_RETURNS void
-#endif
 
 /* Function to call when something awful happens. */
-extern ABORT_RETURNS abort();
-static ABORT_RETURNS EXFUN((*abortfunc), (void)) = abort;
+extern void abort();
+static void EXFUN((*abortfunc), (NOARGS)) = (void (*)()) abort;
 
 /* Arbitrary magical numbers.  */
 #define MAGICWORD      0xfedabeeb
@@ -47,7 +46,7 @@ struct hdr
     unsigned int magic;                /* Magic number to check header integrity.  */
   };
 
-static ABORT_RETURNS
+static void
 DEFUN(checkhdr, (hdr), CONST struct hdr *hdr)
 {
   if (hdr->magic != MAGICWORD || ((char *) &hdr[1])[hdr->size] != MAGICBYTE)
@@ -104,7 +103,7 @@ DEFUN(reallochook, (ptr, size), PTR ptr AND size_t size)
 }
 
 void
-DEFUN(mcheck, (func), ABORT_RETURNS EXFUN((*func), (void)))
+DEFUN(mcheck, (func), void EXFUN((*func), (NOARGS)))
 {
   static int mcheck_used = 0;
 
This page took 0.023854 seconds and 4 git commands to generate.