bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Wget 1.17 doesn't compile on Windows (hsts.c)


From: Tim Ruehsen
Subject: Re: [Bug-wget] Wget 1.17 doesn't compile on Windows (hsts.c)
Date: Tue, 17 Nov 2015 10:27:50 +0100
User-agent: KMail/4.14.10 (Linux/4.2.0-1-amd64; KDE/4.14.13; x86_64; ; )

Hi Darshit,

gnulib uses LockFileEx() on Windows. So IMO, you chose the right thing.

BTW, I am pretty astonished that there are no Windows developers ever trying 
to compile Wget before any release. How can we any longer support an OS 
without any help from OS users ?
Cross-compilation and testing with Wine is IMO not an option... I had .exe 
working fine on Wine but severely breaking on Windows (XP) - the time back 
when I had an XP laptop.

Tim

On Tuesday 17 November 2015 00:40:51 Darshit Shah wrote:
> I think it's because flock isn't implemented in Windows. The ideal solution
> would be to use some WIN32 API to get it done. However, I saw that gnulib
> actually provides an implementation of flock that can be used on Windows.
> Hence, maybe just using the gnulib module may work.
> 
> @Giuseppe, @Tim: What do you'll think?
> 
> I've attached a patch that **may** fix the issue. Could you please try to
> compile Wget from git after applying this patch? If that is not possible,
> please contact me directly and I can provide you with a release tarball
> with this patch applied and hope that it works.
> 
> On 11/16, Jernej Simončič wrote:
> >Looks like hsts.c tries to use flock with a parameter that doesn't
> >work on Windows:
> >
> >x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H
> >-DSYSTEM_WGETRC=\"/win32dev/misc/wget/out64/etc/wgetrc\"
> >-DLOCALEDIR=\"/win32dev/misc/wget/out64/share/locale\" -I.  -I../lib
> >-I../lib -I/win32dev/misc/wget/out64/include 
> >-I/win32dev/misc/wget/out64/include  -DHAVE_LIBSSL  -DNDEBUG  -MT hsts.o
> >-MD -MP -MF .deps/hsts.Tpo -c -o hsts.o hsts.c hsts.c: In function
> >'hsts_store_dump':
> >hsts.c:329:20: warning: format '%lu' expects argument of type 'long
> >unsigned int', but argument 6 has type 'time_t' [-Wformat=]>
> >                    khi->created, khi->max_age) < 0)
> >                    ^
> >
> >hsts.c:329:20: warning: format '%lu' expects argument of type 'long
> >unsigned int', but argument 7 has type 'time_t' [-Wformat=] hsts.c: In
> >function 'hsts_store_save':
> >hsts.c:505:22: error: 'LOCK_EX' undeclared (first use in this function)
> >
> >           flock (fd, LOCK_EX);
> >           
> >                      ^
> >
> >hsts.c:505:22: note: each undeclared identifier is reported only once for
> >each function it appears in



reply via email to

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