require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_LINK_H_)) {
    eval 'sub _LINK_H_ () {1;}' unless defined(&_LINK_H_);
    if(defined(&__ELF__)) {
	require 'link_elf.ph';
    } else {
	require 'link_aout.ph';
    }
    eval("sub RT_CONSISTENT () { 0; }") unless defined(&RT_CONSISTENT);
    eval("sub RT_ADD () { 1; }") unless defined(&RT_ADD);
    eval("sub RT_DELETE () { 2; }") unless defined(&RT_DELETE);
    eval 'sub MAXDEWEY () {8;}' unless defined(&MAXDEWEY);
    eval 'sub HH_MAGIC () {011421044151;}' unless defined(&HH_MAGIC);
    eval 'sub LD_HINTS_VERSION_1 () {1;}' unless defined(&LD_HINTS_VERSION_1);
    eval 'sub LD_HINTS_VERSION_2 () {2;}' unless defined(&LD_HINTS_VERSION_2);
    eval 'sub HH_BADMAG {
        my($hdr) = @_;
	    eval q((($hdr). &hh_magic !=  &HH_MAGIC));
    }' unless defined(&HH_BADMAG);
    eval 'sub hi_major () { $hi_dewey[0];}' unless defined(&hi_major);
    eval 'sub hi_minor () { $hi_dewey[1];}' unless defined(&hi_minor);
    eval 'sub _PATH_LD_HINTS () {"/var/run/ld.so.hints";}' unless defined(&_PATH_LD_HINTS);
}
1;
