comparison src/ralloc.c @ 31504:33510affffb3

(r_alloc_init_fd): Conditionalize on MAP_ANON.
author Dave Love <fx@gnu.org>
date Fri, 08 Sep 2000 14:10:07 +0000
parents 17d4a8f3df67
children 6bc82db7d305
comparison
equal deleted inserted replaced
31503:f3dc37a3c26a 31504:33510affffb3
1320 1320
1321 1321
1322 void 1322 void
1323 r_alloc_init_fd () 1323 r_alloc_init_fd ()
1324 { 1324 {
1325 #if !MAP_ANON
1325 /* No anonymous mmap -- we need the file descriptor. */ 1326 /* No anonymous mmap -- we need the file descriptor. */
1326 mmap_fd = open ("/dev/zero", O_RDONLY); 1327 mmap_fd = open ("/dev/zero", O_RDONLY);
1327 if (mmap_fd < 0) 1328 if (mmap_fd < 0)
1328 fatal ("cannot open /dev/zero"); 1329 fatal ("cannot open /dev/zero");
1330 #endif
1329 } 1331 }
1330 1332
1331 /* Return a region overlapping address range START...END, or null if 1333 /* Return a region overlapping address range START...END, or null if
1332 none. END is not including, i.e. the last byte in the range 1334 none. END is not including, i.e. the last byte in the range
1333 is at END - 1. */ 1335 is at END - 1. */