[Top][All Lists]

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

[Bug-wget] Mingw build and binary stdout fixes

From: Martin Panter
Subject: [Bug-wget] Mingw build and binary stdout fixes
Date: Sat, 2 May 2009 15:04:39 +0000

Here are some patches that I made to get Wget to compile with Mingw:

1: Puts $LIB variable after other libraries, so $LIB can specify
libraries that Open SSL needs.

2: Avoids using symlinks, and conditionally compiles mswindows.c using
a Make flag. I guess there's a better way to do this with Autotools
but I don't know how. (I'm not a huge fan of Autotools.)

3: Set stdout to binary mode.

4: Merge of #3 with 1 and 2 and release 1.11 code.

There are 3 changes in the "mainline" Mercurial repository that are
meant to fix the binary stdout issue, but because they use freopen
they're no good if you actually want to redirect output, etc. So I
think you should use my change instead of these:


I case anyone's interested, these are the commands I used to build
Wget with using mingw/msys:

rm -f autom4te.cache/traces.0 # otherwise things don't get regenerated!
# Wget should check the more standard "_WIN32" macro rather than "WINDOWS"?
# Autotools wants to link directly to the static Open SSL library files
# rather than simply specifying the library names (which should automatically
# prefer the DLLs).
./configure \
    CPPFLAGS="-D WINDOWS" LIBS="-lws2_32 -lgdi32" \
    --disable-nls \
    --with-ssl --with-libssl-prefix="$PREFIX"
make WINDOWS=yes

Also, it looks like the wiki page for patches says to send patches to
an old mailing list address:


The mailing lists page said to use this list instead.


Attachment: 1.autotools-lib-order.patch.txt
Description: Text document

Attachment: 2.windows.patch.txt
Description: Text document

Attachment: 3.set-stdout-binary.patch.txt
Description: Text document

Attachment: 4.set-stdout-binary.merge.patch.txt
Description: Text document

reply via email to

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