Re: Portable representation of large integers

2003-09-23 Thread DervishD
Hi Hrvoje :)) * Hrvoje Niksic [EMAIL PROTECTED] dixit: There have been several attempts to fix this: [...] * In its own patches, Debian introduced the use of large file APIs and `long long'. While that's perfectly fine for Debian, it is not portable. Neither the large file API nor

Re: Portable representation of large integers

2003-09-23 Thread Hrvoje Niksic
DervishD [EMAIL PROTECTED] writes: Yes, you're true, but... How about using C99 large integer types (intmax_t and family)? But then I can use `long long' just as well, which is supported by C99 and (I think) required to be at least 64 bits wide. Portability is the whole problem, so

Re: Portable representation of large integers

2003-09-23 Thread DervishD
Hi Hrvoje :) * Hrvoje Niksic [EMAIL PROTECTED] dixit: Using #ifdefs to switch between %d/%lld/%j *is* completely portable, but it requires three translations for each message. The translators would feast on my flesh, howling at the moonlight. Sure ;)) Anyway, it will happen in just

Re: Portable representation of large integers

2003-09-23 Thread Maciej W. Rozycki
On Mon, 22 Sep 2003, Hrvoje Niksic wrote: I doubt any system that does not support off_t does support LFS. As I mentioned in the first message, LFS is not the only thing you need large values for. Think download quota or the sum of downloaded bytes. You should be able to specify

Portable representation of large integers

2003-09-22 Thread Hrvoje Niksic
In these enlightened times when 2G+ or large files are no longer considered large even in the third world, more and more people ask for the ability to download huge files with Wget. Wget carefully uses `long' for potentially large values, such as file sizes and offsets, but that has no effect on

Re: Portable representation of large integers

2003-09-22 Thread Daniel Stenberg
On Mon, 22 Sep 2003, Hrvoje Niksic wrote: The bottom line is, I really don't know how to solve this portably. Does anyone know how widely ported software deals with large files? In curl, we provide our own *printf() code that works as expected on all platforms. (Not that we have proper 2GB

Re: Portable representation of large integers

2003-09-22 Thread Hrvoje Niksic
Maciej W. Rozycki [EMAIL PROTECTED] writes: On Mon, 22 Sep 2003, Hrvoje Niksic wrote: Well, using off_t and AC_SYS_LARGEFILE seems to be the recommended practice. Recommended for POSIX systems, perhaps, but not really portable to older machines. And it doesn't solve the portable

Re: Portable representation of large integers

2003-09-22 Thread Hrvoje Niksic
Daniel Stenberg [EMAIL PROTECTED] writes: On Mon, 22 Sep 2003, Hrvoje Niksic wrote: The bottom line is, I really don't know how to solve this portably. Does anyone know how widely ported software deals with large files? In curl, we provide our own *printf() code that works as expected on