require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&OPENSSL_SHA_H)) {
    eval 'sub OPENSSL_SHA_H () {1;}' unless defined(&OPENSSL_SHA_H);
    require 'openssl/macros.ph';
    unless(defined(&OPENSSL_NO_DEPRECATED_3_0)) {
	eval 'sub HEADER_SHA_H () {1;}' unless defined(&HEADER_SHA_H);
    }
    if(defined(&USE_LIBC_SHA2)) {
	require 'sha2.ph';
    }
    require 'openssl/e_os2.ph';
    require 'stddef.ph';
    if(defined(&__cplusplus)) {
    }
    eval 'sub SHA_DIGEST_LENGTH () {20;}' unless defined(&SHA_DIGEST_LENGTH);
    unless(defined(&OPENSSL_NO_DEPRECATED_3_0)) {
	eval 'sub SHA_LONG () {\'unsigned int\';}' unless defined(&SHA_LONG);
	eval 'sub SHA_LBLOCK () {16;}' unless defined(&SHA_LBLOCK);
	eval 'sub SHA_CBLOCK () {( &SHA_LBLOCK*4);}' unless defined(&SHA_CBLOCK);
	eval 'sub SHA_LAST_BLOCK () {( &SHA_CBLOCK-8);}' unless defined(&SHA_LAST_BLOCK);
    }
    unless(defined(&OPENSSL_NO_DEPRECATED_3_0)) {
	eval 'sub SHA256_CBLOCK () {( &SHA_LBLOCK * 4);}' unless defined(&SHA256_CBLOCK);
    }
    eval 'sub SHA224_DIGEST_LENGTH () {28;}' unless defined(&SHA224_DIGEST_LENGTH);
    eval 'sub SHA256_DIGEST_LENGTH () {32;}' unless defined(&SHA256_DIGEST_LENGTH);
    eval 'sub SHA384_DIGEST_LENGTH () {48;}' unless defined(&SHA384_DIGEST_LENGTH);
    eval 'sub SHA512_DIGEST_LENGTH () {64;}' unless defined(&SHA512_DIGEST_LENGTH);
    unless(defined(&OPENSSL_NO_DEPRECATED_3_0)) {
	eval 'sub SHA512_CBLOCK () {( &SHA_LBLOCK * 8);}' unless defined(&SHA512_CBLOCK);
	if((defined(&_WIN32) || defined(&_WIN64))  && !defined(&__MINGW32__)) {
	    eval 'sub SHA_LONG64 () {\'unsigned __int64\';}' unless defined(&SHA_LONG64);
	}
 elsif(defined(&__arch64__)) {
	    eval 'sub SHA_LONG64 () {\'unsigned long\';}' unless defined(&SHA_LONG64);
	} else {
	    eval 'sub SHA_LONG64 () {\'unsigned long long\';}' unless defined(&SHA_LONG64);
	}
    }
    if(defined(&__cplusplus)) {
    }
}
1;
