This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/32784] [win32] Using 'con' as assigned file generates Fortran runtime error: File 'con' does not exist
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jul 2007 19:39:30 -0000
- Subject: [Bug libfortran/32784] [win32] Using 'con' as assigned file generates Fortran runtime error: File 'con' does not exist
- References: <bug-32784-14861@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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