summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-08-08 16:39:25 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2015-08-10 08:35:14 -0400
commit7029c034081ee56d907a835ba9e4a94c935c7b1b (patch)
tree1e9457c268a1afb0856a43e1b5e44e7cb14fab1a /malloc.c
parent6147b0088faa521d6b4bc8bb97279ad46f5365a0 (diff)
downloadperl-7029c034081ee56d907a835ba9e4a94c935c7b1b.tar.gz
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.)
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/malloc.c b/malloc.c
index 05810b5f97..69b6b95ecb 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