ruby-changes:24887
From: naruse <ko1@a...>
Date: Sun, 9 Sep 2012 23:02:10 +0900 (JST)
Subject: [ruby-changes:24887] naruse:r36939 (ruby_1_9_3): merge revision(s) 35496:
naruse 2012-09-09 23:01:53 +0900 (Sun, 09 Sep 2012) New Revision: 36939 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36939 Log: merge revision(s) 35496: * 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. Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/ext/zlib/extconf.rb branches/ruby_1_9_3/ext/zlib/zlib.c branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 36938) +++ ruby_1_9_3/ChangeLog (revision 36939) @@ -1,3 +1,10 @@ +Sun Sep 9 23:01:43 2012 Tanaka Akira <akr@f...> + + * 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. + Sun Sep 9 02:44:21 2012 KOSAKI Motohiro <kosaki.motohiro@g...> * ext/zlib/extconf.rb: Use an exception instaed of bare puts. Index: ruby_1_9_3/ext/zlib/zlib.c =================================================================== --- ruby_1_9_3/ext/zlib/zlib.c (revision 36938) +++ ruby_1_9_3/ext/zlib/zlib.c (revision 36939) @@ -464,7 +464,11 @@ 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; Index: ruby_1_9_3/ext/zlib/extconf.rb =================================================================== --- ruby_1_9_3/ext/zlib/extconf.rb (revision 36938) +++ ruby_1_9_3/ext/zlib/extconf.rb (revision 36939) @@ -57,6 +57,7 @@ have_func('crc32_combine', 'zlib.h') have_func('adler32_combine', 'zlib.h') + have_type('z_crc_t', 'zlib.h') create_makefile('zlib') Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 36938) +++ ruby_1_9_3/version.h (revision 36939) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 268 +#define RUBY_PATCHLEVEL 269 #define RUBY_RELEASE_DATE "2012-09-09" #define RUBY_RELEASE_YEAR 2012 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/