zstdlib 0.7.0-x64-mingw32 → 0.10.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +20 -0
  3. data/README.md +7 -1
  4. data/Rakefile +38 -8
  5. data/ext/{zstdlib → zstdlib_c}/extconf.rb +11 -6
  6. data/ext/{zstdlib → zstdlib_c}/ruby/zlib-2.2/zstdlib.c +2 -2
  7. data/ext/{zstdlib → zstdlib_c}/ruby/zlib-2.3/zstdlib.c +2 -2
  8. data/ext/{zstdlib → zstdlib_c}/ruby/zlib-2.4/zstdlib.c +2 -2
  9. data/ext/{zstdlib → zstdlib_c}/ruby/zlib-2.5/zstdlib.c +2 -2
  10. data/ext/{zstdlib → zstdlib_c}/ruby/zlib-2.6/zstdlib.c +2 -2
  11. data/ext/{zstdlib → zstdlib_c}/ruby/zlib-2.7/zstdlib.c +2 -2
  12. data/ext/zstdlib_c/ruby/zlib-3.0/zstdlib.c +4994 -0
  13. data/ext/zstdlib_c/ruby/zlib-3.1/zstdlib.c +5076 -0
  14. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/adler32.c +0 -0
  15. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/compress.c +0 -0
  16. data/ext/zstdlib_c/zlib-1.2.12/crc32.c +1116 -0
  17. data/ext/zstdlib_c/zlib-1.2.12/crc32.h +9446 -0
  18. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/deflate.c +78 -30
  19. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/deflate.h +12 -15
  20. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/gzclose.c +0 -0
  21. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/gzguts.h +3 -2
  22. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/gzlib.c +5 -3
  23. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/gzread.c +5 -7
  24. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/gzwrite.c +25 -13
  25. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/infback.c +2 -1
  26. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/inffast.c +14 -14
  27. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/inffast.h +0 -0
  28. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/inffixed.h +0 -0
  29. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/inflate.c +39 -8
  30. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/inflate.h +3 -2
  31. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/inftrees.c +3 -3
  32. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/inftrees.h +0 -0
  33. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/trees.c +27 -48
  34. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/trees.h +0 -0
  35. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/uncompr.c +0 -0
  36. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/zconf.h +0 -0
  37. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/zlib.h +123 -100
  38. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/zutil.c +2 -2
  39. data/ext/{zstdlib/zlib-1.2.11 → zstdlib_c/zlib-1.2.12}/zutil.h +12 -9
  40. data/ext/{zstdlib → zstdlib_c}/zlib.mk +0 -0
  41. data/ext/{zstdlib → zstdlib_c}/zlibwrapper/zlibwrapper.c +1 -5
  42. data/ext/{zstdlib → zstdlib_c}/zlibwrapper.mk +0 -0
  43. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/bitstream.h +46 -22
  44. data/ext/zstdlib_c/zstd-1.5.2/lib/common/compiler.h +335 -0
  45. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/cpu.h +1 -3
  46. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/debug.c +1 -1
  47. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/debug.h +12 -19
  48. data/ext/zstdlib_c/zstd-1.5.2/lib/common/entropy_common.c +368 -0
  49. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/error_private.c +2 -1
  50. data/ext/zstdlib_c/zstd-1.5.2/lib/common/error_private.h +159 -0
  51. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/fse.h +41 -12
  52. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/fse_decompress.c +139 -22
  53. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/huf.h +47 -23
  54. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/mem.h +87 -98
  55. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/pool.c +34 -23
  56. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/pool.h +4 -4
  57. data/ext/zstdlib_c/zstd-1.5.2/lib/common/portability_macros.h +137 -0
  58. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/threading.c +6 -5
  59. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/threading.h +0 -0
  60. data/ext/zstdlib_c/zstd-1.5.2/lib/common/xxhash.c +24 -0
  61. data/ext/zstdlib_c/zstd-1.5.2/lib/common/xxhash.h +5686 -0
  62. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/zstd_common.c +10 -10
  63. data/ext/zstdlib_c/zstd-1.5.2/lib/common/zstd_deps.h +111 -0
  64. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/common/zstd_internal.h +191 -145
  65. data/ext/zstdlib_c/zstd-1.5.2/lib/common/zstd_trace.h +163 -0
  66. data/ext/zstdlib_c/zstd-1.5.2/lib/compress/clevels.h +134 -0
  67. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/fse_compress.c +89 -46
  68. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/hist.c +27 -29
  69. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/hist.h +2 -2
  70. data/ext/zstdlib_c/zstd-1.5.2/lib/compress/huf_compress.c +1370 -0
  71. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_compress.c +2917 -868
  72. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_compress_internal.h +458 -125
  73. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_compress_literals.c +12 -11
  74. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_compress_literals.h +4 -2
  75. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_compress_sequences.c +41 -18
  76. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_compress_sequences.h +1 -1
  77. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_compress_superblock.c +26 -298
  78. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_compress_superblock.h +1 -1
  79. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_cwksp.h +234 -83
  80. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_double_fast.c +313 -138
  81. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_double_fast.h +1 -1
  82. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_fast.c +329 -150
  83. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_fast.h +1 -1
  84. data/ext/zstdlib_c/zstd-1.5.2/lib/compress/zstd_lazy.c +2104 -0
  85. data/ext/zstdlib_c/zstd-1.5.2/lib/compress/zstd_lazy.h +125 -0
  86. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_ldm.c +321 -216
  87. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_ldm.h +9 -2
  88. data/ext/zstdlib_c/zstd-1.5.2/lib/compress/zstd_ldm_geartab.h +106 -0
  89. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_opt.c +412 -166
  90. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstd_opt.h +1 -1
  91. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/compress/zstdmt_compress.c +169 -453
  92. data/ext/zstdlib_c/zstd-1.5.2/lib/compress/zstdmt_compress.h +113 -0
  93. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/decompress/huf_decompress.c +1044 -403
  94. data/ext/zstdlib_c/zstd-1.5.2/lib/decompress/huf_decompress_amd64.S +585 -0
  95. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/decompress/zstd_ddict.c +9 -9
  96. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/decompress/zstd_ddict.h +2 -2
  97. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/decompress/zstd_decompress.c +450 -105
  98. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/decompress/zstd_decompress_block.c +913 -273
  99. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/decompress/zstd_decompress_block.h +14 -5
  100. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/decompress/zstd_decompress_internal.h +59 -12
  101. data/ext/zstdlib_c/zstd-1.5.2/lib/zdict.h +452 -0
  102. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/lib/zstd.h +699 -214
  103. data/ext/{zstdlib/zstd-1.4.5/lib/common → zstdlib_c/zstd-1.5.2/lib}/zstd_errors.h +2 -1
  104. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/zlibWrapper/gzclose.c +0 -0
  105. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/zlibWrapper/gzcompatibility.h +1 -1
  106. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/zlibWrapper/gzguts.h +0 -0
  107. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/zlibWrapper/gzlib.c +0 -0
  108. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/zlibWrapper/gzread.c +0 -0
  109. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/zlibWrapper/gzwrite.c +0 -0
  110. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/zlibWrapper/zstd_zlibwrapper.c +133 -44
  111. data/ext/{zstdlib/zstd-1.4.5 → zstdlib_c/zstd-1.5.2}/zlibWrapper/zstd_zlibwrapper.h +1 -1
  112. data/ext/zstdlib_c/zstd.mk +15 -0
  113. data/lib/2.4/zstdlib_c.so +0 -0
  114. data/lib/2.5/zstdlib_c.so +0 -0
  115. data/lib/2.6/zstdlib_c.so +0 -0
  116. data/lib/2.7/zstdlib_c.so +0 -0
  117. data/lib/3.0/zstdlib_c.so +0 -0
  118. data/lib/zstdlib.rb +2 -2
  119. metadata +124 -116
  120. data/ext/zstdlib/zlib-1.2.11/crc32.c +0 -442
  121. data/ext/zstdlib/zlib-1.2.11/crc32.h +0 -441
  122. data/ext/zstdlib/zstd-1.4.5/lib/common/compiler.h +0 -175
  123. data/ext/zstdlib/zstd-1.4.5/lib/common/entropy_common.c +0 -216
  124. data/ext/zstdlib/zstd-1.4.5/lib/common/error_private.h +0 -80
  125. data/ext/zstdlib/zstd-1.4.5/lib/common/xxhash.c +0 -864
  126. data/ext/zstdlib/zstd-1.4.5/lib/common/xxhash.h +0 -285
  127. data/ext/zstdlib/zstd-1.4.5/lib/compress/huf_compress.c +0 -798
  128. data/ext/zstdlib/zstd-1.4.5/lib/compress/zstd_lazy.c +0 -1138
  129. data/ext/zstdlib/zstd-1.4.5/lib/compress/zstd_lazy.h +0 -67
  130. data/ext/zstdlib/zstd-1.4.5/lib/compress/zstdmt_compress.h +0 -192
  131. data/ext/zstdlib/zstd.mk +0 -14
  132. data/lib/2.2/zstdlib.so +0 -0
  133. data/lib/2.3/zstdlib.so +0 -0
  134. data/lib/2.4/zstdlib.so +0 -0
  135. data/lib/2.5/zstdlib.so +0 -0
  136. data/lib/2.6/zstdlib.so +0 -0
  137. data/lib/2.7/zstdlib.so +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea27531a060c98599bdd55864c380a162d85021bf428f73f95a0fc830deb817b
4
- data.tar.gz: 7a718b7c07b6426b1fdb9e376f10bc5232bb94c16efacf8724fc614546b2cf37
3
+ metadata.gz: ff877eaf2d8aa377f6c25465fda2f05a5acc60015a7dd2291fdd05b2fc06fac2
4
+ data.tar.gz: e5599274ba287fdeea430d7cc438a8e14838251e1ca5d94e6ffcb7e79bbd5b95
5
5
  SHA512:
6
- metadata.gz: 10e400335c42faf82fa4efdf1e935a40581e94d5502c76bf537e050ef3054fd76a1d3192d08f9dc27c7f29b60892ad9ba48658fa14519994ab7f6c17b4fbba68
7
- data.tar.gz: ed40d83d70a1603a84db1af9c36072ad20a4e39f9ef675cba0f4f605e8ee6592e9b697617d1a9f0e8ffd3f39e6634cac1587b7ae3d4f70cb8c455294d66125dc
6
+ metadata.gz: ebc99181561c8217182cfd7b30ebbdf01f3099790cd4e893ad812817ed93166613d36333f5023eb8c536fb78e389bd8148e260ead25309752029e824af09d3c8
7
+ data.tar.gz: 40f98082a6e60a50243bf5da9676cacf7b06f5916c4514d87f3a285f9297370fa873894b1b87d08ceadf405037e7da04f5f93be7b3e09aad5ec2bf6345d59bb0
data/CHANGES.md CHANGED
@@ -1,3 +1,23 @@
1
+ # 0.10.0
2
+
3
+ Updated Zlib to `1.2.12`
4
+
5
+
6
+ # 0.9.0
7
+
8
+ Updated Zstd to `1.5.2`
9
+
10
+ Added support for MRI Ruby versions `3.0-3.1`
11
+
12
+ Upgraded rake-compiler-dock to `1.2.0`
13
+
14
+ Implemented deployment of system-specific compiled gems for for x32/x64 Windows and x64/ARM64 MacOS platforms
15
+
16
+ # 0.8.0
17
+
18
+ Zstd version update to `1.5.0`
19
+
20
+
1
21
  # 0.7.0
2
22
 
3
23
  Zstd version update to `1.4.5`
data/README.md CHANGED
@@ -77,7 +77,13 @@ The `BEST_SPEED` constant remains unchanged.
77
77
 
78
78
  _zstdlib_ home page on [GitHub](https://github.com/okhlybov/zstdlib).
79
79
 
80
- Source code and Windows-specific multi-versioned binary gems can be obtained from [rubygems.org](https://rubygems.org/gems/zstdlib).
80
+ Source code and system-specific compiled gems can be obtained from [rubygems.org](https://rubygems.org/gems/zstdlib).
81
+
82
+ The system-specific gems are currently provided for x32/x64 Windows and x64/ARM64 MacOS platforms.
83
+
84
+ Note that these gems are built with the [rake-compiler-dock](https://github.com/rake-compiler/rake-compiler-dock)
85
+ infrastructure the minimum supported Ruby version is raised to 2.4.
86
+ All other installations including Linux will use the source gem and hence require the compilation step with locally installed development tools.
81
87
 
82
88
  ## Release history
83
89
 
data/Rakefile CHANGED
@@ -1,18 +1,49 @@
1
1
  require 'rake/testtask'
2
2
  require 'bundler/gem_tasks'
3
3
  require 'rake/extensiontask'
4
+ require 'rake_compiler_dock'
4
5
 
5
6
 
6
7
  spec = Gem::Specification.load('zstdlib.gemspec')
7
8
 
8
9
 
9
- Rake::ExtensionTask.new('zstdlib', spec) do |t|
10
+ platforms = %w[x86-mingw32 x64-mingw-ucrt x64-mingw32 x86_64-darwin arm64-darwin]
11
+
12
+
13
+ Rake::ExtensionTask.new('zstdlib_c', spec) do |t|
10
14
  t.cross_compile = true
11
- t.cross_platform = %w(x86-mingw32 x64-mingw32)
15
+ t.cross_platform = platforms
16
+ t.cross_config_options << '--enable-cross-build'
12
17
  end
13
18
 
14
19
 
15
- Gem::PackageTask.new(spec)
20
+ namespace "gem" do
21
+ platforms.each do |platform|
22
+ desc "build native gem for #{platform}"
23
+ # This runs on a host
24
+ task platform do
25
+ RakeCompilerDock.sh(<<~EOF, platform: platform)
26
+ gem install bundler --no-document &&
27
+ bundle &&
28
+ bundle exec rake gem:#{platform}:buildit
29
+ EOF
30
+ end
31
+
32
+ namespace platform do
33
+ # This runs in the rake-compiler-dock docker container
34
+ task "buildit" do
35
+ # Use Task#invoke because the pkg/*gem task is defined at runtime
36
+ Rake::Task["native:#{platform}"].invoke
37
+ Rake::Task["pkg/#{spec.full_name}-#{Gem::Platform.new(platform)}.gem"].invoke
38
+ end
39
+ end
40
+ end
41
+
42
+ #
43
+ desc "build native gem for all platforms"
44
+ multitask 'all' => platforms
45
+
46
+ end
16
47
 
17
48
 
18
49
  Rake::TestTask.new(:test) do |t|
@@ -22,8 +53,7 @@ Rake::TestTask.new(:test) do |t|
22
53
  end
23
54
 
24
55
 
25
- task :fat do
26
- require 'rake_compiler_dock'
27
- sh 'bundle package'
28
- RakeCompilerDock.sh 'gem install bundle && bundle --local && rake cross native gem'
29
- end
56
+ Gem::PackageTask.new(spec)
57
+
58
+
59
+ # Build system explained: https://github.com/flavorjones/ruby-c-extensions-explained/tree/main/precompiled
@@ -6,10 +6,15 @@ require 'fileutils'
6
6
  include RbConfig
7
7
  include FileUtils
8
8
 
9
- ZSTD_VERSION = '1.4.5'
10
- ZLIB_VERSION = '1.2.11'
9
+ ZSTD_VERSION = '1.5.2'
10
+ ZLIB_VERSION = '1.2.12'
11
+
11
12
  RB_VERSION = CONFIG['MAJOR']+'.'+CONFIG['MINOR']
12
- ZMOD_VERSION = RB_VERSION >= '2.3' ? '2.7' : RB_VERSION # Review requirements with every new zlib module release!
13
+ ZMOD_VERSION = RB_VERSION >= '2.3' ? '3.1' : RB_VERSION # Review requirements with every new zlib module release!
14
+
15
+ # For cross compiling
16
+ ENV['CC'] = RbConfig::CONFIG['CC']
17
+ ENV['LD'] = RbConfig::CONFIG['LD']
13
18
 
14
19
  root = File.dirname(__FILE__)
15
20
 
@@ -23,16 +28,16 @@ cp "#{zmod}/zstdlib.c", 'zstdlib.c'
23
28
  $srcs = ['zstdlib.c']
24
29
 
25
30
  $CFLAGS += ' -fomit-frame-pointer -ffast-math -O3'
26
- $CPPFLAGS += " -I#{zlib} -I#{zlibwrapper} -I#{zstd} -DZWRAP_USE_ZSTD=1 -DGZIP_SUPPORT=0"
31
+ $CPPFLAGS += " -I#{zlib} -I#{zlibwrapper} -I#{zstd} -DZWRAP_USE_ZSTD=1 -DGZIP_SUPPORT=1"
27
32
  $LDFLAGS += ' -s'
28
33
  $LOCAL_LIBS += ' libzlibwrapper.a libz.a libzstd.a'
29
34
 
30
- create_makefile('zstdlib')
35
+ create_makefile('zstdlib_c')
31
36
 
32
37
  File.open('Makefile', 'a') do |file|
33
38
  file << %~
34
39
 
35
- export CC AR CFLAGS CPPFLAGS
40
+ export CC LD AR CFLAGS CPPFLAGS
36
41
 
37
42
  $(DLLIB) : libz.a libzstd.a libzlibwrapper.a
38
43
 
@@ -293,7 +293,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
293
293
  * - Zstdlib::GzipFile::NoFooter
294
294
  *
295
295
  */
296
- void Init_zstdlib(void);
296
+ void Init_zstdlib_c(void);
297
297
 
298
298
  /*--------- Exceptions --------*/
299
299
 
@@ -4250,7 +4250,7 @@ rb_gzreader_readlines(int argc, VALUE *argv, VALUE obj)
4250
4250
  #endif /* GZIP_SUPPORT */
4251
4251
 
4252
4252
  void
4253
- Init_zstdlib(void)
4253
+ Init_zstdlib_c(void)
4254
4254
  {
4255
4255
  VALUE mZlib, cZStream, cDeflate, cInflate;
4256
4256
  #if GZIP_SUPPORT
@@ -293,7 +293,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
293
293
  * - Zstdlib::GzipFile::NoFooter
294
294
  *
295
295
  */
296
- void Init_zstdlib(void);
296
+ void Init_zstdlib_c(void);
297
297
 
298
298
  /*--------- Exceptions --------*/
299
299
 
@@ -4276,7 +4276,7 @@ rb_gzreader_external_encoding(VALUE self)
4276
4276
  #endif /* GZIP_SUPPORT */
4277
4277
 
4278
4278
  void
4279
- Init_zstdlib(void)
4279
+ Init_zstdlib_c(void)
4280
4280
  {
4281
4281
  VALUE mZlib, cZStream, cDeflate, cInflate;
4282
4282
  #if GZIP_SUPPORT
@@ -292,7 +292,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
292
292
  * - Zstdlib::GzipFile::NoFooter
293
293
  *
294
294
  */
295
- void Init_zstdlib(void);
295
+ void Init_zstdlib_c(void);
296
296
 
297
297
  /*--------- Exceptions --------*/
298
298
 
@@ -4428,7 +4428,7 @@ zlib_gunzip_run(VALUE arg)
4428
4428
  #endif /* GZIP_SUPPORT */
4429
4429
 
4430
4430
  void
4431
- Init_zstdlib(void)
4431
+ Init_zstdlib_c(void)
4432
4432
  {
4433
4433
  VALUE mZlib, cZStream, cDeflate, cInflate;
4434
4434
  #if GZIP_SUPPORT
@@ -292,7 +292,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
292
292
  * - Zstdlib::GzipFile::NoFooter
293
293
  *
294
294
  */
295
- void Init_zstdlib(void);
295
+ void Init_zstdlib_c(void);
296
296
 
297
297
  /*--------- Exceptions --------*/
298
298
 
@@ -4433,7 +4433,7 @@ zlib_gunzip_run(VALUE arg)
4433
4433
  #endif /* GZIP_SUPPORT */
4434
4434
 
4435
4435
  void
4436
- Init_zstdlib(void)
4436
+ Init_zstdlib_c(void)
4437
4437
  {
4438
4438
  VALUE mZlib, cZStream, cDeflate, cInflate;
4439
4439
  #if GZIP_SUPPORT
@@ -292,7 +292,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
292
292
  * - Zstdlib::GzipFile::NoFooter
293
293
  *
294
294
  */
295
- void Init_zstdlib(void);
295
+ void Init_zstdlib_c(void);
296
296
 
297
297
  /*--------- Exceptions --------*/
298
298
 
@@ -4474,7 +4474,7 @@ zlib_gunzip_run(VALUE arg)
4474
4474
  #endif /* GZIP_SUPPORT */
4475
4475
 
4476
4476
  void
4477
- Init_zstdlib(void)
4477
+ Init_zstdlib_c(void)
4478
4478
  {
4479
4479
  #undef rb_intern
4480
4480
  VALUE mZlib, cZStream, cDeflate, cInflate;
@@ -297,7 +297,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
297
297
  * - Zstdlib::GzipFile::NoFooter
298
298
  *
299
299
  */
300
- void Init_zstdlib(void);
300
+ void Init_zstdlib_c(void);
301
301
 
302
302
  /*--------- Exceptions --------*/
303
303
 
@@ -4465,7 +4465,7 @@ zlib_gunzip_run(VALUE arg)
4465
4465
  #endif /* GZIP_SUPPORT */
4466
4466
 
4467
4467
  void
4468
- Init_zstdlib(void)
4468
+ Init_zstdlib_c(void)
4469
4469
  {
4470
4470
  #undef rb_intern
4471
4471
  VALUE mZlib, cZStream, cDeflate, cInflate;