require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_MACHINE_TRAP_H)) {
    eval 'sub _MACHINE_TRAP_H () {1;}' unless defined(&_MACHINE_TRAP_H);
    eval 'sub T_POR () {0x1;}' unless defined(&T_POR);
    eval 'sub T_WDR () {0x2;}' unless defined(&T_WDR);
    eval 'sub T_XIR () {0x3;}' unless defined(&T_XIR);
    eval 'sub T_SIR () {0x4;}' unless defined(&T_SIR);
    eval 'sub T_RED_EXCEPTION () {0x5;}' unless defined(&T_RED_EXCEPTION);
    eval 'sub T_INST_EXCEPT () {0x8;}' unless defined(&T_INST_EXCEPT);
    eval 'sub T_TEXTFAULT () {0x9;}' unless defined(&T_TEXTFAULT);
    eval 'sub T_INST_ERROR () {0xa;}' unless defined(&T_INST_ERROR);
    eval 'sub T_ILLINST () {0x10;}' unless defined(&T_ILLINST);
    eval 'sub T_PRIVINST () {0x11;}' unless defined(&T_PRIVINST);
    eval 'sub T_UNIMP_LDD () {0x12;}' unless defined(&T_UNIMP_LDD);
    eval 'sub T_UNIMP_STD () {0x13;}' unless defined(&T_UNIMP_STD);
    eval 'sub T_FPDISABLED () {0x20;}' unless defined(&T_FPDISABLED);
    eval 'sub T_FP_IEEE_754 () {0x21;}' unless defined(&T_FP_IEEE_754);
    eval 'sub T_FP_OTHER () {0x22;}' unless defined(&T_FP_OTHER);
    eval 'sub T_TAGOF () {0x23;}' unless defined(&T_TAGOF);
    eval 'sub T_CLEAN_WINDOW () {0x24;}' unless defined(&T_CLEAN_WINDOW);
    eval 'sub T_DIV0 () {0x28;}' unless defined(&T_DIV0);
    eval 'sub T_PROCERR () {0x29;}' unless defined(&T_PROCERR);
    eval 'sub T_DATAFAULT () {0x30;}' unless defined(&T_DATAFAULT);
    eval 'sub T_DATA_MMU_MISS () {0x31;}' unless defined(&T_DATA_MMU_MISS);
    eval 'sub T_DATA_ERROR () {0x32;}' unless defined(&T_DATA_ERROR);
    eval 'sub T_DATA_PROT () {0x33;}' unless defined(&T_DATA_PROT);
    eval 'sub T_ALIGN () {0x34;}' unless defined(&T_ALIGN);
    eval 'sub T_LDDF_ALIGN () {0x35;}' unless defined(&T_LDDF_ALIGN);
    eval 'sub T_STDF_ALIGN () {0x36;}' unless defined(&T_STDF_ALIGN);
    eval 'sub T_PRIVACT () {0x37;}' unless defined(&T_PRIVACT);
    eval 'sub T_LDQF_ALIGN () {0x38;}' unless defined(&T_LDQF_ALIGN);
    eval 'sub T_STQF_ALIGN () {0x39;}' unless defined(&T_STQF_ALIGN);
    eval 'sub T_ASYNC_ERROR () {0x40;}' unless defined(&T_ASYNC_ERROR);
    eval 'sub T_L1INT () {0x41;}' unless defined(&T_L1INT);
    eval 'sub T_L2INT () {0x42;}' unless defined(&T_L2INT);
    eval 'sub T_L3INT () {0x43;}' unless defined(&T_L3INT);
    eval 'sub T_L4INT () {0x44;}' unless defined(&T_L4INT);
    eval 'sub T_L5INT () {0x45;}' unless defined(&T_L5INT);
    eval 'sub T_L6INT () {0x46;}' unless defined(&T_L6INT);
    eval 'sub T_L7INT () {0x47;}' unless defined(&T_L7INT);
    eval 'sub T_L8INT () {0x48;}' unless defined(&T_L8INT);
    eval 'sub T_L9INT () {0x49;}' unless defined(&T_L9INT);
    eval 'sub T_L10INT () {0x4a;}' unless defined(&T_L10INT);
    eval 'sub T_L11INT () {0x4b;}' unless defined(&T_L11INT);
    eval 'sub T_L12INT () {0x4c;}' unless defined(&T_L12INT);
    eval 'sub T_L13INT () {0x4d;}' unless defined(&T_L13INT);
    eval 'sub T_L14INT () {0x4e;}' unless defined(&T_L14INT);
    eval 'sub T_L15INT () {0x4f;}' unless defined(&T_L15INT);
    eval 'sub T_INTVEC () {0x60;}' unless defined(&T_INTVEC);
    eval 'sub T_PA_WATCHPT () {0x61;}' unless defined(&T_PA_WATCHPT);
    eval 'sub T_VA_WATCHPT () {0x62;}' unless defined(&T_VA_WATCHPT);
    eval 'sub T_ECCERR () {0x63;}' unless defined(&T_ECCERR);
    eval 'sub T_FIMMU_MISS () {0x64;}' unless defined(&T_FIMMU_MISS);
    eval 'sub T_FDMMU_MISS () {0x68;}' unless defined(&T_FDMMU_MISS);
    eval 'sub T_FDMMU_PROT () {0x6c;}' unless defined(&T_FDMMU_PROT);
    eval 'sub T_SPILL_N_NORM () {0x80;}' unless defined(&T_SPILL_N_NORM);
    eval 'sub T_SPILL_N_OTHER () {0xa0;}' unless defined(&T_SPILL_N_OTHER);
    eval 'sub T_FILL_N_NORM () {0xc0;}' unless defined(&T_FILL_N_NORM);
    eval 'sub T_FILL_N_OTHER () {0xe0;}' unless defined(&T_FILL_N_OTHER);
    eval 'sub T_SUN_SYSCALL () {0x100;}' unless defined(&T_SUN_SYSCALL);
    eval 'sub T_BREAKPOINT () {0x101;}' unless defined(&T_BREAKPOINT);
    eval 'sub T_UDIV0 () {0x102;}' unless defined(&T_UDIV0);
    eval 'sub T_FLUSHWIN () {0x103;}' unless defined(&T_FLUSHWIN);
    eval 'sub T_CLEANWIN () {0x104;}' unless defined(&T_CLEANWIN);
    eval 'sub T_RANGECHECK () {0x105;}' unless defined(&T_RANGECHECK);
    eval 'sub T_FIXALIGN () {0x106;}' unless defined(&T_FIXALIGN);
    eval 'sub T_INTOF () {0x107;}' unless defined(&T_INTOF);
    eval 'sub T_SVR4_SYSCALL () {0x108;}' unless defined(&T_SVR4_SYSCALL);
    eval 'sub T_BSD_SYSCALL () {0x109;}' unless defined(&T_BSD_SYSCALL);
    eval 'sub T_KGDB_EXEC () {0x10a;}' unless defined(&T_KGDB_EXEC);
    eval 'sub T_SVR4_GETCC () {0x120;}' unless defined(&T_SVR4_GETCC);
    eval 'sub T_SVR4_SETCC () {0x121;}' unless defined(&T_SVR4_SETCC);
    eval 'sub T_SVR4_GETPSR () {0x122;}' unless defined(&T_SVR4_GETPSR);
    eval 'sub T_SVR4_SETPSR () {0x123;}' unless defined(&T_SVR4_SETPSR);
    eval 'sub T_SVR4_GETHRTIME () {0x124;}' unless defined(&T_SVR4_GETHRTIME);
    eval 'sub T_SVR4_GETHRVTIME () {0x125;}' unless defined(&T_SVR4_GETHRVTIME);
    eval 'sub T_SVR4_GETHRESTIME () {0x127;}' unless defined(&T_SVR4_GETHRESTIME);
    eval 'sub T_GETCC () {0x132;}' unless defined(&T_GETCC);
    eval 'sub T_SETCC () {0x133;}' unless defined(&T_SETCC);
    eval 'sub T_SVID_SYSCALL () {0x164;}' unless defined(&T_SVID_SYSCALL);
    eval 'sub T_SPARC_INTL_SYSCALL () {0x165;}' unless defined(&T_SPARC_INTL_SYSCALL);
    eval 'sub T_OS_VENDOR_SYSCALL () {0x166;}' unless defined(&T_OS_VENDOR_SYSCALL);
    eval 'sub T_HW_OEM_SYSCALL () {0x167;}' unless defined(&T_HW_OEM_SYSCALL);
    eval 'sub T_RTF_DEF_TRAP () {0x168;}' unless defined(&T_RTF_DEF_TRAP);
    eval 'sub T_MON_BREAKPOINT () {0x17f;}' unless defined(&T_MON_BREAKPOINT);
    if(defined(&_KERNEL)) {
	eval 'sub T_RWRET () {-1;}' unless defined(&T_RWRET);
	eval 'sub T_AST () {-2;}' unless defined(&T_AST);
    }
    eval 'sub SYSCALL_G2RFLAG () {0x400;}' unless defined(&SYSCALL_G2RFLAG);
    eval 'sub SYSCALL_G7RFLAG () {0x800;}' unless defined(&SYSCALL_G7RFLAG);
    eval 'sub ST_BREAKPOINT () {( &T_BREAKPOINT & 0x7f);}' unless defined(&ST_BREAKPOINT);
    eval 'sub ST_DIV0 () {( &T_DIV0 & 0x7f);}' unless defined(&ST_DIV0);
    eval 'sub ST_FLUSHWIN () {( &T_FLUSHWIN & 0x7f);}' unless defined(&ST_FLUSHWIN);
    eval 'sub ST_SYSCALL () {( &T_SUN_SYSCALL & 0x7f);}' unless defined(&ST_SYSCALL);
}
1;
