On Tue, 11 May 2004, Hrvoje Niksic wrote:

> That in itself is not a problem because, under Windows, off_t will be
> typedeffed to a 64-bit type if LFS is available, and to `int' otherwise.

Sorry for my confusion, but when I think about it I believe Windows _do_ have
an off_t, but that is merely 32bit. The plain libc in Windows seem to be
limited to 32 bits, even though the actual underlying code support 64bit
sizes. In curl we work around this by providing our own curl_off_t variable.

> The point of my question was: should low-level code even care whether LFS is
> in use (by using off_t for various variables), or should it use intmax_t to
> get the largest representation available on the system? The latter is in
> principle sort of like using `long', except you're not tied to the actual
> size of `long'.

In curl we went with curl_off_t for various variables and that is then 32bit
or 64bit depending on platform. I can't see many benefits in using 64bit
variables on systems that don't deal with 64bit filesizes.

-- 
         -=- Daniel Stenberg -=- http://daniel.haxx.se -=-
  ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol

Reply via email to