diff --git a/ChangeLog b/ChangeLog index 98c4d57225..f988ece3e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 11 14:56:10 2006 Yukihiro Matsumoto + + * ext/digest/sha1/sha1ossl.h: libssl 0.9.8c-3 defines no + SHA_BLOCK_LENGTH. + Wed Oct 11 14:03:31 2006 Akinori MUSHA * ext/digest/digest.c (rb_digest_base_reset, Init_digest): Add diff --git a/array.c b/array.c index a833e54157..e488b556d2 100644 --- a/array.c +++ b/array.c @@ -1227,6 +1227,24 @@ rb_ary_insert(int argc, VALUE *argv, VALUE ary) return ary; } +VALUE +each_internal(VALUE ary) +{ + long i; + + for (i=0; i array @@ -1245,12 +1263,9 @@ rb_ary_insert(int argc, VALUE *argv, VALUE ary) VALUE rb_ary_each(VALUE ary) { - long i; - RETURN_ENUMERATOR(ary, 0, 0); - for (i=0; i array @@ -1652,7 +1660,7 @@ rb_ary_sort_bang(VALUE ary) rb_ary_modify(ary); if (RARRAY_LEN(ary) > 1) { FL_SET(ary, ARY_TMPLOCK); /* prohibit modification during sort */ - rb_ensure(sort_internal, ary, sort_unlock, ary); + rb_ensure(sort_internal, ary, iter_unlock, ary); } return ary; } diff --git a/ext/digest/sha1/sha1ossl.h b/ext/digest/sha1/sha1ossl.h index c2e19d66e8..8a5b9cfc02 100644 --- a/ext/digest/sha1/sha1ossl.h +++ b/ext/digest/sha1/sha1ossl.h @@ -8,7 +8,11 @@ #define SHA1_CTX SHA_CTX +#ifdef SHA_BLOCK_LENGTH #define SHA1_BLOCK_LENGTH SHA_BLOCK_LENGTH +#else +#define SHA1_BLOCK_LENGTH SHA_CBLOCK +#endif #define SHA1_DIGEST_LENGTH SHA_DIGEST_LENGTH void SHA1_Finish(SHA1_CTX *ctx, char *buf);