MinGW build fixes
Various MinGW build fixes.
This is the mostly the patch set from https://lists.x.org/archives/xorg-devel/2016-July/050509.html, updated for master
Various MinGW build fixes.
This is the mostly the patch set from https://lists.x.org/archives/xorg-devel/2016-July/050509.html, updated for master