require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_RF__RF_TYPES_H_)) {
    eval 'sub _RF__RF_TYPES_H_ () {1;}' unless defined(&_RF__RF_TYPES_H_);
    require 'rf_archs.ph';
    require 'sys/errno.ph';
    require 'sys/types.ph';
    require 'sys/uio.ph';
    require 'sys/param.ph';
    require 'sys/lock.ph';
    require 'sys/types.ph';
    require 'sys/limits.ph';
    require 'machine/endian.ph';
    if((defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) == (defined(&BIG_ENDIAN) ? &BIG_ENDIAN : 0)) {
	eval 'sub RF_IS_BIG_ENDIAN () {1;}' unless defined(&RF_IS_BIG_ENDIAN);
    }
 elsif((defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) == (defined(&LITTLE_ENDIAN) ? &LITTLE_ENDIAN : 0)) {
	eval 'sub RF_IS_BIG_ENDIAN () {0;}' unless defined(&RF_IS_BIG_ENDIAN);
    } else {
	die("byte\ order\ not\ defined");
    }
    if((defined(&LONG_BIT) ? &LONG_BIT : 0) == 32) {
	eval 'sub RF_LONGSHIFT () {2;}' unless defined(&RF_LONGSHIFT);
    }
 elsif((defined(&LONG_BIT) ? &LONG_BIT : 0) == 64) {
	eval 'sub RF_LONGSHIFT () {3;}' unless defined(&RF_LONGSHIFT);
    } else {
	die("word\ size\ not\ defined");
    }
    eval 'sub RF_TRUE () {1;}' unless defined(&RF_TRUE);
    eval 'sub RF_FALSE () {0;}' unless defined(&RF_FALSE);
    eval 'sub RF_DISK_QUEUE_TYPE_NONE () {"";}' unless defined(&RF_DISK_QUEUE_TYPE_NONE);
    eval 'sub RF_RBUF_TYPE_EXCLUSIVE () {0;}' unless defined(&RF_RBUF_TYPE_EXCLUSIVE);
    eval 'sub RF_RBUF_TYPE_FLOATING () {1;}' unless defined(&RF_RBUF_TYPE_FLOATING);
    eval 'sub RF_RBUF_TYPE_FORCED () {2;}' unless defined(&RF_RBUF_TYPE_FORCED);
    eval 'sub RF_IO_TYPE_READ () {ord(\'r\');}' unless defined(&RF_IO_TYPE_READ);
    eval 'sub RF_IO_TYPE_WRITE () {ord(\'w\');}' unless defined(&RF_IO_TYPE_WRITE);
    eval 'sub RF_IO_TYPE_NOP () {ord(\'n\');}' unless defined(&RF_IO_TYPE_NOP);
    eval 'sub RF_IO_IS_R_OR_W {
        my($_type_) = @_;
	    eval q(((($_type_) ==  &RF_IO_TYPE_READ) || (($_type_) ==  &RF_IO_TYPE_WRITE)));
    }' unless defined(&RF_IO_IS_R_OR_W);
    eval 'sub RF_DISKQUEUE_DATA_FLAGS_NONE () {(( &RF_DiskQueueDataFlags_t)0);}' unless defined(&RF_DISKQUEUE_DATA_FLAGS_NONE);
    eval("sub rf_QuiesceState () { 0; }") unless defined(&rf_QuiesceState);
    eval("sub rf_IncrAccessesCountState () { 1; }") unless defined(&rf_IncrAccessesCountState);
    eval("sub rf_DecrAccessesCountState () { 2; }") unless defined(&rf_DecrAccessesCountState);
    eval("sub rf_MapState () { 3; }") unless defined(&rf_MapState);
    eval("sub rf_LockState () { 4; }") unless defined(&rf_LockState);
    eval("sub rf_CreateDAGState () { 5; }") unless defined(&rf_CreateDAGState);
    eval("sub rf_ExecuteDAGState () { 6; }") unless defined(&rf_ExecuteDAGState);
    eval("sub rf_ProcessDAGState () { 7; }") unless defined(&rf_ProcessDAGState);
    eval("sub rf_CleanupState () { 8; }") unless defined(&rf_CleanupState);
    eval("sub rf_LastState () { 9; }") unless defined(&rf_LastState);
    eval 'sub RF_MAXROW () {10;}' unless defined(&RF_MAXROW);
    eval 'sub RF_MAXCOL () {40;}' unless defined(&RF_MAXCOL);
    eval 'sub RF_MAXSPARE () {10;}' unless defined(&RF_MAXSPARE);
    eval 'sub RF_MAXDBGV () {75;}' unless defined(&RF_MAXDBGV);
    eval 'sub RF_MAXDBGVLEN () {50;}' unless defined(&RF_MAXDBGVLEN);
}
1;
