diff options
| author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-23 00:58:46 +0000 |
|---|---|---|
| committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-23 00:58:46 +0000 |
| commit | 3d17984ea3950014efbe519ced24599b69245347 (patch) | |
| tree | 7d06a4c6da999ce63065afecdfe7cade74ff43f6 | |
| parent | 6ff7e5deae59a6f5c1f1ebccebfa1bf93726bb9c (diff) | |
| download | ppe42-gcc-3d17984ea3950014efbe519ced24599b69245347.tar.gz ppe42-gcc-3d17984ea3950014efbe519ced24599b69245347.zip | |
2009-07-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/32784
* unix.c (regular_file): Check for CONIN$ CONOUT$, and CONERR$ and open
the respective /dev/conin or /dev/conout devices. This is Cygwin
specific.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149970 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
| -rw-r--r-- | libgfortran/io/unix.c | 20 |
2 files changed, 27 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 8231ed1588c..5bb68ce291a 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2009-07-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libfortran/32784 + * unix.c (regular_file): Check for CONIN$ CONOUT$, and CONERR$ and open + the respective /dev/conin or /dev/conout devices. This is Cygwin + specific. + 2009-07-19 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 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) |

