void-packages/srcpkgs/emacs/files/musl.patch
Christian Neukirchen adc9920fab emacs: update to 25.1.
Closes: #4511 [via git-merge-pr]
2016-09-18 14:22:49 +02:00

87 lines
2 KiB
Diff

--- configure
+++ configure
@@ -2092,7 +2092,7 @@
system_malloc=$emacs_cv_sanitize_address
-hybrid_malloc=
+hybrid_malloc=yes
case "$opsys" in
## darwin ld insists on the use of malloc routines in the System framework.
--- src/Makefile.in
+++ src/Makefile.in
@@ -373,6 +373,7 @@
region-cache.o sound.o atimer.o \
doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \
profiler.o decompress.o \
+ sheap.o \
$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \
$(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ)
obj = $(base_obj) $(NS_OBJC_OBJ)
--- src/gmalloc.c
+++ src/gmalloc.c
@@ -72,7 +72,7 @@
#define free gfree
#endif /* HYBRID_MALLOC */
-#ifdef CYGWIN
+//#ifdef CYGWIN
extern void *bss_sbrk (ptrdiff_t size);
extern int bss_sbrk_did_unexec;
extern char bss_sbrk_buffer[];
@@ -80,7 +80,7 @@
#define DUMPED bss_sbrk_did_unexec
#define ALLOCATED_BEFORE_DUMPING(P) \
((P) < bss_sbrk_buffer_end && (P) >= (void *) bss_sbrk_buffer)
-#endif
+//#endif
#ifdef __cplusplus
extern "C"
@@ -1525,16 +1525,19 @@
__default_morecore (ptrdiff_t increment)
{
void *result;
-#if defined (CYGWIN)
+//#if defined (CYGWIN)
if (!DUMPED)
{
return bss_sbrk (increment);
}
-#endif
+//#endif
+#if 0
result = (void *) __sbrk (increment);
if (result == (void *) -1)
return NULL;
return result;
+#endif
+ return NULL;
}
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
--- src/print.c
+++ src/print.c
@@ -755,7 +755,7 @@
print_output_debug_flag = x;
}
-#if defined (GNU_LINUX)
+#if defined (GNU_LINUX) && defined (__GLIBC__)
/* This functionality is not vitally important in general, so we rely on
non-portable ability to use stderr as lvalue. */
--- src/unexelf.c
+++ src/unexelf.c
@@ -632,6 +632,9 @@
off_t new_file_size;
void *new_break;
+ extern int bss_sbrk_did_unexec;
+ bss_sbrk_did_unexec = 1;
+
/* Pointers to the base of the image of the two files. */
caddr_t old_base, new_base;