From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9504 invoked by alias); 21 Jul 2007 19:39:39 -0000 Received: (qmail 9484 invoked by uid 48); 21 Jul 2007 19:39:30 -0000 Date: Sat, 21 Jul 2007 19:39:00 -0000 Message-ID: <20070721193930.9483.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/32784] [win32] Using 'con' as assigned file generates Fortran runtime error: File 'con' does not exist In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg02195.txt.bz2 ------- Comment #9 from jvdelisle at gcc dot gnu dot org 2007-07-21 19:39 ------- The following simple patch enables gfortran to run for the tet case. I need to get the proper #ifdef #endif condition set up and do a similar thing for CONIN$ and CONERR$ ( or whatever the windows equivalents are) and this will be all set. I tested this on cygwin. Index: unix.c =================================================================== --- unix.c (revision 126808) +++ unix.c (working copy) @@ -1259,6 +1259,13 @@ regular_file (st_parameter_open *opp, un crflag |= O_BINARY; #endif + if (strncmp (path, "CONOUT$", 7) == 0) + { + fd = STDOUT_FILENO; + flags->action = ACTION_WRITE; + return fd; + } + mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; fd = open (path, rwflag | crflag, mode); if (flags->action != ACTION_UNSPECIFIED) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32784