aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>2004-05-18 18:06:09 +0200
committerTobias Schlüter <tobi@gcc.gnu.org>2004-05-18 18:06:09 +0200
commit81f4be3ce1fd9f08d811cf61413e374e0dc43166 (patch)
tree23c4c98b07e24eaf1541c8090b2f9c1c5e2f219e /libgfortran/io/unix.c
parent7d72d96efe1f576cbeea5e6c59724a8d47f476b9 (diff)
downloadgcc-81f4be3ce1fd9f08d811cf61413e374e0dc43166.zip
gcc-81f4be3ce1fd9f08d811cf61413e374e0dc43166.tar.gz
gcc-81f4be3ce1fd9f08d811cf61413e374e0dc43166.tar.bz2
re PR libfortran/15235 (libgfortran doesn't build on Solaris 10)
PR fortran/15235 * gfortran.h (offset_t): Rename to ... (gfc_offset): ... this. * io/backspace.c (formatted_backspace, unformatted_backspace), io/io.h (stream, gfc_unit, global_t, file_length, file_position), transfer.c (us_read, us_write, next_record_r, next_record_w), io/unit.c (init_units), unix.c (unix_stream, fd_alloc, fd_alloc_r_at, fd_alloc_w_at, fd_seek, mmap_alloc, mmap_alloc_r_at, mmap_alloc_w_at, mmap_seek, mem_alloc_r_at, mem_alloc_w_at, mem_seek, file_length, file_position): Replace all occurences of offset_t by gfc_offset. From-SVN: r81994
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 104afb2c..fc25395 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -86,11 +86,11 @@ typedef struct
stream st;
int fd;
- offset_t buffer_offset; /* File offset of the start of the buffer */
- offset_t physical_offset; /* Current physical file offset */
- offset_t logical_offset; /* Current logical file offset */
- offset_t dirty_offset; /* Start of modified bytes in buffer */
- offset_t file_length; /* Length of the file, -1 if not seekable. */
+ gfc_offset buffer_offset; /* File offset of the start of the buffer */
+ gfc_offset physical_offset; /* Current physical file offset */
+ gfc_offset logical_offset; /* Current logical file offset */
+ gfc_offset dirty_offset; /* Start of modified bytes in buffer */
+ gfc_offset file_length; /* Length of the file, -1 if not seekable. */
char *buffer;
int len; /* Physical length of the current buffer */
@@ -293,7 +293,7 @@ fd_flush (unix_stream * s)
* to come next. */
static void
-fd_alloc (unix_stream * s, offset_t where, int *len)
+fd_alloc (unix_stream * s, gfc_offset where, int *len)
{
char *new_buffer;
int n, read_len;
@@ -344,9 +344,9 @@ fd_alloc (unix_stream * s, offset_t where, int *len)
* NULL on I/O error. */
static char *
-fd_alloc_r_at (unix_stream * s, int *len, offset_t where)
+fd_alloc_r_at (unix_stream * s, int *len, gfc_offset where)
{
- offset_t m;
+ gfc_offset m;
int n;
if (where == -1)
@@ -389,9 +389,9 @@ fd_alloc_r_at (unix_stream * s, int *len, offset_t where)
* we've already buffered the data or we need to load it. */
static char *
-fd_alloc_w_at (unix_stream * s, int *len, offset_t where)
+fd_alloc_w_at (unix_stream * s, int *len, gfc_offset where)
{
- offset_t n;
+ gfc_offset n;
if (where == -1)
where = s->logical_offset;
@@ -444,7 +444,7 @@ fd_sfree (unix_stream * s)
static int
-fd_seek (unix_stream * s, offset_t offset)
+fd_seek (unix_stream * s, gfc_offset offset)
{
s->physical_offset = s->logical_offset = offset;
@@ -551,9 +551,9 @@ mmap_flush (unix_stream * s)
* guaranteed to be mappable. */
static try
-mmap_alloc (unix_stream * s, offset_t where, int *len)
+mmap_alloc (unix_stream * s, gfc_offset where, int *len)
{
- offset_t offset;
+ gfc_offset offset;
int length;
char *p;
@@ -578,9 +578,9 @@ mmap_alloc (unix_stream * s, offset_t where, int *len)
static char *
-mmap_alloc_r_at (unix_stream * s, int *len, offset_t where)
+mmap_alloc_r_at (unix_stream * s, int *len, gfc_offset where)
{
- offset_t m;
+ gfc_offset m;
if (where == -1)
where = s->logical_offset;
@@ -605,7 +605,7 @@ mmap_alloc_r_at (unix_stream * s, int *len, offset_t where)
static char *
-mmap_alloc_w_at (unix_stream * s, int *len, offset_t where)
+mmap_alloc_w_at (unix_stream * s, int *len, gfc_offset where)
{
if (where == -1)
where = s->logical_offset;
@@ -632,7 +632,7 @@ mmap_alloc_w_at (unix_stream * s, int *len, offset_t where)
static int
-mmap_seek (unix_stream * s, offset_t offset)
+mmap_seek (unix_stream * s, gfc_offset offset)
{
s->logical_offset = offset;
@@ -719,9 +719,9 @@ mmap_open (unix_stream * s)
static char *
-mem_alloc_r_at (unix_stream * s, int *len, offset_t where)
+mem_alloc_r_at (unix_stream * s, int *len, gfc_offset where)
{
- offset_t n;
+ gfc_offset n;
if (where == -1)
where = s->logical_offset;
@@ -743,9 +743,9 @@ mem_alloc_r_at (unix_stream * s, int *len, offset_t where)
static char *
-mem_alloc_w_at (unix_stream * s, int *len, offset_t where)
+mem_alloc_w_at (unix_stream * s, int *len, gfc_offset where)
{
- offset_t m;
+ gfc_offset m;
if (where == -1)
where = s->logical_offset;
@@ -762,7 +762,7 @@ mem_alloc_w_at (unix_stream * s, int *len, offset_t where)
static int
-mem_seek (unix_stream * s, offset_t offset)
+mem_seek (unix_stream * s, gfc_offset offset)
{
if (offset > s->file_length)
@@ -1366,7 +1366,7 @@ inquire_readwrite (const char *string, int len)
/* file_length()-- Return the file length in bytes, -1 if unknown */
-offset_t
+gfc_offset
file_length (stream * s)
{
@@ -1376,7 +1376,7 @@ file_length (stream * s)
/* file_position()-- Return the current position of the file */
-offset_t
+gfc_offset
file_position (stream * s)
{