diff options
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/io/io.h | 4 | ||||
-rw-r--r-- | libgfortran/io/unix.c | 4 | ||||
-rw-r--r-- | libgfortran/libgfortran.h | 4 |
4 files changed, 14 insertions, 5 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index c1589e8..bc3ed64 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2007-09-06 David Edelsohn <edelsohn@gnu.org> + + * libgfortran.h: Include config.h first. + * io/io.h (struct stream): Rename truncate to trunc. + * io/unix.c (fd_open): Same. + (open_internal): Same. + 2007-09-05 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/33253 diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h index a1138cf..18795a2 100644 --- a/libgfortran/io/io.h +++ b/libgfortran/io/io.h @@ -54,7 +54,7 @@ typedef struct stream try (*sfree) (struct stream *); try (*close) (struct stream *); try (*seek) (struct stream *, gfc_offset); - try (*truncate) (struct stream *); + try (*trunc) (struct stream *); int (*read) (struct stream *, void *, size_t *); int (*write) (struct stream *, const void *, size_t *); try (*set) (struct stream *, int, size_t); @@ -74,7 +74,7 @@ stream; #define salloc_w_at(s, len, where) ((s)->alloc_w_at)(s, len, where) #define sseek(s, pos) ((s)->seek)(s, pos) -#define struncate(s) ((s)->truncate)(s) +#define struncate(s) ((s)->trunc)(s) #define sread(s, buf, nbytes) ((s)->read)(s, buf, nbytes) #define swrite(s, buf, nbytes) ((s)->write)(s, buf, nbytes) diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index ed76cb2..8acc02e 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -828,7 +828,7 @@ fd_open (unix_stream * s) s->st.sfree = (void *) fd_sfree; s->st.close = (void *) fd_close; s->st.seek = (void *) fd_seek; - s->st.truncate = (void *) fd_truncate; + s->st.trunc = (void *) fd_truncate; s->st.read = (void *) fd_read; s->st.write = (void *) fd_write; s->st.set = (void *) fd_sset; @@ -1042,7 +1042,7 @@ open_internal (char *base, int length) s->st.sfree = (void *) mem_sfree; s->st.close = (void *) mem_close; s->st.seek = (void *) mem_seek; - 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.set = (void *) mem_set; diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index 7ce198a..6a702c4 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -31,6 +31,9 @@ Boston, MA 02110-1301, USA. */ #ifndef LIBGFOR_H #define LIBGFOR_H +/* config.h MUST be first because it can affect system headers. */ +#include "config.h" + #include <stdio.h> #include <math.h> #include <stddef.h> @@ -45,7 +48,6 @@ Boston, MA 02110-1301, USA. */ #include "../gcc/fortran/libgfortran.h" -#include "config.h" #include "c99_protos.h" #if HAVE_IEEEFP_H |