mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/zlib/extconf.rb: detect z_crc_t type which will be defined
since zlib-1.2.7. * ext/zlib/zlib.c (rb_zlib_crc_table): use z_crc_t if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3893159530
commit
ce007c7c86
3 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Mon Apr 30 20:10:04 2012 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/zlib/extconf.rb: detect z_crc_t type which will be defined
|
||||
since zlib-1.2.7.
|
||||
|
||||
* ext/zlib/zlib.c (rb_zlib_crc_table): use z_crc_t if available.
|
||||
|
||||
Mon Apr 30 09:02:15 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
|
||||
|
||||
* ext/openssl/lib/openssl/ssl.rb: add hostname to "hostname does not
|
||||
|
|
|
@ -58,6 +58,7 @@ if %w'z libz zlib1 zlib zdll'.find {|z| have_library(z, 'deflateReset')} and
|
|||
|
||||
have_func('crc32_combine', 'zlib.h')
|
||||
have_func('adler32_combine', 'zlib.h')
|
||||
have_type('z_crc_t', 'zlib.h')
|
||||
|
||||
create_makefile('zlib')
|
||||
|
||||
|
|
|
@ -505,7 +505,11 @@ rb_zlib_crc32_combine(VALUE klass, VALUE crc1, VALUE crc2, VALUE len2)
|
|||
static VALUE
|
||||
rb_zlib_crc_table(VALUE obj)
|
||||
{
|
||||
const unsigned long *crctbl;
|
||||
#if !defined(HAVE_TYPE_Z_CRC_T)
|
||||
/* z_crc_t is defined since zlib-1.2.7. */
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
const z_crc_t *crctbl;
|
||||
VALUE dst;
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Reference in a new issue