PR libfortran/62768 Use gfc_unit.filename also when HAVE_TTYNAME{_R} is not defined.
authorJanne Blomqvist <jb@gcc.gnu.org>
Wed, 17 Sep 2014 21:44:15 +0000 (00:44 +0300)
committerJanne Blomqvist <jb@gcc.gnu.org>
Wed, 17 Sep 2014 21:44:15 +0000 (00:44 +0300)
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.

From-SVN: r215338

libgfortran/ChangeLog
libgfortran/io/inquire.c

index fde3965e5eb064c9b84405ade9bc3d80d8341678..e27c2a7f7c1e387a692fe5a66e35f81cf6adea47 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 4d03161cbf89fb1b87ec20b813816337d7fed288..c8b5623402cf9bbbd67628158e6e53e6c184e78a 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
     }