bug-wget
[Top][All Lists]
Advanced

[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:

5f807d16a269db03a3c451f2933bc1e155984cb5
9112e488960986583af74ad7f0825754a225da5e
da7d4cf3465c8517cd8884f8aea23a0fe3b772cd

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

PREFIX=k:
rm -f autom4te.cache/traces.0 # otherwise things don't get regenerated!
./autogen.sh
# 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:

http://wget.addictivecode.org/PatchGuidelines

The mailing lists page said to use this list instead.

http://wget.addictivecode.org/MailingLists

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]