zlib 3.0.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41b7725d22718acab4587061657664b5bc968f2bf1c49ce138da93d74bcab5b6
4
- data.tar.gz: afcafcf39db41825d341a3b8ae6ae8430c111eff53ba0498054b0c6eb1be3a21
3
+ metadata.gz: 7624f93a6b0776160dfd770df3287b57fa23e5844c15f036423feef6e3bd63ad
4
+ data.tar.gz: d7d82956712f9408ad0734246f0e3a16ecdba892fa7228ba4e96ab2288e50602
5
5
  SHA512:
6
- metadata.gz: 4b7db251e4e66d850419c1f943ca33e4de1239a69230d3b8674ae4c3b4f32ecc72525f928407719601be73dfcbd9ee2162dcfe89c73883b979e7b15a6c9e30bf
7
- data.tar.gz: ab12bdb64f407df968bbf8da42a68c361aa00a151d261ad3557a0a4ca38807184e783bf0c10f79fb0ecc4a1cce7d896e63244f21949824db4d2d19ab9e231196
6
+ metadata.gz: 386968de72d272c978ab1d8be50eb27de3966c3f361d1b974fbec121836b7226eb92ad5c9b46acef8a68aa798232cb151693b29e4ac20decca2968102cfa0db7
7
+ data.tar.gz: a1562b664638ffc2fd3428d9fb4fda6d5011336d3b3b34afa05d4b8a6ba60f98a46790c682a0fab0992892704ac65ffa308c4d13622c7cbbdca12559a23f59d8
@@ -4,10 +4,10 @@ Redistribution and use in source and binary forms, with or without
4
4
  modification, are permitted provided that the following conditions
5
5
  are met:
6
6
  1. Redistributions of source code must retain the above copyright
7
- notice, this list of conditions and the following disclaimer.
7
+ notice, this list of conditions and the following disclaimer.
8
8
  2. Redistributions in binary form must reproduce the above copyright
9
- notice, this list of conditions and the following disclaimer in the
10
- documentation and/or other materials provided with the distribution.
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
11
 
12
12
  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
13
  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
data/COPYING ADDED
@@ -0,0 +1,56 @@
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the
3
+ 2-clause BSDL (see the file BSDL), or the conditions below:
4
+
5
+ 1. You may make and give away verbatim copies of the source form of the
6
+ software without restriction, provided that you duplicate all of the
7
+ original copyright notices and associated disclaimers.
8
+
9
+ 2. You may modify your copy of the software in any way, provided that
10
+ you do at least ONE of the following:
11
+
12
+ a. place your modifications in the Public Domain or otherwise
13
+ make them Freely Available, such as by posting said
14
+ modifications to Usenet or an equivalent medium, or by allowing
15
+ the author to include your modifications in the software.
16
+
17
+ b. use the modified software only within your corporation or
18
+ organization.
19
+
20
+ c. give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
+
23
+ d. make other distribution arrangements with the author.
24
+
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
+
28
+ a. distribute the binaries and library files of the software,
29
+ together with instructions (in the manual page or equivalent)
30
+ on where to get the original distribution.
31
+
32
+ b. accompany the distribution with the machine-readable source of
33
+ the software.
34
+
35
+ c. give non-standard binaries non-standard names, with
36
+ instructions on where to get the original software distribution.
37
+
38
+ d. make other distribution arrangements with the author.
39
+
40
+ 4. You may modify and include the part of the software into any other
41
+ software (possibly commercial). But some files in the distribution
42
+ are not written by the author, so that they are not under these terms.
43
+
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
46
+
47
+ 5. The scripts and library files supplied as input to or produced as
48
+ output from the software do not automatically fall under the
49
+ copyright of the software, but belong to whomever generated them,
50
+ and may be sold commercially, and may be aggregated with this
51
+ software.
52
+
53
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
+ PURPOSE.
data/ext/zlib/extconf.rb CHANGED
@@ -11,10 +11,9 @@ require 'rbconfig'
11
11
  dir_config 'zlib'
12
12
 
13
13
  libs = $libs
14
- if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')} and
15
- have_header('zlib.h') then
16
- have_zlib = true
17
- else
14
+ have_zlib = %w'z libz zlib1 zlib zdll zlibwapi'.any? {|z| have_library(z, 'deflateReset(NULL)', 'zlib.h')}
15
+
16
+ unless have_zlib
18
17
  $libs = libs
19
18
  unless File.directory?(zsrc = "#{$srcdir}/zlib")
20
19
  dirs = Dir.open($srcdir) {|z| z.grep(/\Azlib-\d+[.\d]*\z/) {|x|"#{$srcdir}/#{x}"}}
@@ -121,12 +120,18 @@ if have_zlib
121
120
  $defs << "-DHAVE_CRC32_COMBINE"
122
121
  $defs << "-DHAVE_ADLER32_COMBINE"
123
122
  $defs << "-DHAVE_TYPE_Z_CRC_T"
124
- $defs << "-DHAVE_TYPE_Z_SIZE_T"
123
+ $defs << "-DHAVE_CRC32_Z"
124
+ $defs << "-DHAVE_ADLER32_Z"
125
+ $defs << "-DHAVE_ZLIB_SIZE_T_FUNCS"
125
126
  else
126
127
  have_func('crc32_combine', 'zlib.h')
127
128
  have_func('adler32_combine', 'zlib.h')
128
129
  have_type('z_crc_t', 'zlib.h')
129
- have_type('z_size_t', 'zlib.h')
130
+ if (have_type('z_size_t', 'zlib.h') &&
131
+ have_func('crc32_z', 'zlib.h') &&
132
+ have_func('adler32_z', 'zlib.h'))
133
+ $defs << "-DHAVE_ZLIB_SIZE_T_FUNCS"
134
+ end
130
135
  end
131
136
 
132
137
  create_makefile('zlib') {|conf|
data/ext/zlib/zlib.c CHANGED
@@ -25,7 +25,7 @@
25
25
  # define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
26
26
  #endif
27
27
 
28
- #define RUBY_ZLIB_VERSION "3.0.0"
28
+ #define RUBY_ZLIB_VERSION "3.1.1"
29
29
 
30
30
  #ifndef RB_PASS_CALLED_KEYWORDS
31
31
  # define rb_class_new_instance_kw(argc, argv, klass, kw_splat) rb_class_new_instance(argc, argv, klass)
@@ -44,7 +44,7 @@
44
44
  #endif
45
45
  #endif
46
46
 
47
- #if defined(HAVE_TYPE_Z_SIZE_T)
47
+ #if defined(HAVE_ZLIB_SIZE_T_FUNCS)
48
48
  typedef uLong (*checksum_func)(uLong, const Bytef*, z_size_t);
49
49
  # define crc32 crc32_z
50
50
  # define adler32 adler32_z
@@ -388,7 +388,7 @@ rb_zlib_version(VALUE klass)
388
388
  # define mask32(x) (x)
389
389
  #endif
390
390
 
391
- #if SIZEOF_LONG > SIZEOF_INT && !defined(HAVE_TYPE_Z_SIZE_T)
391
+ #if SIZEOF_LONG > SIZEOF_INT && !defined(HAVE_ZLIB_SIZE_T_FUNCS)
392
392
  static uLong
393
393
  checksum_long(uLong (*func)(uLong, const Bytef*, uInt), uLong sum, const Bytef *ptr, long len)
394
394
  {
@@ -923,7 +923,7 @@ zstream_discard_input(struct zstream *z, long len)
923
923
  z->input = Qnil;
924
924
  }
925
925
  else {
926
- z->input = rb_str_substr(z->input, len,
926
+ z->input = rb_str_subseq(z->input, len,
927
927
  RSTRING_LEN(z->input) - len);
928
928
  }
929
929
  }
@@ -3500,6 +3500,9 @@ static VALUE
3500
3500
  rb_gzfile_eof_p(VALUE obj)
3501
3501
  {
3502
3502
  struct gzfile *gz = get_gzfile(obj);
3503
+ while (!ZSTREAM_IS_FINISHED(&gz->z) && ZSTREAM_BUF_FILLED(&gz->z) == 0) {
3504
+ gzfile_read_more(gz, Qnil);
3505
+ }
3503
3506
  return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
3504
3507
  }
3505
3508
 
data/zlib.gemspec CHANGED
@@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
22
22
  spec.homepage = "https://github.com/ruby/zlib"
23
23
  spec.licenses = ["Ruby", "BSD-2-Clause"]
24
24
 
25
- spec.files = ["LICENSE.txt", "README.md", "ext/zlib/extconf.rb", "ext/zlib/zlib.c", "zlib.gemspec"]
25
+ spec.files = ["COPYING", "BSDL", "README.md", "ext/zlib/extconf.rb", "ext/zlib/zlib.c", "zlib.gemspec"]
26
26
  spec.bindir = "exe"
27
27
  spec.executables = []
28
28
  spec.require_paths = ["lib"]
29
29
  spec.extensions = "ext/zlib/extconf.rb"
30
- spec.required_ruby_version = ">= 2.3.0"
30
+ spec.required_ruby_version = ">= 2.5.0"
31
31
  end
metadata CHANGED
@@ -1,26 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yukihiro Matsumoto
8
8
  - UENO Katsuhiro
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-12-05 00:00:00.000000000 Z
12
+ date: 2024-05-29 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Ruby interface for the zlib compression/decompression library
15
15
  email:
16
16
  - matz@ruby-lang.org
17
- -
17
+ -
18
18
  executables: []
19
19
  extensions:
20
20
  - ext/zlib/extconf.rb
21
21
  extra_rdoc_files: []
22
22
  files:
23
- - LICENSE.txt
23
+ - BSDL
24
+ - COPYING
24
25
  - README.md
25
26
  - ext/zlib/extconf.rb
26
27
  - ext/zlib/zlib.c
@@ -30,7 +31,7 @@ licenses:
30
31
  - Ruby
31
32
  - BSD-2-Clause
32
33
  metadata: {}
33
- post_install_message:
34
+ post_install_message:
34
35
  rdoc_options: []
35
36
  require_paths:
36
37
  - lib
@@ -38,15 +39,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
38
39
  requirements:
39
40
  - - ">="
40
41
  - !ruby/object:Gem::Version
41
- version: 2.3.0
42
+ version: 2.5.0
42
43
  required_rubygems_version: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - ">="
45
46
  - !ruby/object:Gem::Version
46
47
  version: '0'
47
48
  requirements: []
48
- rubygems_version: 3.4.0.dev
49
- signing_key:
49
+ rubygems_version: 3.5.9
50
+ signing_key:
50
51
  specification_version: 4
51
52
  summary: Ruby interface for the zlib compression/decompression library
52
53
  test_files: []