aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoland McGrath1992-10-12 21:40:50 +0000
committerRoland McGrath1992-10-12 21:40:50 +0000
commitaef4d5705481f15287e6901622ae51c2ebdaef21 (patch)
tree6e367935d224a7a11a2e787f9b947cd826626cb9 /src
parent6f97c96a779ee108403371d95f25c384200f719e (diff)
downloademacs-aef4d5705481f15287e6901622ae51c2ebdaef21.tar.gz
emacs-aef4d5705481f15287e6901622ae51c2ebdaef21.zip
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. */
24 hole between the first bloc and the end of malloc storage. */ 24 hole between the first bloc and the end of malloc storage. */
25 25
26#ifdef emacs 26#ifdef emacs
27
27#include "config.h" 28#include "config.h"
28#include "lisp.h" /* Needed for VALBITS. */ 29#include "lisp.h" /* Needed for VALBITS. */
29 30
31#undef NULL
32
30/* Declared in dispnew.c, this version doesn't screw up if regions 33/* Declared in dispnew.c, this version doesn't screw up if regions
31 overlap. */ 34 overlap. */
32extern void safe_bcopy (); 35extern void safe_bcopy ();
33#endif
34 36
35#ifndef emacs 37#include "getpagesize.h"
38
39#else /* Not emacs. */
40
36#include <stddef.h> 41#include <stddef.h>
42
37typedef size_t SIZE; 43typedef size_t SIZE;
38typedef void *POINTER; 44typedef void *POINTER;
45
39#define EXCEEDS_LISP_PTR(x) 0 46#define EXCEEDS_LISP_PTR(x) 0
40 47
48#include <unistd.h>
49#include <malloc.h>
50#include <string.h>
51
41#define safe_bcopy(x, y, z) memmove (y, x, z) 52#define safe_bcopy(x, y, z) memmove (y, x, z)
42#endif
43 53
44#undef NULL 54#endif /* emacs. */
45#include "mem-limits.h"
46#include "getpagesize.h"
47 55
48#define NIL ((POINTER) 0) 56#define NIL ((POINTER) 0)
49 57
@@ -436,7 +444,7 @@ r_alloc_init ()
436 __morecore = r_alloc_sbrk; 444 __morecore = r_alloc_sbrk;
437 445
438 virtual_break_value = break_value = (*real_morecore) (0); 446 virtual_break_value = break_value = (*real_morecore) (0);
439 if (break_value == NULL) 447 if (break_value == NIL)
440 abort (); 448 abort ();
441 449
442 page_break_value = (POINTER) ROUNDUP (break_value); 450 page_break_value = (POINTER) ROUNDUP (break_value);