Comments (10)
There is not enough information here.
errno is suppopsed to be set by the operating system when an error occurs, not by an application library.
from libzip.
The following example will illustrate the issue of errno being libzip:
from libzip.
这里没有足够的信息。 errno 应该由操作系统在发生错误时设置,而不是由应用程序库设置。
As long as compile with - lzip, errno will be set to 2
from libzip.
Please read up on errno some more - at the point where you are checking it, the value of errno is undefined.
from libzip.
Please read up on errno some more - at the point where you are checking it, the value of errno is undefined.
Obviously, it's a problem with libzip. I've never seen a reference to another library where errno is not zero. If you can find another library that references errno that is not zero, then I believe you.
from libzip.
Please read up on errno some more - at the point where you are checking it, the value of errno is undefined.
Obviously, it's a problem with libzip. I've never seen a reference to another library where errno is not zero. If you can find another library that references errno that is not zero, then I believe you.
I am working on a large project, using dozens of libraries and debugging for a long time. I found this issue with libzip
from libzip.
libcurses also sets errno to non-zero during it's initialisation.
But all that is besides the point: according to the standard, the value of errno is undefined unless an error occurred. That means, you can't rely on it's value, even if it happens to be 0
on your system; it might not be on other systems.
from libzip.
libcurses 还在初始化期间将 errno 设置为非零。
但这一切都不是重点:根据标准,除非发生错误,否则errno 的值是_未定义的。_这意味着,您不能依赖它的价值,即使它恰好
0
在您的系统上;它可能不在其他系统上。
Okay, but it's still recommended to set up errno and standardize it just like the Linux system library
from libzip.
No, for a library, it's recommended to leave errno alone unless you explicitly set it in case of an error.
If you want it to be 0 at a specific point in your program, set it yourself exactly there.
from libzip.
Also, have you tested if it is set by any of the library libzip links against and not by libzip itself? (zlib, lzma, bz2, …)
from libzip.
Related Issues (20)
- Bad archive HOT 1
- Still a corner case failure with if(ENABLE_ZSTD) HOT 1
- change from autotools to cmake decreased library compatibility_version (macOS)
- Unfriendly for decompressing windos zip, zip_ Open error=21 HOT 2
- Incorrect Progress Progression State - With Fix HOT 1
- Does libzip support "Central Directory Encryption"? HOT 6
- Add a different error code for truncated ZIPs HOT 3
- zip_close failed cause filesystem handle to leak. HOT 3
- How to save or socket an archive from memory? HOT 3
- ld: library 'zip' not found HOT 2
- libzip::zip doesn't exist HOT 2
- Make CMake options consistent HOT 5
- No rule to make target 'zlib.h', needed by 'lib/libzip.dll' HOT 7
- ZIP_CM_SHRINK and ZIP_CM_IMPLODE give unsupported compression method error HOT 1
- Error when use with CPM (cmake package manager) HOT 1
- ZIP_ER_INCONS error (Zip archive inconsistent) on an apparently valid ZIP archive HOT 2
- error while loading shared libraries from /usr/local/lib, dir not in path under Linux Mint HOT 1
- 4 GB limit? HOT 1
- Functionality for creation of split-volume zip files based on individual byte ranges of complete file HOT 3
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 libzip.