aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Stephani2016-10-25 23:40:34 +0200
committerPhilipp Stephani2016-10-26 23:31:42 +0200
commitb075dc7c00e154bfc3c92aca4f24db68997e8a21 (patch)
tree6453c416549fcc13f61a5cac949852813cdac4f2
parenta856316f18744ba936b507e37622b55786b27839 (diff)
downloademacs-b075dc7c00e154bfc3c92aca4f24db68997e8a21.tar.gz
emacs-b075dc7c00e154bfc3c92aca4f24db68997e8a21.zip
malloc is redefined by config.h
But we need to define emacs as preprocessor symbol, not just EMACS.
-rw-r--r--lib/libtask/taskimpl.h10
-rw-r--r--src/Makefile.in2
2 files changed, 1 insertions, 11 deletions
diff --git a/lib/libtask/taskimpl.h b/lib/libtask/taskimpl.h
index 2b1dd8f9f5e..2b1e31cfc7b 100644
--- a/lib/libtask/taskimpl.h
+++ b/lib/libtask/taskimpl.h
@@ -212,13 +212,3 @@ void deltask(Tasklist*, Task*);
212 212
213extern Task *taskrunning; 213extern Task *taskrunning;
214extern int taskcount; 214extern int taskcount;
215
216
217#ifdef EMACS
218#define malloc unexec_malloc
219#define realloc unexec_realloc
220#define free unexec_free
221void *unexec_malloc (size_t size);
222void *unexec_realloc (void *old_ptr, size_t new_size);
223void unexec_free (void *ptr);
224#endif
diff --git a/src/Makefile.in b/src/Makefile.in
index aa2db118d2c..35703160e20 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -611,7 +611,7 @@ libtask = \
611$(libtask): $(lib)/libtask/*.h 611$(libtask): $(lib)/libtask/*.h
612 612
613$(lib)/libtask/%.o: $(lib)/libtask/%.c $(lib)/libtask/*.h lisp.h config.h globals.h 613$(lib)/libtask/%.o: $(lib)/libtask/%.c $(lib)/libtask/*.h lisp.h config.h globals.h
614 $(AM_V_CC)$(CC) -c -DEMACS -I. -I$(lib) $(CPPFLAGS) $(CFLAGS) -o $@ $< 614 $(AM_V_CC)$(CC) -c -DEMACS -Demacs -I. -I$(lib) $(CPPFLAGS) $(CFLAGS) -o $@ $<
615 615
616## We have to create $(etc) here because init_cmdargs tests its 616## We have to create $(etc) here because init_cmdargs tests its
617## existence when setting Vinstallation_directory (FIXME?). 617## existence when setting Vinstallation_directory (FIXME?).