require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SHA1_H)) {
    eval 'sub _SHA1_H () {1;}' unless defined(&_SHA1_H);
    eval 'sub SHA1_BLOCK_LENGTH () {64;}' unless defined(&SHA1_BLOCK_LENGTH);
    eval 'sub SHA1_DIGEST_LENGTH () {20;}' unless defined(&SHA1_DIGEST_LENGTH);
    eval 'sub SHA1_DIGEST_STRING_LENGTH () {( &SHA1_DIGEST_LENGTH * 2+ 1);}' unless defined(&SHA1_DIGEST_STRING_LENGTH);
    require 'sys/cdefs.ph';
    eval 'sub HTONDIGEST {
        my($x) = @_;
	    eval q( &do { $x->[0] =  &htonl($x->[0]); $x->[1] =  &htonl($x->[1]); $x->[2] =  &htonl($x->[2]); $x->[3] =  &htonl($x->[3]); $x->[4] =  &htonl($x->[4]); }  &while (0));
    }' unless defined(&HTONDIGEST);
    eval 'sub NTOHDIGEST {
        my($x) = @_;
	    eval q( &do { $x->[0] =  &ntohl($x->[0]); $x->[1] =  &ntohl($x->[1]); $x->[2] =  &ntohl($x->[2]); $x->[3] =  &ntohl($x->[3]); $x->[4] =  &ntohl($x->[4]); }  &while (0));
    }' unless defined(&NTOHDIGEST);
}
1;
