6 #include "posix-compat.h"
10 #define ACTUAL ((void *) 0x10000000)
18 printf ("(mmap-read) begin\n");
20 fd = open ("sample.txt");
23 printf ("(mmap-read) open() failed\n");
27 map = mmap (fd, ACTUAL);
28 if (map == MAP_FAILED)
30 printf ("(mmap-read) mmap() failed\n");
34 if (memcmp (ACTUAL, sample, strlen (sample)))
36 printf ("(mmap-read) read of mmap'd file reported bad data\n");
42 printf ("(mmap-read) munmap() failed\n");
49 printf ("(mmap-read) end\n");