[gfortran] patch for recent I/O breakage on FreeBSD
Bud Davis
bdavis9659@comcast.net
Fri Apr 9 14:50:00 GMT 2004
64 bit offset_t was disrupting the offsets in the ioparm record, leading
to the format string pointing to a small integer number vs the expected
string.
caused by this patch:
2004-03-24 Bud Davis <bdavis9659@comcast.net>
PR 12921
* io.h, transfer.c, open.c : recl_in changed from ptr to
variable.
* open.c (new_unit): Moved test for positioned direct access
error.
(init_units): Corrected calculation of max records.
The patch below returns the interface into 32 bit; it corrects the
FreeBSD failures and has no additional testsuite failures on
i686/gnu/linux.
returning a 64 bit value representing record numbers will be needed to
allow direct access files > 2gb, but that is left for another day.
--bud davis
Index: gcc/libgfortran/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/Attic/ChangeLog,v
retrieving revision 1.1.2.41
diff -c -3 -p -r1.1.2.41 ChangeLog
*** gcc/libgfortran/ChangeLog 4 Apr 2004 03:06:56 -0000 1.1.2.41
--- gcc/libgfortran/ChangeLog 9 Apr 2004 14:41:51 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2004-04-09 Bud Davis <bdavis9659@comcast.net>
+
+ * io.h (ioparm): Interface from FE is 32 bit, irregardless of offset_t.
+ Will need to change this later to support direct access files > 2gb.
+
2004-04-03 Bud Davis <bdavis9659@comcast.net>
PR gfortran/14762
Index: gcc/libgfortran/io/io.h
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/io/Attic/io.h,v
retrieving revision 1.1.2.7
diff -c -3 -p -r1.1.2.7 io.h
*** gcc/libgfortran/io/io.h 1 Apr 2004 01:13:32 -0000 1.1.2.7
--- gcc/libgfortran/io/io.h 9 Apr 2004 14:41:52 -0000
*************** typedef struct
*** 174,180 ****
int *iostat, *exist, *opened, *number, *named, rec, *nextrec, *size;
! offset_t recl_in, *recl_out;
char *file;
int file_len;
--- 174,181 ----
int *iostat, *exist, *opened, *number, *named, rec, *nextrec, *size;
! int recl_in;
! int *recl_out;
char *file;
int file_len;
More information about the Gcc-patches
mailing list