2 * Sherlock Library -- Mapping of Files
4 * (c) 1999 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
16 #define MAP_FAILED ((void *)-1L)
20 mmap_file(byte *name, unsigned *len)
22 int fd = open(name, O_RDONLY);
28 if (fstat(fd, &st) < 0)
34 x = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);