require '_h2ph_pre.ph';

unless(defined(&_ANSIDECL_H)) {
    eval 'sub _ANSIDECL_H () {1;}' unless defined(&_ANSIDECL_H);
    if(defined ( &__STDC__) || defined ( &_AIX) || (defined ( &__mips)  && defined ( &_SYSTYPE_SVR4)) || defined( &_WIN32)) {
	eval 'sub PTR () { &void *;}' unless defined(&PTR);
	eval 'sub PTRCONST () { &void * &CONST;}' unless defined(&PTRCONST);
	eval 'sub LONG_DOUBLE () {\'long double\';}' unless defined(&LONG_DOUBLE);
	unless(defined(&IN_GCC)) {
	    eval 'sub AND () {,;}' unless defined(&AND);
	    eval 'sub NOARGS () { &void;}' unless defined(&NOARGS);
	    eval 'sub VOLATILE () { &volatile;}' unless defined(&VOLATILE);
	    eval 'sub SIGNED () {\'signed\';}' unless defined(&SIGNED);
	}
	eval 'sub PARAMS {
	    local($paramlist) = @_;
    	    eval q($paramlist);
	}' unless defined(&PARAMS);
	eval 'sub ANSI_PROTOTYPES () {1;}' unless defined(&ANSI_PROTOTYPES);
	eval 'sub VPARAMS {
	    local($ARGS) = @_;
    	    eval q($ARGS);
	}' unless defined(&VPARAMS);
	eval 'sub VA_START {
	    local($va_list,$var) = @_;
    	    eval q( &va_start($va_list,$var));
	}' unless defined(&VA_START);
	unless(defined(&IN_GCC)) {
	    eval 'sub CONST () { &const;}' unless defined(&CONST);
	    eval 'sub DOTS () {, ...;}' unless defined(&DOTS);
	    eval 'sub PROTO {
	        local($type, $name, $arglist) = @_;
    		eval q($type $name $arglist);
	    }' unless defined(&PROTO);
	    eval 'sub EXFUN {
	        local($name, $proto) = @_;
    		eval q($name $proto);
	    }' unless defined(&EXFUN);
	    eval 'sub DEFUN {
	        local($name, $arglist, $args) = @_;
    		eval q($name($args));
	    }' unless defined(&DEFUN);
	    eval 'sub DEFUN_VOID {
	        local($name) = @_;
    		eval q($name( &void));
	    }' unless defined(&DEFUN_VOID);
	}
    } else {
	eval 'sub PTR () {\'char\' *;}' unless defined(&PTR);
	eval 'sub PTRCONST () { &PTR;}' unless defined(&PTRCONST);
	eval 'sub LONG_DOUBLE () { &double;}' unless defined(&LONG_DOUBLE);
	unless(defined(&IN_GCC)) {
	    eval 'sub AND () {;;}' unless defined(&AND);
	    eval 'sub NOARGS () {1;}' unless defined(&NOARGS);
	    eval 'sub VOLATILE () {1;}' unless defined(&VOLATILE);
	    eval 'sub SIGNED () {1;}' unless defined(&SIGNED);
	}
	unless(defined(&const)) {
	    eval 'sub const () {1;}' unless defined(&const);
	}
	eval 'sub PARAMS {
	    local($paramlist) = @_;
    	    eval q(());
	}' unless defined(&PARAMS);
	eval 'sub VPARAMS {
	    local($ARGS) = @_;
    	    eval q(  &va_dcl);
	}' unless defined(&VPARAMS);
	eval 'sub VA_START {
	    local($va_list,$var) = @_;
    	    eval q( &va_start($va_list));
	}' unless defined(&VA_START);
	unless(defined(&IN_GCC)) {
	    eval 'sub CONST () {1;}' unless defined(&CONST);
	    eval 'sub DOTS () {1;}' unless defined(&DOTS);
	    eval 'sub PROTO {
	        local($type, $name, $arglist) = @_;
    		eval q($type $name ());
	    }' unless defined(&PROTO);
	    eval 'sub EXFUN {
	        local($name, $proto) = @_;
    		eval q($name());
	    }' unless defined(&EXFUN);
	    eval 'sub DEFUN {
	        local($name, $arglist, $args) = @_;
    		eval q($name $arglist $args;);
	    }' unless defined(&DEFUN);
	    eval 'sub DEFUN_VOID {
	        local($name) = @_;
    		eval q($name());
	    }' unless defined(&DEFUN_VOID);
	}
    }
    unless(defined(&GCC_VERSION)) {
	eval 'sub GCC_VERSION () {( &__GNUC__ * 1000+  &__GNUC_MINOR__);}' unless defined(&GCC_VERSION);
    }
    if(((defined(&GCC_VERSION) ? &GCC_VERSION : 0) < 2007)) {
	eval 'sub __attribute__ {
	    local($x) = @_;
    	    eval q();
	}' unless defined(&__attribute__);
    }
    unless(defined(&ATTRIBUTE_MALLOC)) {
	if(((defined(&GCC_VERSION) ? &GCC_VERSION : 0) >= 2096)) {
	    eval 'sub ATTRIBUTE_MALLOC () { &__attribute__ (( &__malloc__));}' unless defined(&ATTRIBUTE_MALLOC);
	} else {
	    eval 'sub ATTRIBUTE_MALLOC () {1;}' unless defined(&ATTRIBUTE_MALLOC);
	}
    }
    unless(defined(&ATTRIBUTE_UNUSED_LABEL)) {
	if(((defined(&GCC_VERSION) ? &GCC_VERSION : 0) >= 2093)) {
	    eval 'sub ATTRIBUTE_UNUSED_LABEL () { &ATTRIBUTE_UNUSED;}' unless defined(&ATTRIBUTE_UNUSED_LABEL);
	} else {
	    eval 'sub ATTRIBUTE_UNUSED_LABEL () {1;}' unless defined(&ATTRIBUTE_UNUSED_LABEL);
	}
    }
    unless(defined(&ATTRIBUTE_UNUSED)) {
	eval 'sub ATTRIBUTE_UNUSED () { &__attribute__ (( &__unused__));}' unless defined(&ATTRIBUTE_UNUSED);
    }
    unless(defined(&ATTRIBUTE_NORETURN)) {
	eval 'sub ATTRIBUTE_NORETURN () { &__attribute__ (( &__noreturn__));}' unless defined(&ATTRIBUTE_NORETURN);
    }
    unless(defined(&ATTRIBUTE_PRINTF)) {
	eval 'sub ATTRIBUTE_PRINTF {
	    local($m, $n) = @_;
    	    eval q( &__attribute__ (( &__format__ ( &__printf__, $m, $n))));
	}' unless defined(&ATTRIBUTE_PRINTF);
	eval 'sub ATTRIBUTE_PRINTF_1 () { &ATTRIBUTE_PRINTF(1, 2);}' unless defined(&ATTRIBUTE_PRINTF_1);
	eval 'sub ATTRIBUTE_PRINTF_2 () { &ATTRIBUTE_PRINTF(2, 3);}' unless defined(&ATTRIBUTE_PRINTF_2);
	eval 'sub ATTRIBUTE_PRINTF_3 () { &ATTRIBUTE_PRINTF(3, 4);}' unless defined(&ATTRIBUTE_PRINTF_3);
	eval 'sub ATTRIBUTE_PRINTF_4 () { &ATTRIBUTE_PRINTF(4, 5);}' unless defined(&ATTRIBUTE_PRINTF_4);
	eval 'sub ATTRIBUTE_PRINTF_5 () { &ATTRIBUTE_PRINTF(5, 6);}' unless defined(&ATTRIBUTE_PRINTF_5);
    }
}
1;
