http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47945
--- Comment #14 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2011-03-02 18:17:30 UTC --- On Wed, Mar 02, 2011 at 06:02:22PM +0000, burnus at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47945 > > --- Comment #13 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-03-02 > 18:02:15 UTC --- > (In reply to comment #12) > > could it be that it was the intention to set __USE_MINGW_ANSI_STDIO in > > effect? > > Yes - and that is what does happen for _POSIX=1 on MinGW64. But it does not > happen for _POSIX=1 on the 32bit MinGW. > > Jerry et al.: Do you think the following patch is OK? > > --- a/libgfortran/libgfortran.h > +++ b/libgfortran/libgfortran.h > @@ -33,6 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If > not, see > any system header file is included. */ > #if defined __MINGW32__ > # define _POSIX 1 > +# define _POSIX_SOURCE 1 > # define gfc_printf gnu_printf > #else > # define gfc_printf __printf__ > I though a leading underscore in C denoted the namespace of the C compiler, and a userspace program should not set such a macro. Guess I'll pull out n1256.pdf later to read up on the convention. You may want to ask Joseph. It may also be prudent to add #if define _POSIX_SOURCE #undef _POSIX_SOURCE #endif prior to (re)setting it to 1.