... I find out that actually there are a lot of them (batch files) with the "wrong" end-of-line encoding, in some it does not cause any problem, but in some it does (depending on parsing engine), so if you have those files the best course of action is to search for and open all of them (*.bat) in something like NotePad++ and convert all the end-of-line to windows style and save all the files.
This should fix some if not all of the problems peps are having while compiling boost on windows.
Boost tarballs contain unix EOL encoded files, the easyest way is to use either the zip or the 7z archive containing windows EOL files.
So either a conversion from Unix LF to Windows CR+LF on those files is needed, or just use mingw to compile it using "$ make -f Makefile.mingw init upnpc-static" from msys instead of Windows command prompt.
Miniupnpc compiles fine from both msys and cmd producing identical binaries, so it's just a matter of preference which one you compile from.
About this part... actually there is already a directive in the makefile.mingw that does exactly that... from msys while in the bitcoin src directory, call:
make -f makefile.mingw leveldb/libleveldb.a
Yes, this is a remnant from older versions, it probably makes more sense compiling bitcoind from msys instead of building leveldb from msys then bitcoind from cmd
