aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.h
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/unix.h')
-rw-r--r--libgfortran/io/unix.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libgfortran/io/unix.h b/libgfortran/io/unix.h
index 08c83e4..52f3e0c 100644
--- a/libgfortran/io/unix.h
+++ b/libgfortran/io/unix.h
@@ -35,6 +35,7 @@ struct stream
ssize_t (*write) (struct stream *, const void *, ssize_t);
gfc_offset (*seek) (struct stream *, gfc_offset, int);
gfc_offset (*tell) (struct stream *);
+ gfc_offset (*size) (struct stream *);
/* Avoid keyword truncate due to AIX namespace collision. */
int (*trunc) (struct stream *, gfc_offset);
int (*flush) (struct stream *);
@@ -67,6 +68,12 @@ stell (stream * s)
return s->tell (s);
}
+static inline gfc_offset
+ssize (stream * s)
+{
+ return s->size (s);
+}
+
static inline int
struncate (stream * s, gfc_offset length)
{
@@ -155,9 +162,6 @@ internal_proto(inquire_write);
extern const char *inquire_readwrite (const char *, int);
internal_proto(inquire_readwrite);
-extern gfc_offset file_length (stream *);
-internal_proto(file_length);
-
extern void flush_if_preconnected (stream *);
internal_proto(flush_if_preconnected);