changeset 1403:f0ea279194f8

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.
author Roland McGrath <roland@gnu.org>
date Mon, 12 Oct 1992 21:40:50 +0000
parents 6a0dcfc81b4f
children 1c2080f78a36
files src/ralloc.c
diffstat 1 files changed, 15 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/ralloc.c	Mon Oct 12 21:25:28 1992 +0000
+++ b/src/ralloc.c	Mon Oct 12 21:40:50 1992 +0000
@@ -24,26 +24,34 @@
    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
+
+#include "getpagesize.h"
 
-#ifndef emacs
+#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 @@
   __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);