- Package:
- libneon27-dev
- Source:
- neon27
- Description:
- Header and static library files for libneon27
- Submitter:
- Guido Guenther
- Date:
- 2025-08-17 17:47:17 UTC
- Severity:
- normal
- Tags:
Hi, without adding the above to CFLAGS libneon is not usable in programs, that use the above definition since off_t is considered 4 byte in neon and 8 byte with the above definition - this e.g. leeds to curious results when using ne_get_range - I can provide a testcase if necessary. Cheers, -- Guido
Hi! I prepared a fairly simple patch to implement this: http://0pointer.de/public/neon-off_t-64.patch (after applying make sure to rerun autoconf and autoheader) Please not that implementing this means an ABI breakage, since the size of the structure ne_content_range changes. I posted a report about this to the neon mailing list: http://mailman.webdav.org/pipermail/neon/2006-March/002197.html Lennart
Guido Guenther <agx@sigxcpu.org> wrote:
Building neon with -D_FILE_OFFSET_BITS=64 will break programs that _do
not_ use the above definition. Redefining standard types in public
headers is not an acceptable behaviour for a library. The proper way
is to use off64_t. Perhaps even with something like this:
typedef struct {
off_t start, end, total;
} ne_content_range;
+#ifdef _LARGEFILE64_SOURCE
+typedef struct {
+ off64_t start, end, total;
+} ne_content_range64;
+
+# if (_FILE_OFFSET_BITS==64)
+# define ne_content_range ne_content_range64
+# endif
+#endif
... etc. A simpler alternative would be to use off64_t
unconditionally, but it would break API.
tag 350619 + moreinfo Hi, I'm not really sure how to make libneon fail. Also, since the bug was reported the API changed, and the code seems to be dealing with _off64_t now (abstracting it in ne_off_t). But as I don't use libneon, nor there is a package in the repository that does I can't really test it. Please if you can reproduce the largefile failure provide a simple test. Thanks,
tag 350619 + moreinfo Hi, I'm not really sure how to make libneon fail. Also, since the bug was reported the API changed, and the code seems to be dealing with _off64_t now (abstracting it in ne_off_t). But as I don't use libneon, nor there is a package in the repository that does I can't really test it. Please if you can reproduce the largefile failure provide a simple test. Thanks,
Very likely this has long been resolved. I'm not using libneon anymore so I'd be hard for me to check. Cheers, -- Guido
Very likely this has long been resolved. I'm not using libneon anymore so I'd be hard for me to check. Cheers, -- Guido
Very likely this has long been resolved. I'm not using libneon anymore so I'd be hard for me to check. Cheers, -- Guido