Project

General

Profile

Feature #6421

Add zlibwapi to extconf.rb file for zlib library

Added by djberg96 (Daniel Berger) almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:44979]

Description

The vstudio contrib solution in zlib 1.2.7 creates a "zlibwapi" dll file. According to the readme.txt file, "The new DLL was renamed because there exist several incompatible versions of zlib.dll on the Internet."

So, I propose this very modest adjustment to the extconf.rb file for zlib:

-if %w'z libz zlib1 zlib zdll'.find {|z| have_library(z, 'deflateReset')} and
+if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')} and

Regards,

Dan

Associated revisions

Revision 37527
Added by luislavena (Luis Lavena) over 4 years ago

Recognize zlibwapi as linking library

  • ext/zlib/extconf.rb: Recognize zlibwapi as linking library. Patch by Daniel Berger.

[Feature #6421]

Revision 37527
Added by luislavena (Luis Lavena) over 4 years ago

Recognize zlibwapi as linking library

  • ext/zlib/extconf.rb: Recognize zlibwapi as linking library. Patch by Daniel Berger.

[Feature #6421]

Revision 37527
Added by luislavena (Luis Lavena) over 4 years ago

Recognize zlibwapi as linking library

  • ext/zlib/extconf.rb: Recognize zlibwapi as linking library. Patch by Daniel Berger.

[Feature #6421]

Revision 37527
Added by luislavena (Luis Lavena) over 4 years ago

Recognize zlibwapi as linking library

  • ext/zlib/extconf.rb: Recognize zlibwapi as linking library. Patch by Daniel Berger.

[Feature #6421]

History

#1 [ruby-core:44989] Updated by luislavena (Luis Lavena) almost 5 years ago

  • Status changed from Open to Assigned
  • Assignee set to usa (Usaku NAKAMURA)

Hello,

According to the wiki, zlib has no maintainer:
http://bugs.ruby-lang.org/projects/ruby/wiki/Maintainers

Was my understanding that zlibwapi exported symbols as stdcall and not cdecl.

Assigning to Usaku Nakamura.

#2 [ruby-core:44991] Updated by usa (Usaku NAKAMURA) almost 5 years ago

Have anyone tested it?
If it has enough compatibility with normal zlib, there is no problem
I think.

#3 [ruby-core:44992] Updated by phasis68 (Heesob Park) almost 5 years ago

I have tested it.
The zlibwapi.dll can be stdcall or cdecl depend on the macro ZLIB_WINAPI defined or not.

I think there is no problem if it is not accepted.
You can rename zlibwapi.dll and zlibwapi.lib to zlib.dll and zlib.lib.

#4 [ruby-core:44993] Updated by luislavena (Luis Lavena) almost 5 years ago

phasis68 (Heesob Park) wrote:

I have tested it.
The zlibwapi.dll can be stdcall or cdecl depend on the macro ZLIB_WINAPI defined or not.

Just to be sure, Ruby zlib extension will need to ensure ZLIB_WINAPI is not defined (undef if necessary)

#5 [ruby-core:48642] Updated by usa (Usaku NAKAMURA) over 4 years ago

  • Assignee changed from usa (Usaku NAKAMURA) to luislavena (Luis Lavena)

Sorry, I can't understand the conclusion.

(1) should apply the 1 line patch because it doesn't cause any problem.
(2) no need to apply the patch because the zlibwapi users should change the names of the dll and the lib.

Which?

Luis, you understand this ticket than me.
Please commit the patch or reject this ticket.

#6 Updated by luislavena (Luis Lavena) over 4 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r37527.
Daniel, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Recognize zlibwapi as linking library

  • ext/zlib/extconf.rb: Recognize zlibwapi as linking library. Patch by Daniel Berger.

[Feature #6421]

#7 [ruby-core:48989] Updated by luislavena (Luis Lavena) over 4 years ago

  • Target version changed from 1.9.3 to 2.0.0

usa (Usaku NAKAMURA) wrote:

Sorry, I can't understand the conclusion.

Please commit the patch or reject this ticket.

Sorry for late response. I've committed this to trunk in r37527

Will open a backport request too.

Thank you

Also available in: Atom PDF