[Patch,libgfortran] PR 41219, fix getlogin include on MINGW

Tobias Burnus burnus@net-b.de
Fri Sep 4 09:26:00 GMT 2009


On Thu, Sep 03, 2009 at 10:01:25PM +0200, Tobias Burnus wrote:
> The following adds the _POSIX definition. Nightstrike wrote at #gfortran:
> "applying it manually does cause ../../../gcc/libgfortran/intrinsics/getlog.c
> to be recompiled, adn thje compile is silent"

Committed:

Sending        libgfortran/ChangeLog
Sending        libgfortran/intrinsics/getlog.c
Transmitting file data ..
Committed revision 151417.

Tobias

> 2009-09-03  Tobias Burnus  <burnus@net-b.de>
> 
> 	PR fortran/41219
> 	* intrinsics/getlog.c: Define _POSIX for MINGW32.
> 
> Index: intrinsics/getlog.c
> ===================================================================
> --- intrinsics/getlog.c	(Revision 151381)
> +++ intrinsics/getlog.c	(Arbeitskopie)
> @@ -28,6 +28,9 @@ see the files COPYING3 and COPYING.RUNTI
>  #include <string.h>
>  
>  #ifdef HAVE_UNISTD_H
> +#  if defined __MINGW32__ && defined  HAVE_GETLOGIN
> +#    define _POSIX 1
> +#  endif
>  #include <unistd.h>
>  #endif
>  #ifdef HAVE_PWD_H



More information about the Gcc-patches mailing list