GithubHelp home page GithubHelp logo

Comments (9)

Nindaleth avatar Nindaleth commented on June 29, 2024

Is it then a matter of making this change or is something else needed?

when defined(windows):
  type
    Ulong* = uint32
    Ulongf* = uint32
    ZOffT* = int32
else:
  type
    Ulong* = int
    Ulongf* = int
    ZOffT* = int

EDIT: Added the ZOffT*, too. I don't have any Windows instalation to verify if the 64-bit zlib there matches the type definition.

from zip.

Araq avatar Araq commented on June 29, 2024

I don't know.

from zip.

mrhdias avatar mrhdias commented on June 29, 2024

Is it then a matter of making this change or is something else needed?

when defined(windows):
  type
    Ulong* = uint32
    Ulongf* = uint32
    ZOffT* = int32
else:
  type
    Ulong* = int
    Ulongf* = int
    ZOffT* = int

EDIT: Added the ZOffT*, too. I don't have any Windows instalation to verify if the 64-bit zlib there matches the type definition.

I have the same problem, but this solution works on Linux x64.

from zip.

ChanderG avatar ChanderG commented on June 29, 2024

Can confirm that HEAD is not working on Linux with the same error and switching to 07c03b3 (ie removing the commit in #35) solves this issue.

from zip.

PMunch avatar PMunch commented on June 29, 2024

Had this issue as well, the fix from @Nindaleth works for me as well. Could this be applied to master, or is there something holding this back?

from zip.

krux02 avatar krux02 commented on June 29, 2024

This bug won't be fixed. See: #42 (review)

from zip.

Araq avatar Araq commented on June 29, 2024

It will be fixed but properly.

from zip.

snej avatar snej commented on June 29, 2024

See dup #53. (And the dup I would have filed today if I hadn't searched first...) Zlib is pretty much dead in the water on macOS (and iOS, and probably Linux(?)) due to this.

The fix is simply to change the int types to the standard C-based ones, e.g.:

  Uint* = cuint
  Ulong* = culong
  Ulongf* = culong
  Pulongf* = ptr Ulongf

ZOffT is a bit trickier because it looks like the C version is conditionally defined and often ends up as a typedef of off_t (which is weird because off_t is for files, not memory), and off_t varies unpredictably between 32- and 64-bit on different OSs. But that's less critical because there are only a few functions using that.

from zip.

krux02 avatar krux02 commented on June 29, 2024

@snej

ZOffT is a bit trickier because it looks like the C version is conditionally defined and often ends up as a typedef of off_t (which is weird because off_t is for files, not memory), and off_t varies unpredictably between 32- and 64-bit on different OSs. But that's less critical because there are only a few functions using that.

I had a solution that addressed exactly that. Just take a look at my last comment.

from zip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.