summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-08-29 09:12:59 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-08-29 09:12:59 +0000
commit4dfc412b7eb33b2ea67a288317dc834237cb0efc (patch)
tree82e78658d1c1997eacafbe92009944e110d9efa7 /malloc.c
parent77fb7b16ae6d07dddec9ce94d6a3c448380edebb (diff)
downloadperl-4dfc412b7eb33b2ea67a288317dc834237cb0efc.tar.gz
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".
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/malloc.c b/malloc.c
index 806d03754e..f5b9f076a0 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