Guido Guenther <[EMAIL PROTECTED]> wrote:
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.

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.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to