require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&OPENSSL_DOING_MAKEDEPEND)) {
    unless(defined(&OPENSSL_NO_KRB5)) {
	eval 'sub OPENSSL_NO_KRB5 () {1;}' unless defined(&OPENSSL_NO_KRB5);
    }
}
if(defined(&OPENSSL_ALGORITHM_DEFINES)) {
    if(defined( &OPENSSL_NO_KRB5)  && !defined( &NO_KRB5)) {
	eval 'sub NO_KRB5 () {1;}' unless defined(&NO_KRB5);
    }
}
undef(&I386_ONLY) if defined(&I386_ONLY);
if(!(defined( &VMS) || defined( &__VMS)) ) {
    if(defined( &HEADER_CRYPTLIB_H)  && !defined( &OPENSSLDIR)) {
	eval 'sub OPENSSLDIR () {"/etc/ssl";}' unless defined(&OPENSSLDIR);
    }
}
undef(&OPENSSL_UNISTD) if defined(&OPENSSL_UNISTD);
unless(defined(&OPENSSL_UNISTD)) {
    sub OPENSSL_UNISTD () {	< ($unistd->{h})>;}
}
undef(&OPENSSL_EXPORT_VAR_AS_FUNCTION) if defined(&OPENSSL_EXPORT_VAR_AS_FUNCTION);
if(defined( &HEADER_IDEA_H)  && !defined( &IDEA_INT)) {
    eval 'sub IDEA_INT () {\'unsigned int\';}' unless defined(&IDEA_INT);
}
if(defined( &HEADER_MD2_H)  && !defined( &MD2_INT)) {
    eval 'sub MD2_INT () {\'unsigned int\';}' unless defined(&MD2_INT);
}
if(defined( &HEADER_RC2_H)  && !defined( &RC2_INT)) {
    eval 'sub RC2_INT () {\'unsigned int\';}' unless defined(&RC2_INT);
}
if(defined( &HEADER_RC4_H)) {
    if(!defined( &RC4_INT)) {
	eval 'sub RC4_INT () {\'unsigned int\';}' unless defined(&RC4_INT);
    }
    if(!defined( &RC4_CHUNK)) {
	undef(&RC4_CHUNK) if defined(&RC4_CHUNK);
    }
}
if((defined( &HEADER_DES_H) || defined( &HEADER_DES_OLD_H))  && !defined( &DES_LONG)) {
    unless(defined(&DES_LONG)) {
	eval 'sub DES_LONG () {\'unsigned int\';}' unless defined(&DES_LONG);
    }
}
if(defined( &HEADER_BN_H)  && !defined( &CONFIG_HEADER_BN_H)) {
    eval 'sub CONFIG_HEADER_BN_H () {1;}' unless defined(&CONFIG_HEADER_BN_H);
    undef(&BN_LLONG) if defined(&BN_LLONG);
    eval 'sub SIXTY_FOUR_BIT_LONG () {1;}' unless defined(&SIXTY_FOUR_BIT_LONG);
    undef(&SIXTY_FOUR_BIT) if defined(&SIXTY_FOUR_BIT);
    undef(&THIRTY_TWO_BIT) if defined(&THIRTY_TWO_BIT);
    undef(&SIXTEEN_BIT) if defined(&SIXTEEN_BIT);
    undef(&EIGHT_BIT) if defined(&EIGHT_BIT);
}
if(defined( &HEADER_RC4_LOCL_H)  && !defined( &CONFIG_HEADER_RC4_LOCL_H)) {
    eval 'sub CONFIG_HEADER_RC4_LOCL_H () {1;}' unless defined(&CONFIG_HEADER_RC4_LOCL_H);
    undef(&RC4_INDEX) if defined(&RC4_INDEX);
}
if(defined( &HEADER_BF_LOCL_H)  && !defined( &CONFIG_HEADER_BF_LOCL_H)) {
    eval 'sub CONFIG_HEADER_BF_LOCL_H () {1;}' unless defined(&CONFIG_HEADER_BF_LOCL_H);
    undef(&BF_PTR) if defined(&BF_PTR);
}
if(defined( &HEADER_DES_LOCL_H)  && !defined( &CONFIG_HEADER_DES_LOCL_H)) {
    eval 'sub CONFIG_HEADER_DES_LOCL_H () {1;}' unless defined(&CONFIG_HEADER_DES_LOCL_H);
    unless(defined(&DES_DEFAULT_OPTIONS)) {
	unless(defined(&DES_PTR)) {
	    eval 'sub DES_PTR () {1;}' unless defined(&DES_PTR);
	}
	unless(defined(&DES_RISC1)) {
	    undef(&DES_RISC1) if defined(&DES_RISC1);
	}
	unless(defined(&DES_RISC2)) {
	    eval 'sub DES_RISC2 () {1;}' unless defined(&DES_RISC2);
	}
	if(defined( &DES_RISC1)  && defined( &DES_RISC2)) {
	}
	unless(defined(&DES_UNROLL)) {
	    undef(&DES_UNROLL) if defined(&DES_UNROLL);
	}
	if(!defined( &DES_PTR)  && !defined( &DES_RISC1)  && !defined( &DES_RISC2)  && !defined( &DES_UNROLL)) {
	    if(defined( (defined(&sun) ? &sun : 0) ) ) {
		eval 'sub DES_PTR () {1;}' unless defined(&DES_PTR);
		eval 'sub DES_RISC1 () {1;}' unless defined(&DES_RISC1);
		eval 'sub DES_UNROLL () {1;}' unless defined(&DES_UNROLL);
	    }
 elsif(defined( (defined(&__ultrix) ? &__ultrix : 0) ) ) {
		eval 'sub DES_PTR () {1;}' unless defined(&DES_PTR);
		eval 'sub DES_RISC2 () {1;}' unless defined(&DES_RISC2);
		eval 'sub DES_UNROLL () {1;}' unless defined(&DES_UNROLL);
	    }
 elsif(defined( (defined(&__osf1__) ? &__osf1__ : 0) ) ) {
		eval 'sub DES_PTR () {1;}' unless defined(&DES_PTR);
		eval 'sub DES_RISC2 () {1;}' unless defined(&DES_RISC2);
	    }
 elsif(defined ( (defined(&_AIX) ? &_AIX : 0) ) ) {
	    }
 elsif(defined( (defined(&__hpux) ? &__hpux : 0) ) ) {
	    }
 elsif(defined( (defined(&__aux) ? &__aux : 0) ) ) {
	    }
 elsif(defined( (defined(&__dgux) ? &__dgux : 0) ) ) {
		eval 'sub DES_UNROLL () {1;}' unless defined(&DES_UNROLL);
	    }
 elsif(defined( (defined(&__sgi) ? &__sgi : 0) ) ) {
		eval 'sub DES_PTR () {1;}' unless defined(&DES_PTR);
		eval 'sub DES_RISC2 () {1;}' unless defined(&DES_RISC2);
		eval 'sub DES_UNROLL () {1;}' unless defined(&DES_UNROLL);
	    }
 elsif(defined( &i386) || defined( &__i386__) ) {
		eval 'sub DES_PTR () {1;}' unless defined(&DES_PTR);
		eval 'sub DES_RISC1 () {1;}' unless defined(&DES_RISC1);
		eval 'sub DES_UNROLL () {1;}' unless defined(&DES_UNROLL);
	    }
	}
    }
}
1;
