require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_MIPS64_EXEC_H_)) {
    eval 'sub _MIPS64_EXEC_H_ () {1;}' unless defined(&_MIPS64_EXEC_H_);
    eval 'sub __LDPGSZ () {4096;}' unless defined(&__LDPGSZ);
    eval 'sub NATIVE_EXEC_ELF () {1;}' unless defined(&NATIVE_EXEC_ELF);
    eval 'sub NATIVE_ELFSIZE () {64;}' unless defined(&NATIVE_ELFSIZE);
    eval 'sub EXEC_SCRIPT () {1;}' unless defined(&EXEC_SCRIPT);
    if(defined(&__LP64__)) {
	eval 'sub ARCH_ELFSIZE () {64;}' unless defined(&ARCH_ELFSIZE);
	eval 'sub DB_ELFSIZE () {64;}' unless defined(&DB_ELFSIZE);
	eval 'sub ELF_TARG_CLASS () { &ELFCLASS64;}' unless defined(&ELF_TARG_CLASS);
    } else {
	eval 'sub ARCH_ELFSIZE () {32;}' unless defined(&ARCH_ELFSIZE);
	eval 'sub DB_ELFSIZE () {32;}' unless defined(&DB_ELFSIZE);
	eval 'sub ELF_TARG_CLASS () { &ELFCLASS32;}' unless defined(&ELF_TARG_CLASS);
    }
    if(defined( &__MIPSEB__)) {
	eval 'sub ELF_TARG_DATA () { &ELFDATA2MSB;}' unless defined(&ELF_TARG_DATA);
    } else {
	eval 'sub ELF_TARG_DATA () { &ELFDATA2LSB;}' unless defined(&ELF_TARG_DATA);
    }
    eval 'sub ELF_TARG_MACH () { &EM_MIPS;}' unless defined(&ELF_TARG_MACH);
    eval 'sub _NLIST_DO_ELF () {1;}' unless defined(&_NLIST_DO_ELF);
    if(defined( &_LP64)) {
	eval 'sub _KERN_DO_ELF64 () {1;}' unless defined(&_KERN_DO_ELF64);
	if(defined( &COMPAT_O32)) {
	    eval 'sub _KERN_DO_ELF () {1;}' unless defined(&_KERN_DO_ELF);
	}
    } else {
	eval 'sub _KERN_DO_ELF () {1;}' unless defined(&_KERN_DO_ELF);
    }
    eval 'sub PT_MIPS_REGINFO () {0x70000000;}' unless defined(&PT_MIPS_REGINFO);
    eval 'sub DT_MIPS_RLD_VERSION () {0x70000001;}' unless defined(&DT_MIPS_RLD_VERSION);
    eval 'sub DT_MIPS_TIME_STAMP () {0x70000002;}' unless defined(&DT_MIPS_TIME_STAMP);
    eval 'sub DT_MIPS_ICHECKSUM () {0x70000003;}' unless defined(&DT_MIPS_ICHECKSUM);
    eval 'sub DT_MIPS_IVERSION () {0x70000004;}' unless defined(&DT_MIPS_IVERSION);
    eval 'sub DT_MIPS_FLAGS () {0x70000005;}' unless defined(&DT_MIPS_FLAGS);
    eval 'sub DT_MIPS_BASE_ADDRESS () {0x70000006;}' unless defined(&DT_MIPS_BASE_ADDRESS);
    eval 'sub DT_MIPS_CONFLICT () {0x70000008;}' unless defined(&DT_MIPS_CONFLICT);
    eval 'sub DT_MIPS_LIBLIST () {0x70000009;}' unless defined(&DT_MIPS_LIBLIST);
    eval 'sub DT_MIPS_LOCAL_GOTNO () {0x7000000a;}' unless defined(&DT_MIPS_LOCAL_GOTNO);
    eval 'sub DT_MIPS_CONFLICTNO () {0x7000000b;}' unless defined(&DT_MIPS_CONFLICTNO);
    eval 'sub DT_MIPS_LIBLISTNO () {0x70000010;}' unless defined(&DT_MIPS_LIBLISTNO);
    eval 'sub DT_MIPS_SYMTABNO () {0x70000011;}' unless defined(&DT_MIPS_SYMTABNO);
    eval 'sub DT_MIPS_UNREFEXTNO () {0x70000012;}' unless defined(&DT_MIPS_UNREFEXTNO);
    eval 'sub DT_MIPS_GOTSYM () {0x70000013;}' unless defined(&DT_MIPS_GOTSYM);
    eval 'sub DT_MIPS_HIPAGENO () {0x70000014;}' unless defined(&DT_MIPS_HIPAGENO);
    eval 'sub DT_MIPS_RLD_MAP () {0x70000016;}' unless defined(&DT_MIPS_RLD_MAP);
    eval 'sub DT_PROCNUM () {( &DT_MIPS_RLD_MAP -  &DT_LOPROC + 1);}' unless defined(&DT_PROCNUM);
    eval 'sub EF_MIPS_NOREORDER () {0x1;}' unless defined(&EF_MIPS_NOREORDER);
    eval 'sub EF_MIPS_PIC () {0x2;}' unless defined(&EF_MIPS_PIC);
    eval 'sub EF_MIPS_CPIC () {0x4;}' unless defined(&EF_MIPS_CPIC);
    eval 'sub EF_MIPS_ABI2 () {0x20;}' unless defined(&EF_MIPS_ABI2);
    eval 'sub EF_MIPS_32BITMODE () {0x100;}' unless defined(&EF_MIPS_32BITMODE);
    eval 'sub EF_MIPS_ARCH () {0xf0000000;}' unless defined(&EF_MIPS_ARCH);
    eval 'sub E_MIPS_ARCH_1 () {0x;}' unless defined(&E_MIPS_ARCH_1);
    eval 'sub E_MIPS_ARCH_2 () {0x10000000;}' unless defined(&E_MIPS_ARCH_2);
    eval 'sub E_MIPS_ARCH_3 () {0x20000000;}' unless defined(&E_MIPS_ARCH_3);
    eval 'sub E_MIPS_ARCH_4 () {0x30000000;}' unless defined(&E_MIPS_ARCH_4);
    eval 'sub EF_MIPS_ABI () {0xf000;}' unless defined(&EF_MIPS_ABI);
    eval 'sub E_MIPS_ABI_NONE () {0x;}' unless defined(&E_MIPS_ABI_NONE);
    eval 'sub E_MIPS_ABI_O32 () {0x1000;}' unless defined(&E_MIPS_ABI_O32);
    eval 'sub E_MIPS_ABI_O64 () {0x2000;}' unless defined(&E_MIPS_ABI_O64);
    eval 'sub E_MIPS_ABI_EABI32 () {0x4000;}' unless defined(&E_MIPS_ABI_EABI32);
    eval 'sub E_MIPS_ABI_EABI64 () {0x4000;}' unless defined(&E_MIPS_ABI_EABI64);
    eval 'sub SHN_MIPS_ACOMMON () {0xff00;}' unless defined(&SHN_MIPS_ACOMMON);
    eval 'sub SHN_MIPS_SCOMMON () {0xff03;}' unless defined(&SHN_MIPS_SCOMMON);
    eval 'sub SHN_MIPS_SUNDEFINED () {0xff04;}' unless defined(&SHN_MIPS_SUNDEFINED);
    eval 'sub SHT_MIPS_LIBLIST () {0x70000000;}' unless defined(&SHT_MIPS_LIBLIST);
    eval 'sub SHT_MIPS_CONFLICT () {0x70000002;}' unless defined(&SHT_MIPS_CONFLICT);
    eval 'sub SHT_MIPS_GPTAB () {0x70000003;}' unless defined(&SHT_MIPS_GPTAB);
    eval 'sub SHT_MIPS_UCODE () {0x70000004;}' unless defined(&SHT_MIPS_UCODE);
    eval 'sub SHT_MIPS_DEBUG () {0x70000005;}' unless defined(&SHT_MIPS_DEBUG);
    eval 'sub SHT_MIPS_REGINFO () {0x70000006;}' unless defined(&SHT_MIPS_REGINFO);
    eval 'sub SHF_MIPS_GPREL () {0x10000000;}' unless defined(&SHF_MIPS_GPREL);
    if(0) {
    }
    eval 'sub R_MIPS_NONE () {0;}' unless defined(&R_MIPS_NONE);
    eval 'sub R_MIPS_16 () {1;}' unless defined(&R_MIPS_16);
    eval 'sub R_MIPS_32 () {2;}' unless defined(&R_MIPS_32);
    eval 'sub R_MIPS_REL32 () {3;}' unless defined(&R_MIPS_REL32);
    eval 'sub R_MIPS_26 () {4;}' unless defined(&R_MIPS_26);
    eval 'sub R_MIPS_HI16 () {5;}' unless defined(&R_MIPS_HI16);
    eval 'sub R_MIPS_LO16 () {6;}' unless defined(&R_MIPS_LO16);
    eval 'sub R_MIPS_GPREL16 () {7;}' unless defined(&R_MIPS_GPREL16);
    eval 'sub R_MIPS_LITERAL () {8;}' unless defined(&R_MIPS_LITERAL);
    eval 'sub R_MIPS_GOT16 () {9;}' unless defined(&R_MIPS_GOT16);
    eval 'sub R_MIPS_PC16 () {10;}' unless defined(&R_MIPS_PC16);
    eval 'sub R_MIPS_CALL16 () {11;}' unless defined(&R_MIPS_CALL16);
    eval 'sub R_MIPS_GPREL32 () {12;}' unless defined(&R_MIPS_GPREL32);
    eval 'sub R_MIPS_64 () {18;}' unless defined(&R_MIPS_64);
    eval 'sub R_MIPS_REL32_64 () {(( &R_MIPS_64 << 8) |  &R_MIPS_REL32);}' unless defined(&R_MIPS_REL32_64);
}
1;
