libgfortran.h: Include config.h first.

* libgfortran.h: Include config.h first.
        * io/io.h (struct stream): Rename truncate to trunc.
        * io/unix.c (fd_open): Same.
        (open_internal): Same.

From-SVN: r128182
This commit is contained in:
David Edelsohn 2007-09-06 12:40:50 +00:00 committed by David Edelsohn
parent 71d3c6e7e4
commit 200809cbbf
4 changed files with 14 additions and 5 deletions

View File

@ -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

View File

@ -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)

View File

@ -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;

View File

@ -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