bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] Invalid Content-Length header in WARC files, on s


From: David Ryskalczyk
Subject: Re: [Bug-wget] [PATCH] Invalid Content-Length header in WARC files, on some platforms
Date: Wed, 14 Nov 2012 09:05:38 -0500

On Wed, Nov 14, 2012 at 8:31 AM, Tim Ruehsen <address@hidden> wrote:
> BTW, I had a private discussion with Guiseppe at April 13th 2012.
> It was about C99/POSIX and using getline().
> Guiseppe's last words were:
>
> "I had to check it better before give an answer, but yeah, the answer is:
> let's use C99 and POSIX-2008."
>
> @Guiseppe: can you confirm this officially on the mailing list ?

I think C89 should be supported. There is also the aforementioned
issue with Windows. Visual Studio supports portions of C99
(specifically the ones that are also present in the newer C++
standards), but not the whole thing.

>From the comments in wget.h, it appears that the whole purpose of the
wgint is to protect against this problem.
> /* Pick an integer type large enough for file sizes, content lengths,
>    and such.  Because today's files can be very large, it should be a
>    signed integer at least 64 bits wide.  This can't be typedeffed to
>    off_t because: a) off_t is always 32-bit on Windows, and b) we
>    don't necessarily want to tie having a 64-bit type for internal
>    calculations to having LFS support.  */

The patch that was originally submitted makes the code in warc.c
behave like the file_size(const char *filename) function in
src/utils.c.

--David Ryskalczyk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]