Selective copy from MinGW header

public domain, no copyrights