1 /* this tests whether we can use mremap */
3 #if defined(HAVE_UNISTD_H)
11 #define DATA "conftest.mmap"
18 #define MAP_FAILED (int *)-1
27 fd
= open(DATA
, O_RDWR
|O_CREAT
|O_TRUNC
, 0666);
32 buf
= (int *)mmap(NULL
, 0x1000, PROT_READ
| PROT_WRITE
,
33 MAP_FILE
| MAP_SHARED
, fd
, 0);
34 if (buf
== MAP_FAILED
) {
38 buf
= mremap(buf
, 0x1000, 0x2000, MREMAP_MAYMOVE
);
39 if (buf
== MAP_FAILED
) {