require '_h2ph_pre.ph';

unless(defined(&_SYS_MMAN_H)) {
    die("Never use <bits/mman.h> directly; include <sys/mman.h> instead.");
}
unless(defined(&PROT_READ)) {
    sub PROT_READ () {	0x1;}
}
unless(defined(&PROT_WRITE)) {
    sub PROT_WRITE () {	0x2;}
}
unless(defined(&PROT_EXEC)) {
    sub PROT_EXEC () {	0x4;}
}
unless(defined(&PROT_NONE)) {
    sub PROT_NONE () {	0x;}
}
unless(defined(&MAP_SHARED)) {
    sub MAP_SHARED () {	0x1;}
}
unless(defined(&MAP_PRIVATE)) {
    sub MAP_PRIVATE () {	0x2;}
}
if(defined(&__USE_MISC)) {
    eval 'sub MAP_TYPE () {0xf;}' unless defined(&MAP_TYPE);
}
unless(defined(&MAP_FIXED)) {
    sub MAP_FIXED () {	0x10;}
}
if(defined(&__USE_MISC)) {
    eval 'sub MAP_FILE () {0;}' unless defined(&MAP_FILE);
    eval 'sub MAP_ANONYMOUS () {0x20;}' unless defined(&MAP_ANONYMOUS);
    eval 'sub MAP_ANON () { &MAP_ANONYMOUS;}' unless defined(&MAP_ANON);
}
if(defined(&__USE_MISC)) {
    eval 'sub MAP_GROWSDOWN () {0x100;}' unless defined(&MAP_GROWSDOWN);
    eval 'sub MAP_DENYWRITE () {0x800;}' unless defined(&MAP_DENYWRITE);
    eval 'sub MAP_EXECUTABLE () {0x1000;}' unless defined(&MAP_EXECUTABLE);
    eval 'sub MAP_LOCKED () {0x2000;}' unless defined(&MAP_LOCKED);
    eval 'sub MAP_NORESERVE () {0x4000;}' unless defined(&MAP_NORESERVE);
}
unless(defined(&MS_ASYNC)) {
    sub MS_ASYNC () {	1;}
}
unless(defined(&MS_SYNC)) {
    sub MS_SYNC () {	4;}
}
unless(defined(&MS_INVALIDATE)) {
    sub MS_INVALIDATE () {	2;}
}
unless(defined(&MCL_CURRENT)) {
    sub MCL_CURRENT () {	1;}
}
unless(defined(&MCL_FUTURE)) {
    sub MCL_FUTURE () {	2;}
}
if(defined(&__USE_GNU)) {
    eval 'sub MREMAP_MAYMOVE () {1;}' unless defined(&MREMAP_MAYMOVE);
}
if(defined(&__USE_BSD)) {
    eval 'sub MADV_NORMAL () {0;}' unless defined(&MADV_NORMAL);
    eval 'sub MADV_RANDOM () {1;}' unless defined(&MADV_RANDOM);
    eval 'sub MADV_SEQUENTIAL () {2;}' unless defined(&MADV_SEQUENTIAL);
    eval 'sub MADV_WILLNEED () {3;}' unless defined(&MADV_WILLNEED);
    eval 'sub MADV_DONTNEED () {4;}' unless defined(&MADV_DONTNEED);
}
if(defined(&__USE_XOPEN2K)) {
    eval 'sub POSIX_MADV_NORMAL () {0;}' unless defined(&POSIX_MADV_NORMAL);
    eval 'sub POSIX_MADV_RANDOM () {1;}' unless defined(&POSIX_MADV_RANDOM);
    eval 'sub POSIX_MADV_SEQUENTIAL () {2;}' unless defined(&POSIX_MADV_SEQUENTIAL);
    eval 'sub POSIX_MADV_WILLNEED () {3;}' unless defined(&POSIX_MADV_WILLNEED);
    eval 'sub POSIX_MADV_DONTNEED () {4;}' unless defined(&POSIX_MADV_DONTNEED);
}
1;
