re PR libfortran/25289 (Cannot handle record numbers large than huge(0_4))
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 24 Jul 2006 00:17:52 +0000 (00:17 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 24 Jul 2006 00:17:52 +0000 (00:17 +0000)
2006-07-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/25289
* libgfortran.h: Add conditional definition of GFC_LARGE_IO_INT type.
* io/io.h (st_parameter_dt): Define rec as type GFC_LARGE_IO_INT.

From-SVN: r115698

libgfortran/ChangeLog
libgfortran/io/io.h
libgfortran/libgfortran.h

index c19ac41accba1e628ee4a8831ea5a605cc7fa77d..58ef0aafea6e273eea6986db687764a1be0ad4ff 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/25289
+       * libgfortran.h: Add conditional definition of GFC_LARGE_IO_INT type.
+       * io/io.h (st_parameter_dt): Define rec as type GFC_LARGE_IO_INT.
+
 2006-07-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/28339
index 822930e776a4778e2503b36bac388cf20dabbf84..e16d4b6ec02546a2f078125793bd3752950e4630 100644 (file)
@@ -351,7 +351,7 @@ struct format_data;
 typedef struct st_parameter_dt
 {
   st_parameter_common common;
-  GFC_INTEGER_4 rec;
+  GFC_LARGE_IO_INT rec;
   GFC_INTEGER_4 *size, *iolength;
   gfc_array_char *internal_unit_desc;
   CHARACTER1 (format);
index 5dd2a51e1e0cc2cdd7451b528d35c8571bd56b76..27abfe8b7be87afe9a46e287b22a84a84d61365e 100644 (file)
@@ -196,6 +196,18 @@ typedef off_t gfc_offset;
 
 #include "kinds.h"
 
+/* Define the type used for the current record number for large file I/O.
+   The size must be consistent with the size defined on the compiler side.  */
+#ifdef HAVE_GFC_INTEGER_8
+typedef GFC_INTEGER_8 GFC_LARGE_IO_INT;
+#else
+#ifdef HAVE_GFC_INTEGER_4
+typedef GFC_INTEGER_4 GFC_LARGE_IO_INT;
+#else
+#error "GFC_INTEGER_4 should be available for the library to compile".
+#endif
+#endif
+
 /* The following two definitions must be consistent with the types used
    by the compiler.  */
 /* The type used of array indices, amongst other things.  */