summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-09 14:01:53 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-09 14:01:53 +0000
commit807c13cc61a04f5393dfa1a4a31e468d00678e84 (patch)
tree455ee957c0adc2500ad80cd17282dc8191acad2b
parent390bbfed581a17fac72a9e029624fd667d81a0c8 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--ext/zlib/extconf.rb1
-rw-r--r--ext/zlib/zlib.c6
-rw-r--r--version.h2
4 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 630358fa49..aff89ab22e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun Sep 9 23:01:43 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.
+
Sun Sep 9 02:44:21 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* ext/zlib/extconf.rb: Use an exception instaed of bare puts.
diff --git a/ext/zlib/extconf.rb b/ext/zlib/extconf.rb
index da91046fdb..d710226f9c 100644
--- a/ext/zlib/extconf.rb
+++ b/ext/zlib/extconf.rb
@@ -57,6 +57,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')
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 17f132b1b1..d5909d60c0 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -464,7 +464,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;
diff --git a/version.h b/version.h
index fc18a05603..dbb7839a89 100644
--- a/version.h
+++ b/version.h
@@ -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