require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&OPENSSL_MACROS_H)) {
    eval 'sub OPENSSL_MACROS_H () {1;}' unless defined(&OPENSSL_MACROS_H);
    require 'openssl/opensslconf.ph';
    require 'openssl/opensslv.ph';
    eval 'sub OPENSSL_MSTR_HELPER {
        my($x) = @_;
	    eval q($x);
    }' unless defined(&OPENSSL_MSTR_HELPER);
    eval 'sub OPENSSL_MSTR {
        my($x) = @_;
	    eval q( &OPENSSL_MSTR_HELPER($x));
    }' unless defined(&OPENSSL_MSTR);
    eval 'sub NON_EMPTY_TRANSLATION_UNIT () { &static  &void * &dummy =  &dummy;;}' unless defined(&NON_EMPTY_TRANSLATION_UNIT);
    unless(defined(&OSSL_DEPRECATED)) {
	undef(&OSSL_DEPRECATED_FOR) if defined(&OSSL_DEPRECATED_FOR);
	unless(defined(&OPENSSL_SUPPRESS_DEPRECATED)) {
	    if(defined(&_MSC_VER)) {
		if((defined(&_MSC_VER) ? &_MSC_VER : undef) >= 1400) {
		    eval 'sub OSSL_DEPRECATED {
		        my($since) = @_;
    			eval q( &__declspec( &deprecated(\\"Since OpenSSL \\" $since)));
		    }' unless defined(&OSSL_DEPRECATED);
		    eval 'sub OSSL_DEPRECATED_FOR {
		        my($since, $message) = @_;
    			eval q( &__declspec( &deprecated(\\"Since OpenSSL \\" $since \\";\\" $message)));
		    }' unless defined(&OSSL_DEPRECATED_FOR);
		}
 elsif((defined(&_MSC_VER) ? &_MSC_VER : undef) >= 1310) {
		    eval 'sub OSSL_DEPRECATED {
		        my($since) = @_;
    			eval q( &__declspec( &deprecated));
		    }' unless defined(&OSSL_DEPRECATED);
		    eval 'sub OSSL_DEPRECATED_FOR {
		        my($since, $message) = @_;
    			eval q( &__declspec( &deprecated));
		    }' unless defined(&OSSL_DEPRECATED_FOR);
		}
	    }
 elsif(defined(&__GNUC__)) {
		if((defined(&__GNUC__) ? &__GNUC__ : undef) > 4|| ((defined(&__GNUC__) ? &__GNUC__ : undef) == 4 && (defined(&__GNUC_MINOR__) ? &__GNUC_MINOR__ : undef) >= 5)) {
		    eval 'sub OSSL_DEPRECATED {
		        my($since) = @_;
    			eval q( &__attribute__(( &deprecated(\\"Since OpenSSL \\" $since))));
		    }' unless defined(&OSSL_DEPRECATED);
		    eval 'sub OSSL_DEPRECATED_FOR {
		        my($since, $message) = @_;
    			eval q( &__attribute__(( &deprecated(\\"Since OpenSSL \\" $since \\";\\" $message))));
		    }' unless defined(&OSSL_DEPRECATED_FOR);
		}
 elsif((defined(&__GNUC__) ? &__GNUC__ : undef) > 3|| ((defined(&__GNUC__) ? &__GNUC__ : undef) == 3 && (defined(&__GNUC_MINOR__) ? &__GNUC_MINOR__ : undef) > 0)) {
		    eval 'sub OSSL_DEPRECATED {
		        my($since) = @_;
    			eval q( &__attribute__(( &deprecated)));
		    }' unless defined(&OSSL_DEPRECATED);
		    eval 'sub OSSL_DEPRECATED_FOR {
		        my($since, $message) = @_;
    			eval q( &__attribute__(( &deprecated)));
		    }' unless defined(&OSSL_DEPRECATED_FOR);
		}
	    }
 elsif(defined(&__SUNPRO_C)) {
		if(((defined(&__SUNPRO_C) ? &__SUNPRO_C : undef) >= 0x5130)) {
		    eval 'sub OSSL_DEPRECATED {
		        my($since) = @_;
    			eval q( &__attribute__(( &deprecated)));
		    }' unless defined(&OSSL_DEPRECATED);
		    eval 'sub OSSL_DEPRECATED_FOR {
		        my($since, $message) = @_;
    			eval q( &__attribute__(( &deprecated)));
		    }' unless defined(&OSSL_DEPRECATED_FOR);
		}
	    }
	}
    }
    unless(defined(&OSSL_DEPRECATED)) {
	eval 'sub OSSL_DEPRECATED {
	    my($since) = @_;
    	    eval q( &extern);
	}' unless defined(&OSSL_DEPRECATED);
	eval 'sub OSSL_DEPRECATED_FOR {
	    my($since, $message) = @_;
    	    eval q( &extern);
	}' unless defined(&OSSL_DEPRECATED_FOR);
    }
    if(defined(&OPENSSL_API_LEVEL)) {
	die("OPENSSL_API_LEVEL must not be defined by application");
    }
    if(defined(&OPENSSL_API_COMPAT)) {
	if((defined(&OPENSSL_API_COMPAT) ? &OPENSSL_API_COMPAT : undef) < 0x900000) {
	    eval 'sub OPENSSL_API_LEVEL () {( &OPENSSL_API_COMPAT);}' unless defined(&OPENSSL_API_LEVEL);
	} else {
	    eval 'sub OPENSSL_API_LEVEL () {((( &OPENSSL_API_COMPAT >> 28) & 0xf) * 10000+ (( &OPENSSL_API_COMPAT >> 20) & 0xff) * 100+ (( &OPENSSL_API_COMPAT >> 12) & 0xff));}' unless defined(&OPENSSL_API_LEVEL);
	}
    }
    unless(defined(&OPENSSL_API_LEVEL)) {
	if((defined(&OPENSSL_CONFIGURED_API) ? &OPENSSL_CONFIGURED_API : undef) > 0) {
	    eval 'sub OPENSSL_API_LEVEL () {( &OPENSSL_CONFIGURED_API);}' unless defined(&OPENSSL_API_LEVEL);
	} else {
	    eval 'sub OPENSSL_API_LEVEL () {( &OPENSSL_VERSION_MAJOR * 10000+  &OPENSSL_VERSION_MINOR * 100);}' unless defined(&OPENSSL_API_LEVEL);
	}
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) > (defined(&OPENSSL_CONFIGURED_API) ? &OPENSSL_CONFIGURED_API : undef)) {
	die("The requested API level higher than the configured API compatibility level");
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) > ((defined(&OPENSSL_VERSION_MAJOR) ? &OPENSSL_VERSION_MAJOR : undef) * 10000+ (defined(&OPENSSL_VERSION_MINOR) ? &OPENSSL_VERSION_MINOR : undef) * 100)) {
	die("OPENSSL_API_COMPAT expresses an impossible API compatibility level");
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) < 30000 && (defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) >= 20000) {
	die("OPENSSL_API_COMPAT expresses an impossible API compatibility level");
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) < 908) {
	die("OPENSSL_API_COMPAT expresses an impossible API compatibility level");
    }
    undef(&OPENSSL_NO_DEPRECATED_3_0) if defined(&OPENSSL_NO_DEPRECATED_3_0);
    undef(&OPENSSL_NO_DEPRECATED_1_1_1) if defined(&OPENSSL_NO_DEPRECATED_1_1_1);
    undef(&OPENSSL_NO_DEPRECATED_1_1_0) if defined(&OPENSSL_NO_DEPRECATED_1_1_0);
    undef(&OPENSSL_NO_DEPRECATED_1_0_2) if defined(&OPENSSL_NO_DEPRECATED_1_0_2);
    undef(&OPENSSL_NO_DEPRECATED_1_0_1) if defined(&OPENSSL_NO_DEPRECATED_1_0_1);
    undef(&OPENSSL_NO_DEPRECATED_1_0_0) if defined(&OPENSSL_NO_DEPRECATED_1_0_0);
    undef(&OPENSSL_NO_DEPRECATED_0_9_8) if defined(&OPENSSL_NO_DEPRECATED_0_9_8);
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) >= 30000) {
	unless(defined(&OPENSSL_NO_DEPRECATED)) {
	    eval 'sub OSSL_DEPRECATEDIN_3_0 () { &OSSL_DEPRECATED(3.0);}' unless defined(&OSSL_DEPRECATEDIN_3_0);
	    eval 'sub OSSL_DEPRECATEDIN_3_0_FOR {
	        my($msg) = @_;
    		eval q( &OSSL_DEPRECATED_FOR(3.0, $msg));
	    }' unless defined(&OSSL_DEPRECATEDIN_3_0_FOR);
	} else {
	    eval 'sub OPENSSL_NO_DEPRECATED_3_0 () {1;}' unless defined(&OPENSSL_NO_DEPRECATED_3_0);
	}
    } else {
	eval 'sub OSSL_DEPRECATEDIN_3_0 () {1;}' unless defined(&OSSL_DEPRECATEDIN_3_0);
	eval 'sub OSSL_DEPRECATEDIN_3_0_FOR {
	    my($msg) = @_;
    	    eval q();
	}' unless defined(&OSSL_DEPRECATEDIN_3_0_FOR);
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) >= 10101) {
	unless(defined(&OPENSSL_NO_DEPRECATED)) {
	    eval 'sub OSSL_DEPRECATEDIN_1_1_1 () { &OSSL_DEPRECATED(1.1.1);}' unless defined(&OSSL_DEPRECATEDIN_1_1_1);
	    eval 'sub OSSL_DEPRECATEDIN_1_1_1_FOR {
	        my($msg) = @_;
    		eval q( &OSSL_DEPRECATED_FOR(1.1.1, $msg));
	    }' unless defined(&OSSL_DEPRECATEDIN_1_1_1_FOR);
	} else {
	    eval 'sub OPENSSL_NO_DEPRECATED_1_1_1 () {1;}' unless defined(&OPENSSL_NO_DEPRECATED_1_1_1);
	}
    } else {
	eval 'sub OSSL_DEPRECATEDIN_1_1_1 () {1;}' unless defined(&OSSL_DEPRECATEDIN_1_1_1);
	eval 'sub OSSL_DEPRECATEDIN_1_1_1_FOR {
	    my($msg) = @_;
    	    eval q();
	}' unless defined(&OSSL_DEPRECATEDIN_1_1_1_FOR);
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) >= 10100) {
	unless(defined(&OPENSSL_NO_DEPRECATED)) {
	    eval 'sub OSSL_DEPRECATEDIN_1_1_0 () { &OSSL_DEPRECATED(1.1.0);}' unless defined(&OSSL_DEPRECATEDIN_1_1_0);
	    eval 'sub OSSL_DEPRECATEDIN_1_1_0_FOR {
	        my($msg) = @_;
    		eval q( &OSSL_DEPRECATED_FOR(1.1.0, $msg));
	    }' unless defined(&OSSL_DEPRECATEDIN_1_1_0_FOR);
	} else {
	    eval 'sub OPENSSL_NO_DEPRECATED_1_1_0 () {1;}' unless defined(&OPENSSL_NO_DEPRECATED_1_1_0);
	}
    } else {
	eval 'sub OSSL_DEPRECATEDIN_1_1_0 () {1;}' unless defined(&OSSL_DEPRECATEDIN_1_1_0);
	eval 'sub OSSL_DEPRECATEDIN_1_1_0_FOR {
	    my($msg) = @_;
    	    eval q();
	}' unless defined(&OSSL_DEPRECATEDIN_1_1_0_FOR);
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) >= 10002) {
	unless(defined(&OPENSSL_NO_DEPRECATED)) {
	    eval 'sub OSSL_DEPRECATEDIN_1_0_2 () { &OSSL_DEPRECATED(1.0.2);}' unless defined(&OSSL_DEPRECATEDIN_1_0_2);
	    eval 'sub OSSL_DEPRECATEDIN_1_0_2_FOR {
	        my($msg) = @_;
    		eval q( &OSSL_DEPRECATED_FOR(1.0.2, $msg));
	    }' unless defined(&OSSL_DEPRECATEDIN_1_0_2_FOR);
	} else {
	    eval 'sub OPENSSL_NO_DEPRECATED_1_0_2 () {1;}' unless defined(&OPENSSL_NO_DEPRECATED_1_0_2);
	}
    } else {
	eval 'sub OSSL_DEPRECATEDIN_1_0_2 () {1;}' unless defined(&OSSL_DEPRECATEDIN_1_0_2);
	eval 'sub OSSL_DEPRECATEDIN_1_0_2_FOR {
	    my($msg) = @_;
    	    eval q();
	}' unless defined(&OSSL_DEPRECATEDIN_1_0_2_FOR);
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) >= 10001) {
	unless(defined(&OPENSSL_NO_DEPRECATED)) {
	    eval 'sub OSSL_DEPRECATEDIN_1_0_1 () { &OSSL_DEPRECATED(1.0.1);}' unless defined(&OSSL_DEPRECATEDIN_1_0_1);
	    eval 'sub OSSL_DEPRECATEDIN_1_0_1_FOR {
	        my($msg) = @_;
    		eval q( &OSSL_DEPRECATED_FOR(1.0.1, $msg));
	    }' unless defined(&OSSL_DEPRECATEDIN_1_0_1_FOR);
	} else {
	    eval 'sub OPENSSL_NO_DEPRECATED_1_0_1 () {1;}' unless defined(&OPENSSL_NO_DEPRECATED_1_0_1);
	}
    } else {
	eval 'sub OSSL_DEPRECATEDIN_1_0_1 () {1;}' unless defined(&OSSL_DEPRECATEDIN_1_0_1);
	eval 'sub OSSL_DEPRECATEDIN_1_0_1_FOR {
	    my($msg) = @_;
    	    eval q();
	}' unless defined(&OSSL_DEPRECATEDIN_1_0_1_FOR);
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) >= 10000) {
	unless(defined(&OPENSSL_NO_DEPRECATED)) {
	    eval 'sub OSSL_DEPRECATEDIN_1_0_0 () { &OSSL_DEPRECATED(1.0.0);}' unless defined(&OSSL_DEPRECATEDIN_1_0_0);
	    eval 'sub OSSL_DEPRECATEDIN_1_0_0_FOR {
	        my($msg) = @_;
    		eval q( &OSSL_DEPRECATED_FOR(1.0.0, $msg));
	    }' unless defined(&OSSL_DEPRECATEDIN_1_0_0_FOR);
	} else {
	    eval 'sub OPENSSL_NO_DEPRECATED_1_0_0 () {1;}' unless defined(&OPENSSL_NO_DEPRECATED_1_0_0);
	}
    } else {
	eval 'sub OSSL_DEPRECATEDIN_1_0_0 () {1;}' unless defined(&OSSL_DEPRECATEDIN_1_0_0);
	eval 'sub OSSL_DEPRECATEDIN_1_0_0_FOR {
	    my($msg) = @_;
    	    eval q();
	}' unless defined(&OSSL_DEPRECATEDIN_1_0_0_FOR);
    }
    if((defined(&OPENSSL_API_LEVEL) ? &OPENSSL_API_LEVEL : undef) >= 908) {
	unless(defined(&OPENSSL_NO_DEPRECATED)) {
	    eval 'sub OSSL_DEPRECATEDIN_0_9_8 () { &OSSL_DEPRECATED(0.9.8);}' unless defined(&OSSL_DEPRECATEDIN_0_9_8);
	    eval 'sub OSSL_DEPRECATEDIN_0_9_8_FOR {
	        my($msg) = @_;
    		eval q( &OSSL_DEPRECATED_FOR(0.9.8, $msg));
	    }' unless defined(&OSSL_DEPRECATEDIN_0_9_8_FOR);
	} else {
	    eval 'sub OPENSSL_NO_DEPRECATED_0_9_8 () {1;}' unless defined(&OPENSSL_NO_DEPRECATED_0_9_8);
	}
    } else {
	eval 'sub OSSL_DEPRECATEDIN_0_9_8 () {1;}' unless defined(&OSSL_DEPRECATEDIN_0_9_8);
	eval 'sub OSSL_DEPRECATEDIN_0_9_8_FOR {
	    my($msg) = @_;
    	    eval q();
	}' unless defined(&OSSL_DEPRECATEDIN_0_9_8_FOR);
    }
    unless(defined(&OPENSSL_FILE)) {
	if(defined(&OPENSSL_NO_FILENAMES)) {
	    eval 'sub OPENSSL_FILE () {"";}' unless defined(&OPENSSL_FILE);
	    eval 'sub OPENSSL_LINE () {0;}' unless defined(&OPENSSL_LINE);
	} else {
	    eval 'sub OPENSSL_FILE () { &__FILE__;}' unless defined(&OPENSSL_FILE);
	    eval 'sub OPENSSL_LINE () { &__LINE__;}' unless defined(&OPENSSL_LINE);
	}
    }
    unless(defined(&OPENSSL_FUNC)) {
	if(defined(&__STDC_VERSION__)) {
	    if((defined(&__STDC_VERSION__) ? &__STDC_VERSION__ : undef) >= 199901) {
		eval 'sub OPENSSL_FUNC () { &__func__;}' unless defined(&OPENSSL_FUNC);
	    }
 elsif(defined(&__GNUC__)  && (defined(&__GNUC__) ? &__GNUC__ : undef) >= 2) {
		eval 'sub OPENSSL_FUNC () { &__FUNCTION__;}' unless defined(&OPENSSL_FUNC);
	    }
	}
 elsif(defined(&_MSC_VER)) {
	    eval 'sub OPENSSL_FUNC () { &__FUNCTION__;}' unless defined(&OPENSSL_FUNC);
	}
	unless(defined(&OPENSSL_FUNC)) {
	    eval 'sub OPENSSL_FUNC () {"(unknown function)";}' unless defined(&OPENSSL_FUNC);
	}
    }
}
1;
