Commit d26014d2 by David Edelsohn Committed by David Edelsohn

io.h (struct stream): Rename truncate to trunc.

        * io/io.h (struct stream): Rename truncate to trunc.
        (struncate): Same.
        * io/unix.c (raw_init): Rename truncate to trunc.
        (buf_init): Same.
        (open_internal): Same.

From-SVN: r145608
parent 439ef907
2009-04-06 David Edelsohn <edelsohn@gnu.org>
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.
2009-04-05 Daniel Kraft <d@domob.eu> 2009-04-05 Daniel Kraft <d@domob.eu>
PR fortran/38654 PR fortran/38654
......
...@@ -53,7 +53,8 @@ typedef struct stream ...@@ -53,7 +53,8 @@ typedef struct stream
ssize_t (*write) (struct stream *, const void *, ssize_t); ssize_t (*write) (struct stream *, const void *, ssize_t);
off_t (*seek) (struct stream *, off_t, int); off_t (*seek) (struct stream *, off_t, int);
off_t (*tell) (struct stream *); off_t (*tell) (struct stream *);
int (*truncate) (struct stream *, off_t); /* Avoid keyword truncate due to AIX namespace collision. */
int (*trunc) (struct stream *, off_t);
int (*flush) (struct stream *); int (*flush) (struct stream *);
int (*close) (struct stream *); int (*close) (struct stream *);
} }
...@@ -87,7 +88,7 @@ stell (stream * s) ...@@ -87,7 +88,7 @@ stell (stream * s)
static inline int static inline int
struncate (stream * s, off_t length) struncate (stream * s, off_t length)
{ {
return s->truncate (s, length); return s->trunc (s, length);
} }
static inline int static inline int
......
...@@ -356,7 +356,7 @@ raw_init (unix_stream * s) ...@@ -356,7 +356,7 @@ raw_init (unix_stream * s)
s->st.write = (void *) raw_write; s->st.write = (void *) raw_write;
s->st.seek = (void *) raw_seek; s->st.seek = (void *) raw_seek;
s->st.tell = (void *) raw_tell; s->st.tell = (void *) raw_tell;
s->st.truncate = (void *) raw_truncate; s->st.trunc = (void *) raw_truncate;
s->st.close = (void *) raw_close; s->st.close = (void *) raw_close;
s->st.flush = (void *) raw_flush; s->st.flush = (void *) raw_flush;
...@@ -565,7 +565,7 @@ buf_init (unix_stream * s) ...@@ -565,7 +565,7 @@ buf_init (unix_stream * s)
s->st.write = (void *) buf_write; s->st.write = (void *) buf_write;
s->st.seek = (void *) buf_seek; s->st.seek = (void *) buf_seek;
s->st.tell = (void *) buf_tell; s->st.tell = (void *) buf_tell;
s->st.truncate = (void *) buf_truncate; s->st.trunc = (void *) buf_truncate;
s->st.close = (void *) buf_close; s->st.close = (void *) buf_close;
s->st.flush = (void *) buf_flush; s->st.flush = (void *) buf_flush;
...@@ -768,7 +768,7 @@ open_internal (char *base, int length, gfc_offset offset) ...@@ -768,7 +768,7 @@ open_internal (char *base, int length, gfc_offset offset)
s->st.close = (void *) mem_close; s->st.close = (void *) mem_close;
s->st.seek = (void *) mem_seek; s->st.seek = (void *) mem_seek;
s->st.tell = (void *) mem_tell; s->st.tell = (void *) mem_tell;
s->st.truncate = (void *) mem_truncate; s->st.trunc = (void *) mem_truncate;
s->st.read = (void *) mem_read; s->st.read = (void *) mem_read;
s->st.write = (void *) mem_write; s->st.write = (void *) mem_write;
s->st.flush = (void *) mem_flush; s->st.flush = (void *) mem_flush;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment