http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47945
--- Comment #16 from Thomas Henlich <thenlich at users dot sourceforge.net> 2011-03-03 14:58:35 UTC --- My _mingw.h has the following: #if defined(_POSIX) && !defined(__USE_MINGW_ANSI_STDIO) /* Enable __USE_MINGW_ANSI_STDIO if _POSIX defined * and If user did _not_ specify it explicitly... */ # define __USE_MINGW_ANSI_STDIO 1 #endif So _POSIX_SOURCE really seems to be the wrong way and I wonder what the values of _POSIX and __USE_MINGW_ANSI_STDIO actually are.