]> git.eshelyaron.com Git - emacs.git/commitdiff
(r_alloc_init_fd): Conditionalize on MAP_ANON.
authorDave Love <fx@gnu.org>
Fri, 8 Sep 2000 14:10:31 +0000 (14:10 +0000)
committerDave Love <fx@gnu.org>
Fri, 8 Sep 2000 14:10:31 +0000 (14:10 +0000)
src/ChangeLog
src/ralloc.c

index fbea366446f7005d0cdc272a3daf283b96ec1b93..8890208932549abd89cf090405e65bfd1255750a 100644 (file)
 
 2000-09-08  Dave Love  <fx@gnu.org>
 
+       * s/sol2.h (REL_ALLOC_MMAP): Define.
+       * s/irix5-0.h (REL_ALLOC_MMAP): Likewise.
+
+       * ralloc.c: Don't include string.h (redundant).
+       (MAP_ANON) [REL_ALLOC_MMAP]: Ensure it's defined.
+       [!MAP_ANON]: Include fcntl.h.
+       (mmap_fd) [REL_ALLOC_MMAP]: New variable.
+       (r_alloc, r_re_alloc, r_alloc_free)
+       (mmap_enlarge, mmap_set_vars): Use it.
+       (r_alloc_init_fd): New function.
+       (__morecore) [SYSTEM_MALLOC]: Don't declare.
+       (r_alloc_init): Call r_alloc_init_fd.  Conditionalize stuff on
+       malloc type.
+
+       * Makefile.in (allocaobj) [!SYSTEM_MALLOC && REL_ALLOC_MMAP]:
+       Remove vm-limit.o.
+
        * unexelf.c (SHT_MIPS_DEBUG, HDRR) [__mips__]: Really confine last
        change to __NetBSD__.
 
index f6ae887f4c1cf8796736f560841002ab7273fb91..65015d5f3740706776240799bba25ffe3d91c330 100644 (file)
@@ -1322,10 +1322,12 @@ void r_alloc_free P_ ((POINTER_TYPE **ptr));
 void
 r_alloc_init_fd ()
 {
+#if !MAP_ANON
   /* No anonymous mmap -- we need the file descriptor.  */
   mmap_fd = open ("/dev/zero", O_RDONLY);
   if (mmap_fd < 0)
     fatal ("cannot open /dev/zero");
+#endif
 }
 
 /* Return a region overlapping address range START...END, or null if