From eb378da811105910caae4f34bf839735b8a27b96 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Wed, 22 Apr 2009 21:57:37 +0000 Subject: [PATCH] winmessage --- src/misc/alloc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/misc/alloc.c b/src/misc/alloc.c index a785106b0..0081fbb95 100644 --- a/src/misc/alloc.c +++ b/src/misc/alloc.c @@ -20,9 +20,10 @@ $Id$ #undef BOOLEAN #include extern HANDLE outheap; -#endif -#endif extern void winmessage(char* new_msg); +#endif +#endif + /* Malloc num bytes and initialize to zero. Fatal error if the space can't * be tmalloc'd. Return NULL for a request for 0 bytes. @@ -52,7 +53,9 @@ tmalloc(size_t num) #endif if (!s){ fprintf(stderr,"malloc: Internal Error: can't allocate %ld bytes. \n",(long)num); +#ifdef HAS_WINDOWS winmessage("Fatal error in SPICE"); +#endif exit(EXIT_BAD); } return(s); @@ -136,7 +139,9 @@ trealloc(void *ptr, size_t num) } if (!s) { fprintf(stderr,"realloc: Internal Error: can't allocate %ld bytes.\n", (long)num); +#ifdef HAS_WINDOWS winmessage("Fatal error in SPICE"); +#endif exit(EXIT_BAD); } return(s);