PR libfortran/62768 Use gfc_unit.filename also when HAVE_TTYNAME{_R} is not defined.
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Sep 2014 21:44:15 +0000 (21:44 +0000)
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Sep 2014 21:44:15 +0000 (21:44 +0000)
2014-09-18  Janne Blomqvist  <jb@gcc.gnu.org>

PR libfortran/62768
* io/inquire.c (inquire_via_unit): Use gfc_unit.filename also when
HAVE_TTYNAME{_R} is not defined.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215338 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/inquire.c

index fde3965..e27c2a7 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-18  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       PR libfortran/62768
+       * io/inquire.c (inquire_via_unit): Use gfc_unit.filename also when
+       HAVE_TTYNAME{_R} is not defined.
+
 2014-09-17  Janne Blomqvist  <jb@gcc.gnu.org>
 
        PR libfortran/62768
index 4d03161..c8b5623 100644 (file)
@@ -92,9 +92,9 @@ inquire_via_unit (st_parameter_inquire *iqp, gfc_unit * u)
       else if (u->unit_number == options.stderr_unit)
        fstrcpy (iqp->name, iqp->name_len, "CONERR$", sizeof("CONERR$"));
       else
-       fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len);
+       cf_strcpy (iqp->name, iqp->name_len, u->filename);
 #else
-    fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len);
+    cf_strcpy (iqp->name, iqp->name_len, u->filename);
 #endif
     }