summaryrefslogtreecommitdiffstats
path: root/libgfortran
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-06 15:32:03 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-06 15:32:03 +0000
commitafd927a4b087f19627e0cf87a092fb3a859eb922 (patch)
treee7d9d181765eab7dcdef889c443b56f9c35c8b4a /libgfortran
parent220307de4594e4507f33a35c2c0de26815a31409 (diff)
downloadppe42-gcc-afd927a4b087f19627e0cf87a092fb3a859eb922.tar.gz
ppe42-gcc-afd927a4b087f19627e0cf87a092fb3a859eb922.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145608 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog8
-rw-r--r--libgfortran/io/io.h5
-rw-r--r--libgfortran/io/unix.c6
3 files changed, 14 insertions, 5 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 761110f4e3c..f2cf22265ff 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,11 @@
+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>
PR fortran/38654
diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h
index 0be480e0738..95c7b04a3c2 100644
--- a/libgfortran/io/io.h
+++ b/libgfortran/io/io.h
@@ -53,7 +53,8 @@ typedef struct stream
ssize_t (*write) (struct stream *, const void *, ssize_t);
off_t (*seek) (struct stream *, off_t, int);
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 (*close) (struct stream *);
}
@@ -87,7 +88,7 @@ stell (stream * s)
static inline int
struncate (stream * s, off_t length)
{
- return s->truncate (s, length);
+ return s->trunc (s, length);
}
static inline int
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 5cac8ea4a5c..0d2650b50fa 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -356,7 +356,7 @@ raw_init (unix_stream * s)
s->st.write = (void *) raw_write;
s->st.seek = (void *) raw_seek;
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.flush = (void *) raw_flush;
@@ -565,7 +565,7 @@ buf_init (unix_stream * s)
s->st.write = (void *) buf_write;
s->st.seek = (void *) buf_seek;
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.flush = (void *) buf_flush;
@@ -768,7 +768,7 @@ open_internal (char *base, int length, gfc_offset offset)
s->st.close = (void *) mem_close;
s->st.seek = (void *) mem_seek;
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.write = (void *) mem_write;
s->st.flush = (void *) mem_flush;
OpenPOWER on IntegriCloud