diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 07:51:59 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 07:51:59 +0000 |
commit | cb56012690ae1b8f203a61decdcb5d281db2431c (patch) | |
tree | 58bc341cb04d6000b923fc1d7edb78289d9f2938 /libgfortran/io | |
parent | 84836637fcb8e7c3aea3b25f4cbf17a59cfca553 (diff) | |
download | gcc-cb56012690ae1b8f203a61decdcb5d281db2431c.tar.gz |
2009-07-27 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 150103
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@150104 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/unix.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index a7eb4e36ae5..8c7bf86c2bd 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -897,6 +897,26 @@ regular_file (st_parameter_open *opp, unit_flags *flags) return -1; } +#ifdef __CYGWIN__ + if (opp->file_len == 7) + { + if (strncmp (path, "CONOUT$", 7) == 0 + || strncmp (path, "CONERR$", 7) == 0) + { + fd = open ("/dev/conout", O_WRONLY); + flags->action = ACTION_WRITE; + return fd; + } + } + + if (opp->file_len == 6 && strncmp (path, "CONIN$", 6) == 0) + { + fd = open ("/dev/conin", O_RDONLY); + flags->action = ACTION_READ; + return fd; + } +#endif + rwflag = 0; switch (flags->action) |