require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SYS_RESOURCE_H_)) {
    eval 'sub _SYS_RESOURCE_H_ () {1;}' unless defined(&_SYS_RESOURCE_H_);
    eval 'sub PRIO_MIN () {-20;}' unless defined(&PRIO_MIN);
    eval 'sub PRIO_MAX () {20;}' unless defined(&PRIO_MAX);
    eval 'sub PRIO_PROCESS () {0;}' unless defined(&PRIO_PROCESS);
    eval 'sub PRIO_PGRP () {1;}' unless defined(&PRIO_PGRP);
    eval 'sub PRIO_USER () {2;}' unless defined(&PRIO_USER);
    eval 'sub RUSAGE_SELF () {0;}' unless defined(&RUSAGE_SELF);
    eval 'sub RUSAGE_CHILDREN () {-1;}' unless defined(&RUSAGE_CHILDREN);
    eval 'sub ru_first () { &ru_ixrss;}' unless defined(&ru_first);
    eval 'sub ru_last () { &ru_nivcsw;}' unless defined(&ru_last);
    eval 'sub RLIMIT_CPU () {0;}' unless defined(&RLIMIT_CPU);
    eval 'sub RLIMIT_FSIZE () {1;}' unless defined(&RLIMIT_FSIZE);
    eval 'sub RLIMIT_DATA () {2;}' unless defined(&RLIMIT_DATA);
    eval 'sub RLIMIT_STACK () {3;}' unless defined(&RLIMIT_STACK);
    eval 'sub RLIMIT_CORE () {4;}' unless defined(&RLIMIT_CORE);
    eval 'sub RLIMIT_RSS () {5;}' unless defined(&RLIMIT_RSS);
    eval 'sub RLIMIT_MEMLOCK () {6;}' unless defined(&RLIMIT_MEMLOCK);
    eval 'sub RLIMIT_NPROC () {7;}' unless defined(&RLIMIT_NPROC);
    eval 'sub RLIMIT_NOFILE () {8;}' unless defined(&RLIMIT_NOFILE);
    eval 'sub RLIM_NLIMITS () {9;}' unless defined(&RLIM_NLIMITS);
    eval 'sub RLIM_INFINITY () {((( &rlim_t)1<< 63) - 1);}' unless defined(&RLIM_INFINITY);
    eval 'sub RLIM_SAVED_MAX () { &RLIM_INFINITY;}' unless defined(&RLIM_SAVED_MAX);
    eval 'sub RLIM_SAVED_CUR () { &RLIM_INFINITY;}' unless defined(&RLIM_SAVED_CUR);
    if(defined(&_KERNEL)) {
    } else {
	require 'sys/cdefs.ph';
    }
}
1;
