* gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
+2002-05-25 Robert Collins <rbtcollins@hotmail.com>
+
+ * gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
+
2002-05-24 Christopher Faylor <cgf@redhat.com>
* dtable.cc (dtable::build_fhandler_from_name): Just pass posix path
#include <gmon.h>
#include <profil.h>
+#include <windows.h>
/* XXX needed? */
//extern char *minbrk __asm ("minbrk");
static void *
fake_sbrk(int size)
{
- return malloc(size);
+ void *rv = malloc(size);
+ if (rv)
+ return rv;
+ else
+ return (void *) -1;
}
void