require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&HEADER_DES_H)) {
    eval 'sub HEADER_DES_H () {1;}' unless defined(&HEADER_DES_H);
    if(defined(&OPENSSL_NO_DES)) {
	die("DES\ is\ disabled\.");
    }
    require 'openssl/opensslconf.ph';
    require 'openssl/e_os2.ph';
    if(defined(&OPENSSL_BUILD_SHLIBCRYPTO)) {
	undef(&OPENSSL_EXTERN) if defined(&OPENSSL_EXTERN);
	eval 'sub OPENSSL_EXTERN () { &OPENSSL_EXPORT;}' unless defined(&OPENSSL_EXTERN);
    }
    eval 'sub des_SPtrans () { &DES_SPtrans;}' unless defined(&des_SPtrans);
    if(defined(&__cplusplus)) {
    }
    unless(defined(&OPENSSL_DISABLE_OLD_DES_SUPPORT)) {
	unless(defined(&OPENSSL_ENABLE_OLD_DES_SUPPORT)) {
	    eval 'sub OPENSSL_ENABLE_OLD_DES_SUPPORT () {1;}' unless defined(&OPENSSL_ENABLE_OLD_DES_SUPPORT);
	}
    }
    if(defined(&OPENSSL_ENABLE_OLD_DES_SUPPORT)) {
	require 'openssl/des_old.ph';
    }
    eval 'sub DES_KEY_SZ () {($sizeof{ &DES_cblock});}' unless defined(&DES_KEY_SZ);
    eval 'sub DES_SCHEDULE_SZ () {($sizeof{ &DES_key_schedule});}' unless defined(&DES_SCHEDULE_SZ);
    eval 'sub DES_ENCRYPT () {1;}' unless defined(&DES_ENCRYPT);
    eval 'sub DES_DECRYPT () {0;}' unless defined(&DES_DECRYPT);
    eval 'sub DES_CBC_MODE () {0;}' unless defined(&DES_CBC_MODE);
    eval 'sub DES_PCBC_MODE () {1;}' unless defined(&DES_PCBC_MODE);
    eval 'sub DES_ecb2_encrypt {
        my($i,$o,$k1,$k2,$e) = @_;
	    eval q( &DES_ecb3_encrypt(($i),($o),($k1),($k2),($k1),($e)));
    }' unless defined(&DES_ecb2_encrypt);
    eval 'sub DES_ede2_cbc_encrypt {
        my($i,$o,$l,$k1,$k2,$iv,$e) = @_;
	    eval q( &DES_ede3_cbc_encrypt(($i),($o),($l),($k1),($k2),($k1),($iv),($e)));
    }' unless defined(&DES_ede2_cbc_encrypt);
    eval 'sub DES_ede2_cfb64_encrypt {
        my($i,$o,$l,$k1,$k2,$iv,$n,$e) = @_;
	    eval q( &DES_ede3_cfb64_encrypt(($i),($o),($l),($k1),($k2),($k1),($iv),($n),($e)));
    }' unless defined(&DES_ede2_cfb64_encrypt);
    eval 'sub DES_ede2_ofb64_encrypt {
        my($i,$o,$l,$k1,$k2,$iv,$n) = @_;
	    eval q( &DES_ede3_ofb64_encrypt(($i),($o),($l),($k1),($k2),($k1),($iv),($n)));
    }' unless defined(&DES_ede2_ofb64_encrypt);
    eval 'sub DES_check_key () { &OPENSSL_GLOBAL_REF( &DES_check_key);}' unless defined(&DES_check_key);
    eval 'sub DES_rw_mode () { &OPENSSL_GLOBAL_REF( &DES_rw_mode);}' unless defined(&DES_rw_mode);
    eval 'sub DES_fixup_key_parity () { &DES_set_odd_parity;}' unless defined(&DES_fixup_key_parity);
    if(defined(&__cplusplus)) {
    }
}
1;
