From: Jarkko Hietaniemi Date: Sat, 8 Aug 2015 20:39:25 +0000 (-0400) Subject: Give a better error if malloc.c is used without MYMALLOC X-Git-Tag: v5.23.2~42 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/7029c034081ee56d907a835ba9e4a94c935c7b1b?hp=6147b0088faa521d6b4bc8bb97279ad46f5365a0 Give a better error if malloc.c is used without MYMALLOC The build will die already on errors because of the missing ASSERT macros (plus get warnings on the implicit declarations, i.e. missing prototypes), but better to give a clear error. FWIW, looking at hints/*, only HP-UX of the even remotely common/current systems seems to use Perl's malloc anymore, and then only if perlio is NOT being used. (Other platforms that seemingly use Perl's malloc include ancient SysVs like SCO 2.3.4, NCR Tower, Tektronix' UTek V, then Unicos and Unicos/mk of Cray, and NEC's SUPER-UX.) (OS/2 still probably does use it, given all the work ilyaz used to pour on it.) --- diff --git a/malloc.c b/malloc.c index 05810b5..69b6b95 100644 --- a/malloc.c +++ b/malloc.c @@ -253,6 +253,10 @@ # define PERL_MAYBE_ALIVE 1 #endif +#ifndef MYMALLOC +# error "MYMALLOC is not defined" +#endif + #ifndef MUTEX_LOCK # define MUTEX_LOCK(l) #endif