require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_RPC_TYPES_H)) {
    eval 'sub _RPC_TYPES_H () {1;}' unless defined(&_RPC_TYPES_H);
    eval 'sub bool_t () { &int32_t;}' unless defined(&bool_t);
    eval 'sub enum_t () { &int32_t;}' unless defined(&enum_t);
    eval 'sub __dontcare__ () {-1;}' unless defined(&__dontcare__);
    unless(defined(&FALSE)) {
	eval 'sub FALSE () {(0);}' unless defined(&FALSE);
    }
    unless(defined(&TRUE)) {
	eval 'sub TRUE () {(1);}' unless defined(&TRUE);
    }
    unless(defined(&NULL)) {
	eval 'sub NULL () {0;}' unless defined(&NULL);
    }
    eval 'sub mem_alloc {
        my($bsize) = @_;
	    eval q( &malloc($bsize));
    }' unless defined(&mem_alloc);
    eval 'sub mem_free {
        my($ptr, $bsize) = @_;
	    eval q( &free($ptr));
    }' unless defined(&mem_free);
    unless(defined(&makedev)) {
	require 'sys/types.ph';
    }
    require 'sys/time.ph';
}
1;
