]> code.delx.au - gnu-emacs/blobdiff - src/ralloc.c
; Merge from origin/emacs-25
[gnu-emacs] / src / ralloc.c
index 12d2fa9ab50fddbdb3f451ae628ff8a07b134fb4..071cee777e98db76ba2e2c12d8f918b68f9196a8 100644 (file)
@@ -5,8 +5,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,31 +22,15 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    rather than all of them.  This means allowing for a possible
    hole between the first bloc and the end of malloc storage.  */
 
-#ifdef emacs
-
 #include <config.h>
 
-#include "lisp.h"              /* Needed for VALBITS.  */
-#include "blockinput.h"
-
-#include <unistd.h>
-
-#ifdef DOUG_LEA_MALLOC
-#define M_TOP_PAD           -2
-extern int mallopt (int, int);
-#else /* not DOUG_LEA_MALLOC */
-#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
-extern size_t __malloc_extra_blocks;
-#endif /* not SYSTEM_MALLOC and not HYBRID_MALLOC */
-#endif /* not DOUG_LEA_MALLOC */
-
-#else /* not emacs */
-
 #include <stddef.h>
-#include <malloc.h>
-
-#endif /* not emacs */
 
+#ifdef emacs
+# include "lisp.h"
+# include "blockinput.h"
+# include <unistd.h>
+#endif
 
 #include "getpagesize.h"
 
@@ -95,7 +79,9 @@ static int extra_bytes;
 /* The hook `malloc' uses for the function which gets more space
    from the system.  */
 
-#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
+#ifdef HAVE_MALLOC_H
+# include <malloc.h>
+#else
 extern void *(*__morecore) (ptrdiff_t);
 #endif