6 #include "posix-compat.h"
10 #define ACTUAL ((void *) 0x10000000)
17 printf ("(mmap-read) begin\n");
19 fd = open ("sample.txt");
22 printf ("(mmap-read) open() failed\n");
26 if (!mmap (fd, ACTUAL, strlen (sample)))
28 printf ("(mmap-read) mmap() failed\n");
32 if (memcmp (ACTUAL, sample, strlen (sample)))
34 printf ("(mmap-read) read of mmap'd file reported bad data\n");
38 if (!munmap (ACTUAL, strlen (sample)))
40 printf ("(mmap-read) munmap() failed\n");
47 printf ("(mmap-read) end\n");