aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWolfgang Jenkner2016-01-30 14:20:56 -0800
committerPaul Eggert2016-01-30 15:26:07 -0800
commitd6585a910ed3e9e0e43c093b5fbfeb6d56b703b4 (patch)
tree55f8f2160238a8d2047dbcdf885b4b4c346cb5bb /src
parentdec139084586762793448277ebe80cfa7a1790b3 (diff)
downloademacs-d6585a910ed3e9e0e43c093b5fbfeb6d56b703b4.tar.gz
emacs-d6585a910ed3e9e0e43c093b5fbfeb6d56b703b4.zip
Add musl patch to support HYBRID_MALLOC on elf systems
* src/gmalloc.c: Adjust for HYBRID_MALLOC in the non CYGWIN case. (__default_morecore): Here, in particular. * configure.ac: Define HYBRID_MALLOC when unexelf.o is used. New variable SHEAP_OBJ. * src/Makefile.in: Use it. (Bug#22086)
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in6
-rw-r--r--src/gmalloc.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 6a315427b6f..e59d3b1568f 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -254,7 +254,10 @@ XFIXES_CFLAGS = @XFIXES_CFLAGS@
254## widget.o if USE_X_TOOLKIT, otherwise empty. 254## widget.o if USE_X_TOOLKIT, otherwise empty.
255WIDGET_OBJ=@WIDGET_OBJ@ 255WIDGET_OBJ=@WIDGET_OBJ@
256 256
257## sheap.o if CYGWIN, otherwise empty. 257## sheap.o if HYBRID_MALLOC, otherwise empty.
258SHEAP_OBJ=@SHEAP_OBJ@
259
260## cygw32.o if CYGWIN, otherwise empty.
258CYGWIN_OBJ=@CYGWIN_OBJ@ 261CYGWIN_OBJ=@CYGWIN_OBJ@
259 262
260## fontset.o fringe.o image.o if we have any window system 263## fontset.o fringe.o image.o if we have any window system
@@ -397,6 +400,7 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
397 doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \ 400 doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \
398 $(XWIDGETS_OBJ) \ 401 $(XWIDGETS_OBJ) \
399 profiler.o decompress.o \ 402 profiler.o decompress.o \
403 $(SHEAP_OBJ) \
400 $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \ 404 $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \
401 $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ) 405 $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ)
402obj = $(base_obj) $(NS_OBJC_OBJ) 406obj = $(base_obj) $(NS_OBJC_OBJ)
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 72d65af4974..30e01319e0e 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -70,7 +70,7 @@ extern void emacs_abort (void);
70#define aligned_alloc galigned_alloc 70#define aligned_alloc galigned_alloc
71#define free gfree 71#define free gfree
72 72
73#ifdef CYGWIN 73#ifdef HYBRID_MALLOC
74extern void *bss_sbrk (ptrdiff_t size); 74extern void *bss_sbrk (ptrdiff_t size);
75extern int bss_sbrk_did_unexec; 75extern int bss_sbrk_did_unexec;
76extern char bss_sbrk_buffer[]; 76extern char bss_sbrk_buffer[];
@@ -1542,7 +1542,7 @@ void *
1542__default_morecore (ptrdiff_t increment) 1542__default_morecore (ptrdiff_t increment)
1543{ 1543{
1544 void *result; 1544 void *result;
1545#if defined (CYGWIN) 1545#ifdef HYBRID_MALLOC
1546 if (!DUMPED) 1546 if (!DUMPED)
1547 { 1547 {
1548 return bss_sbrk (increment); 1548 return bss_sbrk (increment);