+2012-06-21 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/39654
+ * iresolve.c (gfc_resolve_ftell): Fix result kind and use new
+ library function.
+
2012-06-18 Tobias Burnus <burnus@net-b.de>
* intrinsic.h (gfc_resolve_rank): New prototype.
gfc_clear_ts (&ts);
f->ts.type = BT_INTEGER;
- f->ts.kind = gfc_index_integer_kind;
+ f->ts.kind = gfc_intio_kind;
if (u->ts.kind != gfc_c_int_kind)
{
ts.type = BT_INTEGER;
gfc_convert_type (u, &ts, 2);
}
- f->value.function.name = gfc_get_string (PREFIX ("ftell"));
+ f->value.function.name = gfc_get_string (PREFIX ("ftell2"));
}
+2012-06-21 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/39654
+ * io/intrinsics.c (ftell2): New function.
+ * gfortran.map (_gfortran_ftell2): Export function.
+
2012-06-04 Robert Mason <rbmj@verizon.net>
Janne Blomqvist <jb@gcc.gnu.org>
return ret;
}
+
+/* Here is the ftell function with an incorrect return type; retained
+ due to ABI compatibility. */
+
extern size_t PREFIX(ftell) (int *);
export_proto_np(PREFIX(ftell));
return gf_ftell (*unit);
}
+
+/* Here is the ftell function with the correct return type, ensuring
+ that large files can be supported as long as the target supports
+ large integers; as of 4.8 the FTELL intrinsic function will call
+ this one instead of the old ftell above. */
+
+extern GFC_IO_INT PREFIX(ftell2) (int *);
+export_proto_np(PREFIX(ftell2));
+
+GFC_IO_INT
+PREFIX(ftell2) (int * unit)
+{
+ return gf_ftell (*unit);
+}
+
+
#define FTELL_SUB(kind) \
extern void ftell_i ## kind ## _sub (int *, GFC_INTEGER_ ## kind *); \
export_proto(ftell_i ## kind ## _sub); \