Hi Tim, I don't know if it's my email client, but I see no patch attached. Could you please check?
Thanking You, Darshit Shah Sent from mobile device. Please excuse my brevity On 28-Nov-2014 4:00 pm, "Tim Ruehsen" <[email protected]> wrote: > We do not need gettext.h. > We only need _() and libintl.h inclusion. > > Here is a patch to address that. > > Please review and comment. > > Tim > > > On Thursday 27 November 2014 23:26:51 Darshit Shah wrote: > > And that is precisely why I've been gunning for getting a good CI setup > in > > place. > > > > The above patch worked for me flawlessly, but is causing problems on the > > MSVC compiler. > > > > Thanking You, > > Darshit Shah > > Sent from mobile device. Please excuse my brevity > > > > On 27-Nov-2014 11:01 pm, "Gisle Vanem" <[email protected]> wrote: > > > The recent change [1] to gettext.h of replacing free() with > > > > > > xfree() has generated many warnings on MSVC: > > > cl -nologo -MD ... -c cookies.c > > > g:\mingw32\src\inet\wget\src\gettext.h(218) : warning C4013: 'xfree' > > > > undefined; > > > > > assuming extern returning int > > > > > > The cause is in "gettext.h" (the package from Hell IMHO. > > > "gettext.h" is included in "wget.h" before "utils.h" which > > > > > > defines xfree): > > > #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ > > > > > > (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ > > > > > > /* || __STDC_VERSION__ >= 199901L */ ) > > > > > > I.e. GNU only. So what to do? Here I just did: > > > @@ -176,6 +176,7 @@ > > > > > > #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS > > > #include <stdlib.h> > > > > > > +#define xfree free > > > > > > #endif > > > > That is exactly how we otherwise define xfree. Maybe the definition > should > > be moved to a more appropriate place so that MSVC doesn't complain? > > > > > Wasn't there an alloca() discussion recently? Why not use > > > that instead? far more portable IMHO. > > > > If I remember right, we decided against using alloca because of some > issues > > with alloca.h not being available on some architectures. > > > > > [1]: 2014-11-27 Darshit Shah <[email protected]> > > > > > > * cookies.c, gettext.h, init.c, retr.c, url.c, warc.c: Replace > > > > usage of > > > > > free() with xfree() macro. > > > > > > -- > > > --gv > > > > @Tim, your idea about a docker setup would really help us in these cases. > > See if you can set it up sometime soon. We'll hopefully incorporate it > > after the v1.16.1 release. >
