Skip to content
Browse files

Remove commented-out "support" for perl's malloc with x2p.

In 1998 commit 30e2e42 stated

    temporarily disable perl malloc for a2p until we clean up
    conflicting malloc() declarations everywhere

and nothing has changed since. 13 years later, no-one has reported problems,
so it's safe to remove it.
  • Loading branch information...
1 parent f9293c5 commit c2e403ce41fd22d76714cfcbbe2be776a5c37c01 Nicholas Clark committed Dec 8, 2011
Showing with 6 additions and 20 deletions.
  1. +2 −5 malloc.c
  2. +4 −15 x2p/Makefile.SH
View
7 malloc.c
@@ -328,10 +328,7 @@
# define PERL_MAYBE_ALIVE 1
# endif
#else
-# ifdef PERL_FOR_X2P
-# include "../EXTERN.h"
-# include "../perl.h"
-# else
+
# include <stdlib.h>
# include <stdio.h>
# include <memory.h>
@@ -384,7 +381,7 @@
# ifndef MEM_ALIGNBYTES
# define MEM_ALIGNBYTES 4
# endif
-# endif
+
# ifndef croak /* make depend */
# define croak(mess, arg) (warn((mess), (arg)), exit(1))
# endif
View
19 x2p/Makefile.SH
@@ -42,9 +42,6 @@ cat >Makefile <<!GROK!THIS!
CC = $cc
BYACC = $byacc
LDFLAGS = $ldflags
-# XXX Perl malloc temporarily unusable (declaration collisions with stdlib.h)
-#mallocsrc = $mallocsrc
-#mallocobj = $mallocobj
shellflags = $shellflags
libs = $perllibs
@@ -101,9 +98,9 @@ addedbyconf = $(shextract) $(plextract)
h = EXTERN.h INTERN.h ../config.h ../handy.h hash.h a2p.h str.h util.h
-c = hash.c $(mallocsrc) str.c util.c walk.c
+c = hash.c str.c util.c walk.c
-obj = hash$(OBJ_EXT) $(mallocobj) str$(OBJ_EXT) util$(OBJ_EXT) walk$(OBJ_EXT)
+obj = hash$(OBJ_EXT) str$(OBJ_EXT) util$(OBJ_EXT) walk$(OBJ_EXT)
lintflags = -phbvxac
@@ -156,7 +153,7 @@ distclean: veryclean
realclean: clean
-rmdir .depending
- rm -f core $(addedbyconf) all malloc.c
+ rm -f core $(addedbyconf) all
rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old
veryclean: realclean
@@ -170,7 +167,7 @@ veryclean: realclean
lint:
lint $(lintflags) $(defs) $(c) > a2p.fuzz
-depend: $(mallocsrc) ../makedepend
+depend: ../makedepend
sh ../makedepend MAKE=$(MAKE)
clist:
@@ -189,14 +186,6 @@ find2perl: find2perl.PL ../config.sh
s2p: s2p.PL ../config.sh
-malloc.c: ../malloc.c
- rm -f malloc.c
- sed <../malloc.c >malloc.c \
- -e 's/"EXTERN.h"/"..\/EXTERN.h"/' \
- -e 's/"perl.h"/"..\/perl.h"/' \
- -e 's/my_exit/exit/' \
- -e 's/MUTEX_[A-Z_]*(&PL_malloc_mutex);//'
-
# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
$(obj):
@ echo "You haven't done a "'"make depend" yet!'; exit 1

0 comments on commit c2e403c

Please sign in to comment.
Something went wrong with that request. Please try again.