require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&OPENSSL_TRACE_H)) {
    eval 'sub OPENSSL_TRACE_H () {1;}' unless defined(&OPENSSL_TRACE_H);
    require 'stdarg.ph';
    require 'openssl/bio.ph';
    if(defined(&__cplusplus)) {
    }
    eval 'sub OSSL_TRACE_CATEGORY_ALL () {0;}' unless defined(&OSSL_TRACE_CATEGORY_ALL);
    eval 'sub OSSL_TRACE_CATEGORY_TRACE () {1;}' unless defined(&OSSL_TRACE_CATEGORY_TRACE);
    eval 'sub OSSL_TRACE_CATEGORY_INIT () {2;}' unless defined(&OSSL_TRACE_CATEGORY_INIT);
    eval 'sub OSSL_TRACE_CATEGORY_TLS () {3;}' unless defined(&OSSL_TRACE_CATEGORY_TLS);
    eval 'sub OSSL_TRACE_CATEGORY_TLS_CIPHER () {4;}' unless defined(&OSSL_TRACE_CATEGORY_TLS_CIPHER);
    eval 'sub OSSL_TRACE_CATEGORY_CONF () {5;}' unless defined(&OSSL_TRACE_CATEGORY_CONF);
    eval 'sub OSSL_TRACE_CATEGORY_ENGINE_TABLE () {6;}' unless defined(&OSSL_TRACE_CATEGORY_ENGINE_TABLE);
    eval 'sub OSSL_TRACE_CATEGORY_ENGINE_REF_COUNT () {7;}' unless defined(&OSSL_TRACE_CATEGORY_ENGINE_REF_COUNT);
    eval 'sub OSSL_TRACE_CATEGORY_PKCS5V2 () {8;}' unless defined(&OSSL_TRACE_CATEGORY_PKCS5V2);
    eval 'sub OSSL_TRACE_CATEGORY_PKCS12_KEYGEN () {9;}' unless defined(&OSSL_TRACE_CATEGORY_PKCS12_KEYGEN);
    eval 'sub OSSL_TRACE_CATEGORY_PKCS12_DECRYPT () {10;}' unless defined(&OSSL_TRACE_CATEGORY_PKCS12_DECRYPT);
    eval 'sub OSSL_TRACE_CATEGORY_X509V3_POLICY () {11;}' unless defined(&OSSL_TRACE_CATEGORY_X509V3_POLICY);
    eval 'sub OSSL_TRACE_CATEGORY_BN_CTX () {12;}' unless defined(&OSSL_TRACE_CATEGORY_BN_CTX);
    eval 'sub OSSL_TRACE_CATEGORY_CMP () {13;}' unless defined(&OSSL_TRACE_CATEGORY_CMP);
    eval 'sub OSSL_TRACE_CATEGORY_STORE () {14;}' unless defined(&OSSL_TRACE_CATEGORY_STORE);
    eval 'sub OSSL_TRACE_CATEGORY_DECODER () {15;}' unless defined(&OSSL_TRACE_CATEGORY_DECODER);
    eval 'sub OSSL_TRACE_CATEGORY_ENCODER () {16;}' unless defined(&OSSL_TRACE_CATEGORY_ENCODER);
    eval 'sub OSSL_TRACE_CATEGORY_REF_COUNT () {17;}' unless defined(&OSSL_TRACE_CATEGORY_REF_COUNT);
    eval 'sub OSSL_TRACE_CATEGORY_NUM () {18;}' unless defined(&OSSL_TRACE_CATEGORY_NUM);
    eval 'sub OSSL_TRACE_CTRL_BEGIN () {0;}' unless defined(&OSSL_TRACE_CTRL_BEGIN);
    eval 'sub OSSL_TRACE_CTRL_WRITE () {1;}' unless defined(&OSSL_TRACE_CTRL_WRITE);
    eval 'sub OSSL_TRACE_CTRL_END () {2;}' unless defined(&OSSL_TRACE_CTRL_END);
    if(!defined (&OPENSSL_NO_TRACE)  && !defined (&FIPS_MODULE)) {
	eval 'sub OSSL_TRACE_BEGIN {
	    my($category) = @_;
    	    eval q( &do {  &BIO * &trc_out =  &OSSL_trace_begin( &OSSL_TRACE_CATEGORY_$category);  &if ( &trc_out !=  &NULL));
	}' unless defined(&OSSL_TRACE_BEGIN);
	eval 'sub OSSL_TRACE_END {
	    my($category) = @_;
    	    eval q( &OSSL_trace_end( &OSSL_TRACE_CATEGORY_$category,  &trc_out); }  &while (0));
	}' unless defined(&OSSL_TRACE_END);
	eval 'sub OSSL_TRACE_CANCEL {
	    my($category) = @_;
    	    eval q( &OSSL_trace_end( &OSSL_TRACE_CATEGORY_$category,  &trc_out));
	}' unless defined(&OSSL_TRACE_CANCEL);
    } else {
	eval 'sub OSSL_TRACE_BEGIN {
	    my($category) = @_;
    	    eval q( &do {  &BIO * &trc_out =  &NULL;  &if (0));
	}' unless defined(&OSSL_TRACE_BEGIN);
	eval 'sub OSSL_TRACE_END {
	    my($category) = @_;
    	    eval q(}  &while (0));
	}' unless defined(&OSSL_TRACE_END);
	eval 'sub OSSL_TRACE_CANCEL {
	    my($category) = @_;
    	    eval q((( &void)0));
	}' unless defined(&OSSL_TRACE_CANCEL);
    }
    if(!defined (&OPENSSL_NO_TRACE)  && !defined (&FIPS_MODULE)) {
	eval 'sub OSSL_TRACE_ENABLED {
	    my($category) = @_;
    	    eval q( &OSSL_trace_enabled( &OSSL_TRACE_CATEGORY_$category));
	}' unless defined(&OSSL_TRACE_ENABLED);
    } else {
	eval 'sub OSSL_TRACE_ENABLED {
	    my($category) = @_;
    	    eval q((0));
	}' unless defined(&OSSL_TRACE_ENABLED);
    }
    if(!defined (&OPENSSL_NO_TRACE)  && !defined (&FIPS_MODULE)) {
	eval 'sub OSSL_TRACEV {
	    my($category, $args) = @_;
    	    eval q( &OSSL_TRACE_BEGIN($category)  &BIO_printf $args;  &OSSL_TRACE_END($category));
	}' unless defined(&OSSL_TRACEV);
    } else {
	eval 'sub OSSL_TRACEV {
	    my($category, $args) = @_;
    	    eval q((( &void)0));
	}' unless defined(&OSSL_TRACEV);
    }
    eval 'sub OSSL_TRACE {
        my($category, $text) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, \\"%s\\", $text)));
    }' unless defined(&OSSL_TRACE);
    eval 'sub OSSL_TRACE1 {
        my($category, $format, $arg1) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, $format, $arg1)));
    }' unless defined(&OSSL_TRACE1);
    eval 'sub OSSL_TRACE2 {
        my($category, $format, $arg1, $arg2) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, $format, $arg1, $arg2)));
    }' unless defined(&OSSL_TRACE2);
    eval 'sub OSSL_TRACE3 {
        my($category, $format, $arg1, $arg2, $arg3) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, $format, $arg1, $arg2, $arg3)));
    }' unless defined(&OSSL_TRACE3);
    eval 'sub OSSL_TRACE4 {
        my($category, $format, $arg1, $arg2, $arg3, $arg4) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, $format, $arg1, $arg2, $arg3, $arg4)));
    }' unless defined(&OSSL_TRACE4);
    eval 'sub OSSL_TRACE5 {
        my($category, $format, $arg1, $arg2, $arg3, $arg4, $arg5) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, $format, $arg1, $arg2, $arg3, $arg4, $arg5)));
    }' unless defined(&OSSL_TRACE5);
    eval 'sub OSSL_TRACE6 {
        my($category, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6)));
    }' unless defined(&OSSL_TRACE6);
    eval 'sub OSSL_TRACE7 {
        my($category, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7)));
    }' unless defined(&OSSL_TRACE7);
    eval 'sub OSSL_TRACE8 {
        my($category, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8)));
    }' unless defined(&OSSL_TRACE8);
    eval 'sub OSSL_TRACE9 {
        my($category, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8, $arg9) = @_;
	    eval q( &OSSL_TRACEV($category, ( &trc_out, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8, $arg9)));
    }' unless defined(&OSSL_TRACE9);
    if(defined(&__cplusplus)) {
    }
}
1;
