Comments (9)
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.
I don't know.
from zip.
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* = intEDIT: 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.
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.
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.
This bug won't be fixed. See: #42 (review)
from zip.
It will be fixed but properly.
from zip.
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.
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)
- Documentation and examples
- addFile StringStream fails on Windows HOT 1
- ZIP Password HOT 1
- Error: ambiguous identifier: 'Time' HOT 3
- allow passing flags to zip_open via open HOT 5
- Not compiling on windows HOT 3
- windows vs linux inconsistency HOT 7
- please update libzip version to 1.6.1
- fixed: zlib version mismatch! [ZlibStreamError] HOT 4
- Directory traversal vulnerability from libzip HOT 15
- Tag a new release of zip
- Update to newer zlib, add new functions
- Incorrect version check in deflateInit, inflateInit, etc.
- Unable to import module HOT 2
- Issue trying to read stats on file in zip files HOT 1
- zip_open_from_source() & zip_source_buffer_create() not defined in libzip_all.c
- Issues cross-compiling with MinGW HOT 1
- libzip.dylib not found when installed via homebrew on Mac OSX HOT 1
- Cannot write multiple files to same zip archive
- zlib.h: No such file or directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zip.