package readline: add patch for missing ;
package libpng: clean up includes in test
package libgcrypt: winsock->winsock2
package apr: fix winsock2.h/window.h include order, enforced by MinGW 4
package gdal: remove unrecognized configure option
update packages mingwrt w32api
package w32api: port old and add new patches
package gdal: override possibly lower default winapi version

Otherwise gdal won't find getaddrinfo using mingw4.
package fontconfig: specify windows version for sake of MemoryBarrier
package postgresql: don't use stat reimplementation

Assume that we don't need pgwin32_safestat in client code.
The redefinition of struct stat and stat() causes problems
because it assumes the real stat() is a function. In fact,
it's a macro in w32api.
package qtbase: mingw4 compatibility
package portaudio: mingw 4 compatibility patch
package json-c: mingw4 workaround
package qt: mingw4 compatibility
package ncurses: mingw4 compatibility
package harfbuzz: mingw4 compatibility
package devil: mingw4 compatibility
exclude problem packages from i686-pc-mingw32 target