bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Problem using GNU Wget 1.11.4 Windows version


From: Ray Satiro
Subject: Re: [Bug-wget] Problem using GNU Wget 1.11.4 Windows version
Date: Tue, 20 Mar 2012 23:12:48 -0700 (PDT)

> From: Ángel González <address@hidden>
> To: Ray Satiro <address@hidden>; bug-wget <address@hidden>
> Cc: 
> Sent: Tuesday, March 20, 2012 3:27 PM
> Subject: Re: [Bug-wget] Problem using GNU Wget 1.11.4 Windows version
> 

[...]

> The bug is on line 3058 of http.c
> hstat.restval = st.st_size;
> 
> st_size is a 32 bit off_t, being sign-extended to a 64 bit wgint.
> I don't think it can be fixed at that point. I would replace the stat to
> stati64.
> 
> In fact, wget code seems designed to do that, see the struct_stat
> comment in sysdep.h
> I was able to build a wget without the issue by adding this to mswindows.h
> 
>>  --- src/mswindows.h    2011-08-13 08:43:43 +0000
>>  +++ src/mswindows.h    2012-03-20 19:20:01 +0000
>>  @@ -102,6 +102,11 @@
>>   # define fstat(f, b) fstat_alias (f, b)
>>   #endif
>>   
>>  +#define struct_stat struct _stati64
>>  +#define struct_fstat struct _stati64
>>  +#undef stat
>>  +#define stat _stati64
>>  +
>>   #define PATH_SEPARATOR '\\'
>>   
>>   /* Additional declarations needed for IPv6: */
>> 
> 
> This bypasses gnulib stat, though.
>

Yes that is the way it used to be with the structs. As far as bypassing 
stat,fstat that's probably not the best way but it works.




reply via email to

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