aboutsummaryrefslogtreecommitdiff
path: root/gdb/mcheck.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1991-08-31 01:43:19 +0000
committerStu Grossman <grossman@cygnus>1991-08-31 01:43:19 +0000
commit9e7f3b6a69c70c8dc45c40d9d8c9c37841ba9866 (patch)
treef479c9566101d3a2c144e3f30bdcbac7fa02af6a /gdb/mcheck.c
parent9f2673804c2c96a03b73ef47e1b9f5930fd490a5 (diff)
downloadgdb-9e7f3b6a69c70c8dc45c40d9d8c9c37841ba9866.zip
gdb-9e7f3b6a69c70c8dc45c40d9d8c9c37841ba9866.tar.gz
gdb-9e7f3b6a69c70c8dc45c40d9d8c9c37841ba9866.tar.bz2
Undo edit 1.5. Easier to let abort be of unspecified type than to claim a type
and be wrong half the time.
Diffstat (limited to 'gdb/mcheck.c')
-rwxr-xr-xgdb/mcheck.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gdb/mcheck.c b/gdb/mcheck.c
index 68424cd..309fcfd 100755
--- a/gdb/mcheck.c
+++ b/gdb/mcheck.c
@@ -27,15 +27,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), (void)) = (void (*)()) abort;
/* Arbitrary magical numbers. */
#define MAGICWORD 0xfedabeeb
@@ -47,7 +42,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 +99,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), (void)))
{
static int mcheck_used = 0;