summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1992-10-12 21:40:50 +0000
committerRoland McGrath <roland@gnu.org>1992-10-12 21:40:50 +0000
commitaef4d5705481f15287e6901622ae51c2ebdaef21 (patch)
tree6e367935d224a7a11a2e787f9b947cd826626cb9 /src
parent6f97c96a779ee108403371d95f25c384200f719e (diff)
downloademacs-aef4d5705481f15287e6901622ae51c2ebdaef21.tar.gz
Removed #include "mem-limits.h".
[emacs]: Moved #undef NULL and #include "getpagesize.h" here. [! emacs]: #include <unistd.h>, <malloc.h>, <string.h>. (r_alloc_init): Use NIL, not NULL.
Diffstat (limited to 'src')
-rw-r--r--src/ralloc.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/ralloc.c b/src/ralloc.c
index f2d0ecf14fa..70af2b9b147 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -24,26 +24,34 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
hole between the first bloc and the end of malloc storage. */
#ifdef emacs
+
#include "config.h"
#include "lisp.h" /* Needed for VALBITS. */
+#undef NULL
+
/* Declared in dispnew.c, this version doesn't screw up if regions
overlap. */
extern void safe_bcopy ();
-#endif
-#ifndef emacs
+#include "getpagesize.h"
+
+#else /* Not emacs. */
+
#include <stddef.h>
+
typedef size_t SIZE;
typedef void *POINTER;
+
#define EXCEEDS_LISP_PTR(x) 0
+#include <unistd.h>
+#include <malloc.h>
+#include <string.h>
+
#define safe_bcopy(x, y, z) memmove (y, x, z)
-#endif
-#undef NULL
-#include "mem-limits.h"
-#include "getpagesize.h"
+#endif /* emacs. */
#define NIL ((POINTER) 0)
@@ -436,7 +444,7 @@ r_alloc_init ()
__morecore = r_alloc_sbrk;
virtual_break_value = break_value = (*real_morecore) (0);
- if (break_value == NULL)
+ if (break_value == NIL)
abort ();
page_break_value = (POINTER) ROUNDUP (break_value);