--- IO-AIO/AIO.xs 2010/09/13 01:59:05 1.173 +++ IO-AIO/AIO.xs 2010/12/01 04:43:12 1.175 @@ -124,7 +124,6 @@ #ifndef POSIX_FADV_NORMAL # define POSIX_FADV_NORMAL 0 -# define NO_FADVISE 1 #endif #ifndef POSIX_FADV_SEQUENTIAL # define POSIX_FADV_SEQUENTIAL 0 @@ -142,13 +141,12 @@ # define POSIX_FADV_DONTNEED 0 #endif -#if _XOPEN_SOURCE < 600 || NO_FADVISE +#if !HAVE_POSIX_FADVISE # define posix_fadvise(a,b,c,d) errno = ENOSYS /* also return ENOSYS */ #endif #ifndef POSIX_MADV_NORMAL # define POSIX_MADV_NORMAL 0 -# define NO_MADVISE 1 #endif #ifndef POSIX_MADV_SEQUENTIAL # define POSIX_MADV_SEQUENTIAL 0 @@ -163,7 +161,7 @@ # define POSIX_MADV_DONTNEED 0 #endif -#if _XOPEN_SOURCE < 600 || NO_MADVISE +#if !HAVE_POSIX_MADVISE # define posix_madvise(a,b,c) errno = ENOSYS /* also return ENOSYS */ #endif @@ -640,6 +638,11 @@ # define mmap(addr,length,prot,flags,fd,offs) (errno = ENOSYS, -1) # define munmap(addr,length) (errno = ENOSYS, -1) # define mprotect(addr,len,prot) (errno = ENOSYS, -1) +# define PROT_NONE 0 +# define PROT_WRITE 0 +# define MAP_PRIVATE 0 +# define MAP_SHARED 0 +# define MAP_FIXED 0 #endif #define MMAP_MAGIC PERL_MAGIC_ext