require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_UNISTD_H_)) {
    eval 'sub _SYS_UNISTD_H_ () {1;}' unless defined(&_SYS_UNISTD_H_);
    require 'sys/featuretest.ph';
    eval 'sub _POSIX_JOB_CONTROL () {1;}' unless defined(&_POSIX_JOB_CONTROL);
    if(defined(&_NOT_AVAILABLE)) {
	eval 'sub _POSIX_SAVED_IDS () {1;}' unless defined(&_POSIX_SAVED_IDS);
    }
    eval 'sub _POSIX_VERSION () {200112;}' unless defined(&_POSIX_VERSION);
    eval 'sub _POSIX2_VERSION () {200112;}' unless defined(&_POSIX2_VERSION);
    eval 'sub _POSIX_SPAWN () {200809;}' unless defined(&_POSIX_SPAWN);
    undef(&_POSIX_ADVISORY_INFO) if defined(&_POSIX_ADVISORY_INFO);
    eval 'sub _POSIX_ASYNCHRONOUS_IO () {200112;}' unless defined(&_POSIX_ASYNCHRONOUS_IO);
    eval 'sub _POSIX_BARRIERS () {200112;}' unless defined(&_POSIX_BARRIERS);
    eval 'sub _POSIX_CHOWN_RESTRICTED () {1;}' unless defined(&_POSIX_CHOWN_RESTRICTED);
    eval 'sub _POSIX_CLOCK_SELECTION () {-1;}' unless defined(&_POSIX_CLOCK_SELECTION);
    eval 'sub _POSIX_CPUTIME () {200112;}' unless defined(&_POSIX_CPUTIME);
    undef(&_POSIX_CPUTYPE) if defined(&_POSIX_CPUTYPE);
    eval 'sub _POSIX_FSYNC () {1;}' unless defined(&_POSIX_FSYNC);
    eval 'sub _POSIX_IPV6 () {0;}' unless defined(&_POSIX_IPV6);
    eval 'sub _POSIX_JOB_CONTROL () {1;}' unless defined(&_POSIX_JOB_CONTROL);
    eval 'sub _POSIX_MAPPED_FILES () {1;}' unless defined(&_POSIX_MAPPED_FILES);
    eval 'sub _POSIX_MEMLOCK () {1;}' unless defined(&_POSIX_MEMLOCK);
    eval 'sub _POSIX_MEMLOCK_RANGE () {1;}' unless defined(&_POSIX_MEMLOCK_RANGE);
    eval 'sub _POSIX_MEMORY_PROTECTION () {1;}' unless defined(&_POSIX_MEMORY_PROTECTION);
    eval 'sub _POSIX_MESSAGE_PASSING () {200112;}' unless defined(&_POSIX_MESSAGE_PASSING);
    eval 'sub _POSIX_MONOTONIC_CLOCK () {200112;}' unless defined(&_POSIX_MONOTONIC_CLOCK);
    eval 'sub _POSIX_NO_TRUNC () {1;}' unless defined(&_POSIX_NO_TRUNC);
    eval 'sub _POSIX_PRIORITIZED_IO () {-1;}' unless defined(&_POSIX_PRIORITIZED_IO);
    eval 'sub _POSIX_PRIORITY_SCHEDULING () {200112;}' unless defined(&_POSIX_PRIORITY_SCHEDULING);
    eval 'sub _POSIX_RAW_SOCKETS () {200112;}' unless defined(&_POSIX_RAW_SOCKETS);
    eval 'sub _POSIX_READER_WRITER_LOCKS () {200112;}' unless defined(&_POSIX_READER_WRITER_LOCKS);
    undef(&_POSIX_REALTIME_SIGNALS) if defined(&_POSIX_REALTIME_SIGNALS);
    eval 'sub _POSIX_REGEXP () {1;}' unless defined(&_POSIX_REGEXP);
    eval 'sub _POSIX_SEMAPHORES () {0;}' unless defined(&_POSIX_SEMAPHORES);
    eval 'sub _POSIX_SHARED_MEMORY_OBJECTS () {0;}' unless defined(&_POSIX_SHARED_MEMORY_OBJECTS);
    eval 'sub _POSIX_SHELL () {1;}' unless defined(&_POSIX_SHELL);
    eval 'sub _POSIX_SPIN_LOCKS () {200112;}' unless defined(&_POSIX_SPIN_LOCKS);
    undef(&_POSIX_SPORADIC_SERVER) if defined(&_POSIX_SPORADIC_SERVER);
    eval 'sub _POSIX_SYNCHRONIZED_IO () {1;}' unless defined(&_POSIX_SYNCHRONIZED_IO);
    eval 'sub _POSIX_THREADS () {200112;}' unless defined(&_POSIX_THREADS);
    eval 'sub _POSIX_THREAD_ATTR_STACKSIZE () {200112;}' unless defined(&_POSIX_THREAD_ATTR_STACKSIZE);
    eval 'sub _POSIX_THREAD_ATTR_STACKADDR () {200112;}' unless defined(&_POSIX_THREAD_ATTR_STACKADDR);
    eval 'sub _POSIX_THREAD_CPUTIME () {200112;}' unless defined(&_POSIX_THREAD_CPUTIME);
    eval 'sub _POSIX_THREAD_PRIO_PROTECT () {200112;}' unless defined(&_POSIX_THREAD_PRIO_PROTECT);
    eval 'sub _POSIX_THREAD_SAFE_FUNCTIONS () {200112;}' unless defined(&_POSIX_THREAD_SAFE_FUNCTIONS);
    undef(&_POSIX_TIMEOUTS) if defined(&_POSIX_TIMEOUTS);
    eval 'sub _POSIX_TIMERS () {200112;}' unless defined(&_POSIX_TIMERS);
    undef(&_POSIX_TYPED_MEMORY_OBJECTS) if defined(&_POSIX_TYPED_MEMORY_OBJECTS);
    eval 'sub _POSIX_VDISABLE () { &__CAST(\'unsigned char\', ord(\'\\377\'));}' unless defined(&_POSIX_VDISABLE);
    eval 'sub _POSIX2_C_BIND () {200112;}' unless defined(&_POSIX2_C_BIND);
    eval 'sub _XOPEN_SHM () {0;}' unless defined(&_XOPEN_SHM);
    eval 'sub F_OK () {0;}' unless defined(&F_OK);
    eval 'sub X_OK () {0x1;}' unless defined(&X_OK);
    eval 'sub W_OK () {0x2;}' unless defined(&W_OK);
    eval 'sub R_OK () {0x4;}' unless defined(&R_OK);
    eval 'sub SEEK_SET () {0;}' unless defined(&SEEK_SET);
    eval 'sub SEEK_CUR () {1;}' unless defined(&SEEK_CUR);
    eval 'sub SEEK_END () {2;}' unless defined(&SEEK_END);
    if(defined(&_NETBSD_SOURCE)) {
	eval 'sub L_SET () { &SEEK_SET;}' unless defined(&L_SET);
	eval 'sub L_INCR () { &SEEK_CUR;}' unless defined(&L_INCR);
	eval 'sub L_XTND () { &SEEK_END;}' unless defined(&L_XTND);
	eval 'sub FDATASYNC () {0x10;}' unless defined(&FDATASYNC);
	eval 'sub FFILESYNC () {0x20;}' unless defined(&FFILESYNC);
	eval 'sub FDISKSYNC () {0x40;}' unless defined(&FDISKSYNC);
    }
    eval 'sub _PC_LINK_MAX () {1;}' unless defined(&_PC_LINK_MAX);
    eval 'sub _PC_MAX_CANON () {2;}' unless defined(&_PC_MAX_CANON);
    eval 'sub _PC_MAX_INPUT () {3;}' unless defined(&_PC_MAX_INPUT);
    eval 'sub _PC_NAME_MAX () {4;}' unless defined(&_PC_NAME_MAX);
    eval 'sub _PC_PATH_MAX () {5;}' unless defined(&_PC_PATH_MAX);
    eval 'sub _PC_PIPE_BUF () {6;}' unless defined(&_PC_PIPE_BUF);
    eval 'sub _PC_CHOWN_RESTRICTED () {7;}' unless defined(&_PC_CHOWN_RESTRICTED);
    eval 'sub _PC_NO_TRUNC () {8;}' unless defined(&_PC_NO_TRUNC);
    eval 'sub _PC_VDISABLE () {9;}' unless defined(&_PC_VDISABLE);
    eval 'sub _PC_SYNC_IO () {10;}' unless defined(&_PC_SYNC_IO);
    eval 'sub _PC_FILESIZEBITS () {11;}' unless defined(&_PC_FILESIZEBITS);
    eval 'sub _PC_SYMLINK_MAX () {12;}' unless defined(&_PC_SYMLINK_MAX);
    eval 'sub _PC_2_SYMLINKS () {13;}' unless defined(&_PC_2_SYMLINKS);
    eval 'sub _PC_ACL_EXTENDED () {14;}' unless defined(&_PC_ACL_EXTENDED);
    eval 'sub _PC_MIN_HOLE_SIZE () {15;}' unless defined(&_PC_MIN_HOLE_SIZE);
    if(defined(&_NETBSD_SOURCE)) {
	eval 'sub _PC_ACL_PATH_MAX () {16;}' unless defined(&_PC_ACL_PATH_MAX);
	eval 'sub _PC_ACL_NFS4 () {17;}' unless defined(&_PC_ACL_NFS4);
    }
    eval 'sub _SC_ARG_MAX () {1;}' unless defined(&_SC_ARG_MAX);
    eval 'sub _SC_CHILD_MAX () {2;}' unless defined(&_SC_CHILD_MAX);
    eval 'sub _O_SC_CLK_TCK () {3;}' unless defined(&_O_SC_CLK_TCK);
    eval 'sub _SC_NGROUPS_MAX () {4;}' unless defined(&_SC_NGROUPS_MAX);
    eval 'sub _SC_OPEN_MAX () {5;}' unless defined(&_SC_OPEN_MAX);
    eval 'sub _SC_JOB_CONTROL () {6;}' unless defined(&_SC_JOB_CONTROL);
    eval 'sub _SC_SAVED_IDS () {7;}' unless defined(&_SC_SAVED_IDS);
    eval 'sub _SC_VERSION () {8;}' unless defined(&_SC_VERSION);
    eval 'sub _SC_BC_BASE_MAX () {9;}' unless defined(&_SC_BC_BASE_MAX);
    eval 'sub _SC_BC_DIM_MAX () {10;}' unless defined(&_SC_BC_DIM_MAX);
    eval 'sub _SC_BC_SCALE_MAX () {11;}' unless defined(&_SC_BC_SCALE_MAX);
    eval 'sub _SC_BC_STRING_MAX () {12;}' unless defined(&_SC_BC_STRING_MAX);
    eval 'sub _SC_COLL_WEIGHTS_MAX () {13;}' unless defined(&_SC_COLL_WEIGHTS_MAX);
    eval 'sub _SC_EXPR_NEST_MAX () {14;}' unless defined(&_SC_EXPR_NEST_MAX);
    eval 'sub _SC_LINE_MAX () {15;}' unless defined(&_SC_LINE_MAX);
    eval 'sub _SC_RE_DUP_MAX () {16;}' unless defined(&_SC_RE_DUP_MAX);
    eval 'sub _SC_2_VERSION () {17;}' unless defined(&_SC_2_VERSION);
    eval 'sub _SC_2_C_BIND () {18;}' unless defined(&_SC_2_C_BIND);
    eval 'sub _SC_2_C_DEV () {19;}' unless defined(&_SC_2_C_DEV);
    eval 'sub _SC_2_CHAR_TERM () {20;}' unless defined(&_SC_2_CHAR_TERM);
    eval 'sub _SC_2_FORT_DEV () {21;}' unless defined(&_SC_2_FORT_DEV);
    eval 'sub _SC_2_FORT_RUN () {22;}' unless defined(&_SC_2_FORT_RUN);
    eval 'sub _SC_2_LOCALEDEF () {23;}' unless defined(&_SC_2_LOCALEDEF);
    eval 'sub _SC_2_SW_DEV () {24;}' unless defined(&_SC_2_SW_DEV);
    eval 'sub _SC_2_UPE () {25;}' unless defined(&_SC_2_UPE);
    eval 'sub _SC_STREAM_MAX () {26;}' unless defined(&_SC_STREAM_MAX);
    eval 'sub _SC_TZNAME_MAX () {27;}' unless defined(&_SC_TZNAME_MAX);
    eval 'sub _SC_PAGESIZE () {28;}' unless defined(&_SC_PAGESIZE);
    eval 'sub _SC_PAGE_SIZE () { &_SC_PAGESIZE;}' unless defined(&_SC_PAGE_SIZE);
    eval 'sub _SC_FSYNC () {29;}' unless defined(&_SC_FSYNC);
    eval 'sub _SC_XOPEN_SHM () {30;}' unless defined(&_SC_XOPEN_SHM);
    eval 'sub _SC_SYNCHRONIZED_IO () {31;}' unless defined(&_SC_SYNCHRONIZED_IO);
    eval 'sub _SC_IOV_MAX () {32;}' unless defined(&_SC_IOV_MAX);
    eval 'sub _SC_MAPPED_FILES () {33;}' unless defined(&_SC_MAPPED_FILES);
    eval 'sub _SC_MEMLOCK () {34;}' unless defined(&_SC_MEMLOCK);
    eval 'sub _SC_MEMLOCK_RANGE () {35;}' unless defined(&_SC_MEMLOCK_RANGE);
    eval 'sub _SC_MEMORY_PROTECTION () {36;}' unless defined(&_SC_MEMORY_PROTECTION);
    eval 'sub _SC_LOGIN_NAME_MAX () {37;}' unless defined(&_SC_LOGIN_NAME_MAX);
    eval 'sub _SC_MONOTONIC_CLOCK () {38;}' unless defined(&_SC_MONOTONIC_CLOCK);
    eval 'sub _SC_CLK_TCK () {39;}' unless defined(&_SC_CLK_TCK);
    eval 'sub _SC_ATEXIT_MAX () {40;}' unless defined(&_SC_ATEXIT_MAX);
    eval 'sub _SC_THREADS () {41;}' unless defined(&_SC_THREADS);
    eval 'sub _SC_SEMAPHORES () {42;}' unless defined(&_SC_SEMAPHORES);
    eval 'sub _SC_BARRIERS () {43;}' unless defined(&_SC_BARRIERS);
    eval 'sub _SC_TIMERS () {44;}' unless defined(&_SC_TIMERS);
    eval 'sub _SC_SPIN_LOCKS () {45;}' unless defined(&_SC_SPIN_LOCKS);
    eval 'sub _SC_READER_WRITER_LOCKS () {46;}' unless defined(&_SC_READER_WRITER_LOCKS);
    eval 'sub _SC_GETGR_R_SIZE_MAX () {47;}' unless defined(&_SC_GETGR_R_SIZE_MAX);
    eval 'sub _SC_GETPW_R_SIZE_MAX () {48;}' unless defined(&_SC_GETPW_R_SIZE_MAX);
    eval 'sub _SC_CLOCK_SELECTION () {49;}' unless defined(&_SC_CLOCK_SELECTION);
    eval 'sub _SC_ASYNCHRONOUS_IO () {50;}' unless defined(&_SC_ASYNCHRONOUS_IO);
    eval 'sub _SC_AIO_LISTIO_MAX () {51;}' unless defined(&_SC_AIO_LISTIO_MAX);
    eval 'sub _SC_AIO_MAX () {52;}' unless defined(&_SC_AIO_MAX);
    eval 'sub _SC_MESSAGE_PASSING () {53;}' unless defined(&_SC_MESSAGE_PASSING);
    eval 'sub _SC_MQ_OPEN_MAX () {54;}' unless defined(&_SC_MQ_OPEN_MAX);
    eval 'sub _SC_MQ_PRIO_MAX () {55;}' unless defined(&_SC_MQ_PRIO_MAX);
    eval 'sub _SC_PRIORITY_SCHEDULING () {56;}' unless defined(&_SC_PRIORITY_SCHEDULING);
    eval 'sub _SC_THREAD_DESTRUCTOR_ITERATIONS () {57;}' unless defined(&_SC_THREAD_DESTRUCTOR_ITERATIONS);
    eval 'sub _SC_THREAD_KEYS_MAX () {58;}' unless defined(&_SC_THREAD_KEYS_MAX);
    eval 'sub _SC_THREAD_STACK_MIN () {59;}' unless defined(&_SC_THREAD_STACK_MIN);
    eval 'sub _SC_THREAD_THREADS_MAX () {60;}' unless defined(&_SC_THREAD_THREADS_MAX);
    eval 'sub _SC_THREAD_ATTR_STACKADDR () {61;}' unless defined(&_SC_THREAD_ATTR_STACKADDR);
    eval 'sub _SC_THREAD_ATTR_STACKSIZE () {62;}' unless defined(&_SC_THREAD_ATTR_STACKSIZE);
    eval 'sub _SC_THREAD_PRIORITY_SCHEDULING () {63;}' unless defined(&_SC_THREAD_PRIORITY_SCHEDULING);
    eval 'sub _SC_THREAD_PRIO_INHERIT () {64;}' unless defined(&_SC_THREAD_PRIO_INHERIT);
    eval 'sub _SC_THREAD_PRIO_PROTECT () {65;}' unless defined(&_SC_THREAD_PRIO_PROTECT);
    eval 'sub _SC_THREAD_PROCESS_SHARED () {66;}' unless defined(&_SC_THREAD_PROCESS_SHARED);
    eval 'sub _SC_THREAD_SAFE_FUNCTIONS () {67;}' unless defined(&_SC_THREAD_SAFE_FUNCTIONS);
    eval 'sub _SC_TTY_NAME_MAX () {68;}' unless defined(&_SC_TTY_NAME_MAX);
    eval 'sub _SC_HOST_NAME_MAX () {69;}' unless defined(&_SC_HOST_NAME_MAX);
    eval 'sub _SC_PASS_MAX () {70;}' unless defined(&_SC_PASS_MAX);
    eval 'sub _SC_REGEXP () {71;}' unless defined(&_SC_REGEXP);
    eval 'sub _SC_SHELL () {72;}' unless defined(&_SC_SHELL);
    eval 'sub _SC_SYMLOOP_MAX () {73;}' unless defined(&_SC_SYMLOOP_MAX);
    eval 'sub _SC_V6_ILP32_OFF32 () {74;}' unless defined(&_SC_V6_ILP32_OFF32);
    eval 'sub _SC_V6_ILP32_OFFBIG () {75;}' unless defined(&_SC_V6_ILP32_OFFBIG);
    eval 'sub _SC_V6_LP64_OFF64 () {76;}' unless defined(&_SC_V6_LP64_OFF64);
    eval 'sub _SC_V6_LPBIG_OFFBIG () {77;}' unless defined(&_SC_V6_LPBIG_OFFBIG);
    eval 'sub _SC_2_PBS () {80;}' unless defined(&_SC_2_PBS);
    eval 'sub _SC_2_PBS_ACCOUNTING () {81;}' unless defined(&_SC_2_PBS_ACCOUNTING);
    eval 'sub _SC_2_PBS_CHECKPOINT () {82;}' unless defined(&_SC_2_PBS_CHECKPOINT);
    eval 'sub _SC_2_PBS_LOCATE () {83;}' unless defined(&_SC_2_PBS_LOCATE);
    eval 'sub _SC_2_PBS_MESSAGE () {84;}' unless defined(&_SC_2_PBS_MESSAGE);
    eval 'sub _SC_2_PBS_TRACK () {85;}' unless defined(&_SC_2_PBS_TRACK);
    eval 'sub _SC_SPAWN () {86;}' unless defined(&_SC_SPAWN);
    eval 'sub _SC_SHARED_MEMORY_OBJECTS () {87;}' unless defined(&_SC_SHARED_MEMORY_OBJECTS);
    eval 'sub _SC_TIMER_MAX () {88;}' unless defined(&_SC_TIMER_MAX);
    eval 'sub _SC_SEM_NSEMS_MAX () {89;}' unless defined(&_SC_SEM_NSEMS_MAX);
    eval 'sub _SC_CPUTIME () {90;}' unless defined(&_SC_CPUTIME);
    eval 'sub _SC_THREAD_CPUTIME () {91;}' unless defined(&_SC_THREAD_CPUTIME);
    eval 'sub _SC_DELAYTIMER_MAX () {92;}' unless defined(&_SC_DELAYTIMER_MAX);
    eval 'sub _SC_SIGQUEUE_MAX () {93;}' unless defined(&_SC_SIGQUEUE_MAX);
    eval 'sub _SC_REALTIME_SIGNALS () {94;}' unless defined(&_SC_REALTIME_SIGNALS);
    eval 'sub _SC_RTSIG_MAX () {95;}' unless defined(&_SC_RTSIG_MAX);
    eval 'sub _SC_PHYS_PAGES () {121;}' unless defined(&_SC_PHYS_PAGES);
    if(defined(&_NETBSD_SOURCE)) {
	eval 'sub _SC_NPROCESSORS_CONF () {1001;}' unless defined(&_SC_NPROCESSORS_CONF);
	eval 'sub _SC_NPROCESSORS_ONLN () {1002;}' unless defined(&_SC_NPROCESSORS_ONLN);
	eval 'sub _SC_SCHED_RT_TS () {2001;}' unless defined(&_SC_SCHED_RT_TS);
	eval 'sub _SC_SCHED_PRI_MIN () {2002;}' unless defined(&_SC_SCHED_PRI_MIN);
	eval 'sub _SC_SCHED_PRI_MAX () {2003;}' unless defined(&_SC_SCHED_PRI_MAX);
    }
    eval 'sub _CS_PATH () {1;}' unless defined(&_CS_PATH);
}
1;
