summaryrefslogtreecommitdiff
path: root/ext/zlib/extconf.rb
AgeCommit message (Collapse)Author
2023-10-26[ruby/zlib] Check for z_size_t along with {crc,adler}32_z inKJ Tsanaktsidis
extconf.rb (https://github.com/ruby/zlib/pull/69) The android NDK (android-ndk-r21e) does not have crc32_z, adler32_z, nor z_size_t in its zlib.h header file. However, it _does_ have the crc32_z and adler32_z symbols in the libz.a static library! mkmf performs two tests for have_func: * It sees if a program that includes the header and takes the address of the symbol can compile * It sees if a program that defines the symbol as `extern void sym_name()` and calls it can be linked If either test works, it considers the function present. The android-ndk-r21e is passing the second test but not the first for crc32_z/adler32_z. So, we define HAVE_ZLIB_SIZE_T_FUNCS, but then can't actually compile the extension (since the prototypes aren't in the header file). We can keep this working how it was working before by _also_ checking for `have_type("z_size_t", "zlib.h")`. The have_type check _only_ looks in the header file for the type; if a program including the header file and using the type can't compile, the type is considered absent regardless of what might be in libz.a. https://github.com/ruby/zlib/commit/3b9fe962d8
2023-10-26[ruby/zlib] Fix misdetection of {crc32,alder32}_z in cloudflare zlib forkKJ Tsanaktsidis
We use the Cloudflare fork of zlib (https://github.com/cloudflare/zlib), which we find gives improved performance on AWS Graviton ARM instances. That fork does not define crc32_z and alder32_z functions. Until two days ago, Ruby's zlib gem worked fine, because cloudflare zlib _also_ did not define z_size_t, which meant Ruby did not try and use these functions. Since https://github.com/cloudflare/zlib/commit/a3ba99596d6271224d39ef9d6853511f51821e05 however, cloudflare zlib _does_ define z_size_t (but NOT crc32_z or alder32_z). The zlib gem would try and use these nonexistant functions and not compile. This patch fixes it by actually specifically detecting the functions that the gem wants to call, rather than just the presence of the z_size_t type. https://github.com/ruby/zlib/commit/c96e8b9a57
2023-01-09[ruby/zlib] Check for functions with arguments and the headerNobuyoshi Nakada
With arguments, mkmf skips compilation check for the function as RHS. https://github.com/ruby/zlib/commit/9ed9d6d36e
2022-04-02[ruby/zlib] Use `z_size_t` version functionsNobuyoshi Nakada
https://github.com/ruby/zlib/commit/1ce6625fff
2021-07-06Found library is not usable if the header is not foundNobuyoshi Nakada
2021-07-03Fix linking bundled zlibNobuyoshi Nakada
* Prefix "./" to the import library name to expanded when static linking exts. * Copy zlib shared library to the top build directory.
2020-11-24zlib: patches for mswin64Nobuyoshi Nakada
* cast to suppress C4267 warnings; no possible loss of data as following the comparison. * shift base address to suppress LNK4281; although /DYNAMICBASE is preferable, not sure from which version of link.exe supports it.
2017-03-03zlib for mingwnobu
* ext/zlib/extconf.rb: fix building zlib for mingw, and for cross-compiling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01zlib: clean zlibnobu
* ext/zlib/extconf.rb: clean zlib libraries generated in the place. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07{ext,test}/zlib: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24install extra librariesnobu
* ext/extmk.rb (extract_makefile, extmake, configuration): store extra libraries to be installed. * tool/rbinstall.rb (ext-arch): install extra libraries. * ext/zlib/extconf.rb: install zlib if built. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23zlib: no checks [ci skip]nobu
* ext/zlib/extconf.rb: no feature checks when building zlib from the source, assume it is recent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23zlib: fix directory [ci skip]nobu
* ext/zlib/extconf.rb: fix directory to install zlib library. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-22zlib: try zlib sourcenobu
* ext/zlib/extconf.rb: try building zlib from the source if exists. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18* ChangeLog: Good-bye OS/2.kosaki
* common.mk: ditto. * configure.in: ditto. * dln_find.c: ditto. * ext/Setup.emx: ditto. * ext/extmk.rb: ditto. * ext/socket/extconf.rb: ditto. * ext/zlib/extconf.rb: ditto. * file.c: ditto. * include/ruby/defines.h: ditto. * io.c: ditto. * lib/mkmf.rb: ditto. * missing/os2.c: ditto. * process.c: ditto. * ruby.c: ditto. * NEWS: announce OS/2 is no longer supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06Recognize zlibwapi as linking libraryluislavena
* ext/zlib/extconf.rb: Recognize zlibwapi as linking library. Patch by Daniel Berger. [ruby-core:44979] [Feature #6421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10* ext/zlib/zlib.c: Revert r36349. Added streaming support to inflatedrbrain
processing. rb_block_given_p() is not callable without the GVL. * ext/zlib/extconf.rb: ditto * NEWS: ditto * test/zlib/test_zlib.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10* ext/zlib/zlib.c: Added streaming support to inflate processing.drbrain
This allows zlib streams to be processed without huge memory growth. [Feature #6612] * NEWS: ditto * ext/zlib/zlib.c (zstream_expand_buffer): Uses rb_yield when a block is given for streaming support. Refactored to use zstream_expand_buffer_into to remove duplicate code. * ext/zlib/zlib.c (zstream_expand_buffer_protect): Added wrapper function to pass jump state back through GVL-free section to allow zstream clean-up before terminating the ruby call. * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Acquire GVL to yield processed chunk of output stream. * ext/zlib/zlib.c (zstream_detach_buffer): When a block is given, returns Qnil mid-stream and yields the output buffer at the end of the stream. * ext/zlib/extconf.rb: Update INCFLAGS to find internal.h for rb_thread_call_with_gvl * test/zlib/test_zlib.rb: Updated tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18* ext/openssl/extconf.rb: Use Logging::message instead of message.kosaki
* ext/zlib/extconf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18* ext/zlib/extconf.rb: Use an exception instaed of bare puts.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30* ext/zlib/extconf.rb: detect z_crc_t type which will be definedakr
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
2010-01-19* ext/zlib/{extconf.rb, zlib.c): crc32_combine and adler32_combine isusa
supported on Zlib 1.2.2.1, so check them for old zlib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-29* ext/zlib/extconf.rb: search zlib1, and regard mswin32 later than VC6nobu
as WIN32. [ruby-core:16984] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-25* ruby.h, lib/mkmf.rb (create_header): clear command line options fornobu
macros moved to extconf.h. * ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and EXTSTATIC permanent. * ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS. * {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added $(INCFLAGS). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-09* ext/zlib/extconf.rb: zlib compiled DLL version 1.2.3 distributed byocean
http://www.zlib.net/ has zdll.lib. [ruby-dev:28209] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-22* ext/zlib/extconf.rb: bccwin32 is win32 too.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-28Import Ruby/zlib from rough.katsu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e