Feature #6421

Add zlibwapi to extconf.rb file for zlib library

Added by Daniel Berger almost 2 years ago. Updated over 1 year ago.

[ruby-core:44979]
Status:Closed
Priority:Normal
Assignee:Luis Lavena
Category:ext
Target version:2.0.0

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| havelibrary(z, 'deflateReset')} and
+if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have
library(z, 'deflateReset')} and

Regards,

Dan


Related issues

Related to Backport93 - Backport #7293: Backport: Add zlibwapi to extconf.rb file for zlib library Closed 11/07/2012

Associated revisions

Revision 37527
Added by Luis Lavena over 1 year ago

Recognize zlibwapi as linking library

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

    [Feature #6421]

History

#1 Updated by Luis Lavena almost 2 years ago

  • Status changed from Open to Assigned
  • Assignee set to 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 Updated by Usaku NAKAMURA almost 2 years ago

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

#3 Updated by Heesob Park almost 2 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 Updated by Luis Lavena almost 2 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 Updated by Usaku NAKAMURA over 1 year ago

  • Assignee changed from Usaku NAKAMURA to 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 Luis Lavena over 1 year 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 Updated by Luis Lavena over 1 year 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