changeset 31513:6e606fa28569

(r_alloc_init_fd): Move. Fix conditional for pcc.
author Dave Love <fx@gnu.org>
date Fri, 08 Sep 2000 16:31:11 +0000
parents 83b2a14bea5b
children 2c900086fb10
files src/ralloc.c
diffstat 1 files changed, 16 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/ralloc.c	Fri Sep 08 16:14:29 2000 +0000
+++ b/src/ralloc.c	Fri Sep 08 16:31:11 2000 +0000
@@ -1317,18 +1317,7 @@
 POINTER_TYPE *r_alloc P_ ((POINTER_TYPE **, size_t));
 POINTER_TYPE *r_re_alloc P_ ((POINTER_TYPE **, size_t));
 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
-}
+void r_alloc_init_fd ();
 
 /* Return a region overlapping address range START...END, or null if
    none.  END is not including, i.e. the last byte in the range
@@ -1667,6 +1656,21 @@
 extern POINTER (*__morecore) ();
 #endif
 
+/* Set up the file descriptor for non-anonymous mmapping.  */
+
+void
+r_alloc_init_fd ()
+{
+#ifdef REL_ALLOC_MMAP
+#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
+#endif
+}
+
 /* Initialize various things for memory allocation.  */
 
 static void