require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_UNWIND_H)) {
    eval 'sub _UNWIND_H () {1;}' unless defined(&_UNWIND_H);
    if(defined (&__SEH__)  && !defined (&__USING_SJLJ_EXCEPTIONS__)) {
	require 'windows.ph';
    }
    unless(defined(&HIDE_EXPORTS)) {
    }
    if(defined(&__cplusplus)) {
    }
    if(defined(&__ia64__)  && defined(&__hpux__)) {
    } else {
    }
    eval("sub _URC_NO_REASON () { 0; }") unless defined(&_URC_NO_REASON);
    eval("sub _URC_FOREIGN_EXCEPTION_CAUGHT () { 1; }") unless defined(&_URC_FOREIGN_EXCEPTION_CAUGHT);
    eval("sub _URC_FATAL_PHASE2_ERROR () { 2; }") unless defined(&_URC_FATAL_PHASE2_ERROR);
    eval("sub _URC_FATAL_PHASE1_ERROR () { 3; }") unless defined(&_URC_FATAL_PHASE1_ERROR);
    eval("sub _URC_NORMAL_STOP () { 4; }") unless defined(&_URC_NORMAL_STOP);
    eval("sub _URC_END_OF_STACK () { 5; }") unless defined(&_URC_END_OF_STACK);
    eval("sub _URC_HANDLER_FOUND () { 6; }") unless defined(&_URC_HANDLER_FOUND);
    eval("sub _URC_INSTALL_CONTEXT () { 7; }") unless defined(&_URC_INSTALL_CONTEXT);
    eval("sub _URC_CONTINUE_UNWIND () { 8; }") unless defined(&_URC_CONTINUE_UNWIND);
    if(!defined (&__USING_SJLJ_EXCEPTIONS__)  && defined (&__SEH__)) {
    } else {
    }
    eval 'sub _UA_SEARCH_PHASE () {1;}' unless defined(&_UA_SEARCH_PHASE);
    eval 'sub _UA_CLEANUP_PHASE () {2;}' unless defined(&_UA_CLEANUP_PHASE);
    eval 'sub _UA_HANDLER_FRAME () {4;}' unless defined(&_UA_HANDLER_FRAME);
    eval 'sub _UA_FORCE_UNWIND () {8;}' unless defined(&_UA_FORCE_UNWIND);
    eval 'sub _UA_END_OF_STACK () {16;}' unless defined(&_UA_END_OF_STACK);
    unless(defined(&LIBGCC2_UNWIND_ATTRIBUTE)) {
	eval 'sub LIBGCC2_UNWIND_ATTRIBUTE () {1;}' unless defined(&LIBGCC2_UNWIND_ATTRIBUTE);
    }
    if(defined(&__ia64__)) {
	eval 'sub _Unwind_GetDataRelBase {
	    my($_C) = @_;
    	    eval q({  &_Unwind_GetGR ($_C, 1); });
	}' unless defined(&_Unwind_GetDataRelBase);
	eval 'sub _Unwind_GetTextRelBase () {
	    eval q((\'struct _Unwind_Context\' * &_C  &__attribute__ (( &__unused__))) {  &__builtin_abort (); 0; });
	}' unless defined(&_Unwind_GetTextRelBase);
    } else {
    }
    unless(defined(&__SIZEOF_LONG__)) {
	die("__SIZEOF_LONG__ macro not defined");
    }
    unless(defined(&__SIZEOF_POINTER__)) {
	die("__SIZEOF_POINTER__ macro not defined");
    }
    if((defined(&__SIZEOF_LONG__) ? &__SIZEOF_LONG__ : undef) >= (defined(&__SIZEOF_POINTER__) ? &__SIZEOF_POINTER__ : undef)) {
    }
 elsif((defined(&__SIZEOF_LONG_LONG__) ? &__SIZEOF_LONG_LONG__ : undef) >= (defined(&__SIZEOF_POINTER__) ? &__SIZEOF_POINTER__ : undef)) {
    } else {
	die("What type shall we use for _sleb128_t?");
    }
    if(defined (&__SEH__)  && !defined (&__USING_SJLJ_EXCEPTIONS__)) {
    }
    if(defined(&__cplusplus)) {
    }
    unless(defined(&HIDE_EXPORTS)) {
    }
    eval 'sub _Unwind_Frames_Extra {
        my($frames) = @_;
	    eval q();
    }' unless defined(&_Unwind_Frames_Extra);
    eval 'sub _Unwind_Frames_Increment {
        my($context, $frames) = @_;
	    eval q($frames++);
    }' unless defined(&_Unwind_Frames_Increment);
}
1;
