require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&LZFP_h)) {
    eval 'sub LZFP_h () {1;}' unless defined(&LZFP_h);
    if(!defined(&_KERNEL)  && !defined(&_STANDALONE)) {
	require 'sys/types.ph';
	require 'inttypes.ph';
    }
    unless(defined(&LZF_HLOG)) {
	eval 'sub LZF_HLOG () {16;}' unless defined(&LZF_HLOG);
    }
    unless(defined(&VERY_FAST)) {
	eval 'sub VERY_FAST () {1;}' unless defined(&VERY_FAST);
    }
    unless(defined(&ULTRA_FAST)) {
	eval 'sub ULTRA_FAST () {0;}' unless defined(&ULTRA_FAST);
    }
    unless(defined(&STRICT_ALIGN)) {
	eval 'sub STRICT_ALIGN () {1;}' unless defined(&STRICT_ALIGN);
    }
    unless(defined(&INIT_HTAB)) {
	eval 'sub INIT_HTAB () {0;}' unless defined(&INIT_HTAB);
    }
    unless(defined(&AVOID_ERRNO)) {
	eval 'sub AVOID_ERRNO () {0;}' unless defined(&AVOID_ERRNO);
    }
    unless(defined(&LZF_STATE_ARG)) {
	eval 'sub LZF_STATE_ARG () {0;}' unless defined(&LZF_STATE_ARG);
    }
    unless(defined(&CHECK_INPUT)) {
	eval 'sub CHECK_INPUT () {1;}' unless defined(&CHECK_INPUT);
    }
    if(!defined(&_KERNEL)  && !defined(&STANDALONE)) {
    }
    if((defined(&ULTRA_FAST) ? &ULTRA_FAST : undef)) {
	if(defined(&VERY_FAST)) {
	    undef(&VERY_FAST) if defined(&VERY_FAST);
	}
    }
    if((defined(&INIT_HTAB) ? &INIT_HTAB : undef)) {
	if(defined(&__cplusplus)) {
	    require 'cstring';
	} else {
	    require 'string.ph';
	}
    }
}
1;
