require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&HEADER_OPENSSL_TYPES_H)) {
    eval 'sub HEADER_OPENSSL_TYPES_H () {1;}' unless defined(&HEADER_OPENSSL_TYPES_H);
    require 'openssl/e_os2.ph';
    if(defined(&NO_ASN1_TYPEDEFS)) {
	eval 'sub ASN1_INTEGER () { &ASN1_STRING;}' unless defined(&ASN1_INTEGER);
	eval 'sub ASN1_ENUMERATED () { &ASN1_STRING;}' unless defined(&ASN1_ENUMERATED);
	eval 'sub ASN1_BIT_STRING () { &ASN1_STRING;}' unless defined(&ASN1_BIT_STRING);
	eval 'sub ASN1_OCTET_STRING () { &ASN1_STRING;}' unless defined(&ASN1_OCTET_STRING);
	eval 'sub ASN1_PRINTABLESTRING () { &ASN1_STRING;}' unless defined(&ASN1_PRINTABLESTRING);
	eval 'sub ASN1_T61STRING () { &ASN1_STRING;}' unless defined(&ASN1_T61STRING);
	eval 'sub ASN1_IA5STRING () { &ASN1_STRING;}' unless defined(&ASN1_IA5STRING);
	eval 'sub ASN1_UTCTIME () { &ASN1_STRING;}' unless defined(&ASN1_UTCTIME);
	eval 'sub ASN1_GENERALIZEDTIME () { &ASN1_STRING;}' unless defined(&ASN1_GENERALIZEDTIME);
	eval 'sub ASN1_TIME () { &ASN1_STRING;}' unless defined(&ASN1_TIME);
	eval 'sub ASN1_GENERALSTRING () { &ASN1_STRING;}' unless defined(&ASN1_GENERALSTRING);
	eval 'sub ASN1_UNIVERSALSTRING () { &ASN1_STRING;}' unless defined(&ASN1_UNIVERSALSTRING);
	eval 'sub ASN1_BMPSTRING () { &ASN1_STRING;}' unless defined(&ASN1_BMPSTRING);
	eval 'sub ASN1_VISIBLESTRING () { &ASN1_STRING;}' unless defined(&ASN1_VISIBLESTRING);
	eval 'sub ASN1_UTF8STRING () { &ASN1_STRING;}' unless defined(&ASN1_UTF8STRING);
	eval 'sub ASN1_BOOLEAN () {\'int\';}' unless defined(&ASN1_BOOLEAN);
	eval 'sub ASN1_NULL () {\'int\';}' unless defined(&ASN1_NULL);
    } else {
    }
    if(defined(&OPENSSL_SYS_WIN32)) {
	undef(&X509_NAME) if defined(&X509_NAME);
	undef(&PKCS7_ISSUER_AND_SERIAL) if defined(&PKCS7_ISSUER_AND_SERIAL);
    }
    eval 'sub DECLARE_PKCS12_STACK_OF {
        my($type) = @_;
	    eval q();
    }' unless defined(&DECLARE_PKCS12_STACK_OF);
    eval 'sub IMPLEMENT_PKCS12_STACK_OF {
        my($type) = @_;
	    eval q();
    }' unless defined(&IMPLEMENT_PKCS12_STACK_OF);
}
1;
