From: Perl 5 Porters Date: Thu, 29 Aug 1996 09:12:59 +0000 (+0000) Subject: perl 5.003_04: malloc.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4dfc412b7eb33b2ea67a288317dc834237cb0efc;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_04: malloc.c A patch to perl5.003_02/malloc to give a sensible error abort() message in ANSI C, and to give it to stderr instead of stdout. Use config_h's STRINGIFY macro instead of pre-ANSI "p". --- diff --git a/malloc.c b/malloc.c index 806d037..f5b9f07 100644 --- a/malloc.c +++ b/malloc.c @@ -168,13 +168,12 @@ static u_int nmalloc[NBUCKETS]; #endif #ifdef DEBUGGING -#define ASSERT(p) if (!(p)) botch("p"); else +#define ASSERT(p) if (!(p)) botch(STRINGIFY(p)); else static void botch(s) char *s; { - - printf("assertion botched: %s\n", s); + PerlIO_printf(PerlIO_stderr(), "assertion botched: %s\n", s); abort(); } #else