require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&pcap_pcap_inttypes_h)) {
    eval 'sub pcap_pcap_inttypes_h () {1;}' unless defined(&pcap_pcap_inttypes_h);
    if(defined(&_MSC_VER)) {
	if((defined(&_MSC_VER) ? &_MSC_VER : undef) >= 1800) {
	    require 'inttypes.ph';
	} else {
	    if(defined(&_MSC_EXTENSIONS)) {
	    } else {
	    }
	}
	unless(defined(&PRId64)) {
	    if(defined(&_MSC_EXTENSIONS)) {
		eval 'sub PRId64 () {"I64d";}' unless defined(&PRId64);
	    } else {
		eval 'sub PRId64 () {"lld";}' unless defined(&PRId64);
	    }
	}
	unless(defined(&PRIo64)) {
	    if(defined(&_MSC_EXTENSIONS)) {
		eval 'sub PRIo64 () {"I64o";}' unless defined(&PRIo64);
	    } else {
		eval 'sub PRIo64 () {"llo";}' unless defined(&PRIo64);
	    }
	}
	unless(defined(&PRIx64)) {
	    if(defined(&_MSC_EXTENSIONS)) {
		eval 'sub PRIx64 () {"I64x";}' unless defined(&PRIx64);
	    } else {
		eval 'sub PRIx64 () {"llx";}' unless defined(&PRIx64);
	    }
	}
	unless(defined(&PRIu64)) {
	    if(defined(&_MSC_EXTENSIONS)) {
		eval 'sub PRIu64 () {"I64u";}' unless defined(&PRIu64);
	    } else {
		eval 'sub PRIu64 () {"llu";}' unless defined(&PRIu64);
	    }
	}
	eval 'sub PRIsize () {"Iu";}' unless defined(&PRIsize);
    }
 elsif(defined(&__MINGW32__) || !defined(&_WIN32)) {
	require 'inttypes.ph';
	eval 'sub PRIsize () {"zu";}' unless defined(&PRIsize);
    }
}
1;
