Commit 40dc6bf4 authored by Glenn Morris's avatar Glenn Morris
Browse files

Set rallocobj with configure, not cpp.

* configure.in (REL_ALLOC): Unset on gnu, gnu-linux if DOUG_LEA_MALLOC.
(RALLOC_OBJ): New output variable.
* config.bat (RALLOC_OBJ): Edit to empty if sys_malloc.

* src/Makefile.in (RALLOC_OBJ): New, set by configure.
(rallocobj): Replace with the previous variable.
(otherobj): Use $RALLOC_OBJ.

* src/s/gnu.h (REL_ALLOC) [DOUG_LEA_MALLOC]:
* src/s/gnu-linux.h (REL_ALLOC) [DOUG_LEA_MALLOC]: Move undef to configure.

* msdos/sed1v2.inp (RALLOC_OBJ): Edit to ralloc.o.
parent be4ff9da
2010-05-18 Glenn Morris <rgm@gnu.org> 2010-05-18 Glenn Morris <rgm@gnu.org>
* config.bat (RALLOC_OBJ): Edit to empty if sys_malloc.
* configure.in (REL_ALLOC): Unset on gnu, gnu-linux if DOUG_LEA_MALLOC.
(RALLOC_OBJ): New output variable.
* config.bat (GMALLOC_OBJ, VMLIMIT_OBJ): Edit to empty if sys_malloc. * config.bat (GMALLOC_OBJ, VMLIMIT_OBJ): Edit to empty if sys_malloc.
* configure.in (GMALLOC_OBJ, VMLIMIT_OBJ): New output variables. * configure.in (GMALLOC_OBJ, VMLIMIT_OBJ): New output variables.
......
...@@ -203,8 +203,9 @@ rm -f makefile.tmp ...@@ -203,8 +203,9 @@ rm -f makefile.tmp
if "%sys_malloc%" == "" goto src5a if "%sys_malloc%" == "" goto src5a
sed -e "/^GMALLOC_OBJ *=/s/gmalloc.o//" <Makefile >makefile.tmp sed -e "/^GMALLOC_OBJ *=/s/gmalloc.o//" <Makefile >makefile.tmp
sed -e "/^VMLIMIT_OBJ *=/s/vm-limit.o//" <makefile.tmp >Makefile sed -e "/^VMLIMIT_OBJ *=/s/vm-limit.o//" <makefile.tmp >makefile.tmp2
rm -f makefile.tmp sed -e "/^RALLOC_OBJ *=/s/ralloc.o//" <makefile.tmp2 >Makefile
rm -f makefile.tmp makefile.tmp2
:src5a :src5a
if "%nodebug%" == "" goto src6 if "%nodebug%" == "" goto src6
......
...@@ -1613,6 +1613,14 @@ if test "$doug_lea_malloc" = "yes" ; then ...@@ -1613,6 +1613,14 @@ if test "$doug_lea_malloc" = "yes" ; then
fi fi
AC_DEFINE(DOUG_LEA_MALLOC, 1, AC_DEFINE(DOUG_LEA_MALLOC, 1,
[Define to 1 if you are using the GNU C Library.]) [Define to 1 if you are using the GNU C Library.])
## Use mmap directly for allocating larger buffers.
## FIXME this comes from src/s/{gnu,gnu-linux}.h:
## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
## Does the AC_FUNC_MMAP test below make this check unecessary?
case "$opsys" in
gnu*) REL_ALLOC=no ;;
esac
fi fi
if test x"${REL_ALLOC}" = x; then if test x"${REL_ALLOC}" = x; then
...@@ -3198,16 +3206,21 @@ if test "${HAVE_MENUS}" = "yes" ; then ...@@ -3198,16 +3206,21 @@ if test "${HAVE_MENUS}" = "yes" ; then
(This is automatic if you use X, but the option to specify it remains.) (This is automatic if you use X, but the option to specify it remains.)
It is also defined with other window systems that support xmenu.c.]) It is also defined with other window systems that support xmenu.c.])
fi fi
if test "${GNU_MALLOC}" = "yes" ; then if test "${GNU_MALLOC}" = "yes" ; then
AC_DEFINE(GNU_MALLOC, 1, AC_DEFINE(GNU_MALLOC, 1,
[Define to 1 if you want to use the GNU memory allocator.]) [Define to 1 if you want to use the GNU memory allocator.])
fi fi
RALLOC_OBJ=
if test "${REL_ALLOC}" = "yes" ; then if test "${REL_ALLOC}" = "yes" ; then
AC_DEFINE(REL_ALLOC, 1, AC_DEFINE(REL_ALLOC, 1,
[Define REL_ALLOC if you want to use the relocating allocator for [Define REL_ALLOC if you want to use the relocating allocator for
buffer space.]) buffer space.])
fi
test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
fi
AC_SUBST(RALLOC_OBJ)
if test "$opsys" = "cygwin"; then if test "$opsys" = "cygwin"; then
CYGWIN_OBJ="sheap.o" CYGWIN_OBJ="sheap.o"
......
2010-05-18 Glenn Morris <rgm@gnu.org> 2010-05-18 Glenn Morris <rgm@gnu.org>
* sed1v2.inp (RALLOC_OBJ): Edit to ralloc.o.
* sed1v2.inp (GMALLOC_OBJ): Edit to gmalloc.o. * sed1v2.inp (GMALLOC_OBJ): Edit to gmalloc.o.
(VMLIMIT_OBJ): Edit to vm-limit.o. (VMLIMIT_OBJ): Edit to vm-limit.o.
......
...@@ -118,6 +118,7 @@ s/\.h\.in/.h-in/ ...@@ -118,6 +118,7 @@ s/\.h\.in/.h-in/
/^LIBX_OTHER *=/s/@LIBX_OTHER@// /^LIBX_OTHER *=/s/@LIBX_OTHER@//
/^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/ /^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/
/^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/ /^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/
/^RALLOC_OBJ *=/s/@RALLOC_OBJ@/ralloc.o/
/^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/ /^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/
/^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/ /^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/
/^UNEXEC_OBJ *=/s/@unexec@/unexec.o/ /^UNEXEC_OBJ *=/s/@unexec@/unexec.o/
......
2010-05-18 Glenn Morris <rgm@gnu.org> 2010-05-18 Glenn Morris <rgm@gnu.org>
   
* Makefile.in (RALLOC_OBJ): New, set by configure.
(rallocobj): Replace with the previous variable.
(otherobj): Use $RALLOC_OBJ.
* s/gnu.h (REL_ALLOC) [DOUG_LEA_MALLOC]:
* s/gnu-linux.h (REL_ALLOC) [DOUG_LEA_MALLOC]: Move undef to configure.
* Makefile.in (GMALLOC_OBJ, VMLIMIT_OBJ): New, set by configure. * Makefile.in (GMALLOC_OBJ, VMLIMIT_OBJ): New, set by configure.
(gmallocobj, vmlimitobj): Replace with previous two variables. (gmallocobj, vmlimitobj): Replace with previous two variables.
(otherobj): Use $GMALLOC_OBJ, $VMLIMIT_OBJ. (otherobj): Use $GMALLOC_OBJ, $VMLIMIT_OBJ.
......
...@@ -407,11 +407,8 @@ GMALLOC_OBJ=@GMALLOC_OBJ@ ...@@ -407,11 +407,8 @@ GMALLOC_OBJ=@GMALLOC_OBJ@
/* vm-limit.o if !SYSTEM_MALLOC, else empty. */ /* vm-limit.o if !SYSTEM_MALLOC, else empty. */
VMLIMIT_OBJ=@VMLIMIT_OBJ@ VMLIMIT_OBJ=@VMLIMIT_OBJ@
#if defined (REL_ALLOC) && ! defined (SYSTEM_MALLOC) /* ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty. */
rallocobj = ralloc.o RALLOC_OBJ=@RALLOC_OBJ@
#else
rallocobj =
#endif
/* Empty on Cygwin, lastfile.o elsewhere. */ /* Empty on Cygwin, lastfile.o elsewhere. */
PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@ PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@
...@@ -419,7 +416,7 @@ PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@ ...@@ -419,7 +416,7 @@ PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@
POST_ALLOC_OBJ=@POST_ALLOC_OBJ@ POST_ALLOC_OBJ=@POST_ALLOC_OBJ@
/* List of object files that make-docfile should not be told about. */ /* List of object files that make-docfile should not be told about. */
otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(rallocobj) \ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
$(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS) $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS)
/* This is the platform-specific list of Lisp files loaded into the /* This is the platform-specific list of Lisp files loaded into the
......
...@@ -147,11 +147,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -147,11 +147,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define NARROWPROTO 1 #define NARROWPROTO 1
/* Use mmap directly for allocating larger buffers. */
#ifdef DOUG_LEA_MALLOC
#undef REL_ALLOC
#endif
/* Tell that garbage collector that setjmp is known to save all /* Tell that garbage collector that setjmp is known to save all
registers relevant for conservative garbage collection in the jmp_buf. */ registers relevant for conservative garbage collection in the jmp_buf. */
/* Not all the architectures are tested, but there are Debian packages /* Not all the architectures are tested, but there are Debian packages
......
/* Definitions file for GNU Emacs running on the GNU Hurd. /* Definitions file for GNU Emacs running on the GNU Hurd.
Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010 Free Software Foundation, Inc. Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GNU Emacs. This file is part of GNU Emacs.
...@@ -28,11 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -28,11 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define SIGNALS_VIA_CHARACTERS #define SIGNALS_VIA_CHARACTERS
/* Use mmap directly for allocating larger buffers. */
#ifdef DOUG_LEA_MALLOC
#undef REL_ALLOC
#endif
/* GNU needs its own crt0, and libc defines data_start. */ /* GNU needs its own crt0, and libc defines data_start. */
#define ORDINARY_LINK #define ORDINARY_LINK
#define DATA_START ({ extern int data_start; (char *) &data_start; }) #define DATA_START ({ extern int data_start; (char *) &data_start; })
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment