require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SYS_GMON_H_)) {
    eval 'sub _SYS_GMON_H_ () {1;}' unless defined(&_SYS_GMON_H_);
    require 'machine/profile.ph';
    eval 'sub GMONVERSION () {0x51879;}' unless defined(&GMONVERSION);
    eval 'sub HISTCOUNTER () {\'unsigned short\';}' unless defined(&HISTCOUNTER);
    eval 'sub HISTFRACTION () {2;}' unless defined(&HISTFRACTION);
    eval 'sub HASHFRACTION () {2;}' unless defined(&HASHFRACTION);
    eval 'sub ARCDENSITY () {2;}' unless defined(&ARCDENSITY);
    eval 'sub MINARCS () {50;}' unless defined(&MINARCS);
    eval 'sub MAXARCS () {((1<< (8* $sizeof{ &HISTCOUNTER})) - 2);}' unless defined(&MAXARCS);
    eval 'sub ROUNDDOWN {
        my($x,$y) = @_;
	    eval q(((($x)/($y))*($y)));
    }' unless defined(&ROUNDDOWN);
    eval 'sub ROUNDUP {
        my($x,$y) = @_;
	    eval q((((($x)+($y)-1)/($y))*($y)));
    }' unless defined(&ROUNDUP);
    eval 'sub GMON_PROF_ON () {0;}' unless defined(&GMON_PROF_ON);
    eval 'sub GMON_PROF_BUSY () {1;}' unless defined(&GMON_PROF_BUSY);
    eval 'sub GMON_PROF_ERROR () {2;}' unless defined(&GMON_PROF_ERROR);
    eval 'sub GMON_PROF_OFF () {3;}' unless defined(&GMON_PROF_OFF);
    eval 'sub GPROF_STATE () {0;}' unless defined(&GPROF_STATE);
    eval 'sub GPROF_COUNT () {1;}' unless defined(&GPROF_COUNT);
    eval 'sub GPROF_FROMS () {2;}' unless defined(&GPROF_FROMS);
    eval 'sub GPROF_TOS () {3;}' unless defined(&GPROF_TOS);
    eval 'sub GPROF_GMONPARAM () {4;}' unless defined(&GPROF_GMONPARAM);
}
1;
