summaryrefslogtreecommitdiff
path: root/libf2c
diff options
context:
space:
mode:
authortoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-07 18:51:58 +0000
committertoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-07 18:51:58 +0000
commitb6ca72c14870fed51f237749dbcd81c20c25d56e (patch)
tree0e9048262cf61415ec252824aa1caef619989bdb /libf2c
parent9e5acf3ba2c720cc66c100d1f5505ada93d8aa3e (diff)
downloadgcc-b6ca72c14870fed51f237749dbcd81c20c25d56e.tar.gz
2001-07-07 Toon Moene <toon@moene.indiv.nluug.nl>
* libI77/Makefile.in: Update config.h dependencies. * libI77/configure.in: Define _XOPEN_SOURCE and _FILE_OFFSET_BITS unconditionally. * libI77/configure: Rebuilt. * libI77/config.h.in: Rebuilt. * libI77/endfile.c (t_runc): Replace rewind by FSEEK. * libI77/err.c (f__nowwriting): The type of `loc' is off_t. * libI77/open.c (f_open): Replace rewind by FSEEK. * libI77/rewind.c: Include config.h. (f_rew): Replace rewind by FSEEK. * libI77/sfe.c: Include config.h. * libI77/wsfe.c: Ditto. * libU77/configure.in: Define _XOPEN_SOURCE and _FILE_OFFSET_BITS unconditionally. * libU77/configure: Rebuilt. * libU77/config.hin: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43841 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c')
-rw-r--r--libf2c/ChangeLog19
-rw-r--r--libf2c/libI77/Makefile.in6
-rw-r--r--libf2c/libI77/config.h.in6
-rwxr-xr-xlibf2c/libI77/configure11
-rw-r--r--libf2c/libI77/configure.in5
-rw-r--r--libf2c/libI77/endfile.c2
-rw-r--r--libf2c/libI77/err.c2
-rw-r--r--libf2c/libI77/open.c2
-rw-r--r--libf2c/libI77/rewind.c3
-rw-r--r--libf2c/libI77/sfe.c1
-rw-r--r--libf2c/libI77/wsfe.c1
-rw-r--r--libf2c/libU77/config.hin7
-rwxr-xr-xlibf2c/libU77/configure14
-rw-r--r--libf2c/libU77/configure.in6
14 files changed, 77 insertions, 8 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog
index 3b93925d9cf..906d430b129 100644
--- a/libf2c/ChangeLog
+++ b/libf2c/ChangeLog
@@ -1,5 +1,24 @@
2001-07-07 Toon Moene <toon@moene.indiv.nluug.nl>
+ * libI77/Makefile.in: Update config.h dependencies.
+ * libI77/configure.in: Define _XOPEN_SOURCE and
+ _FILE_OFFSET_BITS unconditionally.
+ * libI77/configure: Rebuilt.
+ * libI77/config.h.in: Rebuilt.
+ * libI77/endfile.c (t_runc): Replace rewind by FSEEK.
+ * libI77/err.c (f__nowwriting): The type of `loc' is off_t.
+ * libI77/open.c (f_open): Replace rewind by FSEEK.
+ * libI77/rewind.c: Include config.h. (f_rew): Replace
+ rewind by FSEEK.
+ * libI77/sfe.c: Include config.h.
+ * libI77/wsfe.c: Ditto.
+ * libU77/configure.in: Define _XOPEN_SOURCE and
+ _FILE_OFFSET_BITS unconditionally.
+ * libU77/configure: Rebuilt.
+ * libU77/config.hin: Rebuilt.
+
+2001-07-07 Toon Moene <toon@moene.indiv.nluug.nl>
+
* libI77/Makefile.in: Add necessary dependencies on config.h.
2001-07-06 Toon Moene <toon@moene.indiv.nluug.nl>
diff --git a/libf2c/libI77/Makefile.in b/libf2c/libI77/Makefile.in
index 28bfa34cee8..8cccf8550c9 100644
--- a/libf2c/libI77/Makefile.in
+++ b/libf2c/libI77/Makefile.in
@@ -124,14 +124,14 @@ open.o: open.c fio.h rawio.h config.h
rdfmt.o: fio.h config.h
rdfmt.o: fmt.h
rdfmt.o: rdfmt.c fp.h
-rewind.o: rewind.c fio.h
+rewind.o: rewind.c fio.h config.h
rsfe.o: fio.h config.h
rsfe.o: rsfe.c fmt.h
rsli.o: fio.h
rsli.o: rsli.c lio.h
rsne.o: fio.h config.h
rsne.o: rsne.c lio.h
-sfe.o: sfe.c fio.h
+sfe.o: sfe.c fio.h config.h
sue.o: sue.c fio.h config.h
typesize.o: typesize.c config.h
uio.o: uio.c fio.h
@@ -141,7 +141,7 @@ wref.o: fmt.h
wref.o: wref.c fp.h
wrtfmt.o: fio.h config.h
wrtfmt.o: wrtfmt.c fmt.h
-wsfe.o: fio.h
+wsfe.o: fio.h config.h
wsfe.o: wsfe.c fmt.h
wsle.o: fio.h config.h
wsle.o: fmt.h
diff --git a/libf2c/libI77/config.h.in b/libf2c/libI77/config.h.in
index 9bd85163b18..c784d105f6e 100644
--- a/libf2c/libI77/config.h.in
+++ b/libf2c/libI77/config.h.in
@@ -51,3 +51,9 @@
/* Define to skip f2c undefs. */
#undef Skip_f2c_Undefs
+/* Get Single Unix Specification semantics */
+#undef _XOPEN_SOURCE
+
+/* Get 64-bit file size support */
+#undef _FILE_OFFSET_BITS
+
diff --git a/libf2c/libI77/configure b/libf2c/libI77/configure
index d44e657e59c..8defe25d1d1 100755
--- a/libf2c/libI77/configure
+++ b/libf2c/libI77/configure
@@ -1706,6 +1706,17 @@ cat >> confdefs.h <<\EOF
EOF
+# These defines are necessary to get 64-bit file size support.
+
+cat >> confdefs.h <<\EOF
+#define _XOPEN_SOURCE 500L
+EOF
+
+cat >> confdefs.h <<\EOF
+#define _FILE_OFFSET_BITS 64
+EOF
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
diff --git a/libf2c/libI77/configure.in b/libf2c/libI77/configure.in
index de38d6d635d..5ac1b622361 100644
--- a/libf2c/libI77/configure.in
+++ b/libf2c/libI77/configure.in
@@ -201,6 +201,11 @@ AC_TYPE_OFF_T
AC_DEFINE(Skip_f2c_Undefs, 1, [Define to skip f2c undefs.])
+# These defines are necessary to get 64-bit file size support.
+
+AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics])
+AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
+
AC_OUTPUT(Makefile)
dnl We might have configuration options to:
diff --git a/libf2c/libI77/endfile.c b/libf2c/libI77/endfile.c
index 859eb314f4d..14b51f043c4 100644
--- a/libf2c/libI77/endfile.c
+++ b/libf2c/libI77/endfile.c
@@ -111,7 +111,7 @@ t_runc(alist *a)
}
if (!(bf = freopen(b->ufnm, f__w_mode[0], bf)))
goto bad1;
- rewind(tf);
+ FSEEK(tf, 0, SEEK_SET);
if (copy(tf, loc, bf))
goto bad1;
b->uwrt = 1;
diff --git a/libf2c/libI77/err.c b/libf2c/libI77/err.c
index 5cafab70734..1c21f198cdb 100644
--- a/libf2c/libI77/err.c
+++ b/libf2c/libI77/err.c
@@ -241,7 +241,7 @@ f__nowwriting(x) unit *x;
f__nowwriting(unit *x)
#endif
{
- long loc;
+ off_t loc;
int ufmt;
extern char *f__w_mode[];
diff --git a/libf2c/libI77/open.c b/libf2c/libI77/open.c
index e28faafbdcc..75c8971b7b7 100644
--- a/libf2c/libI77/open.c
+++ b/libf2c/libI77/open.c
@@ -281,7 +281,7 @@ integer f_open(olist *a)
#endif
if(b->useek)
if (a->orl)
- rewind(b->ufd);
+ FSEEK(b->ufd, 0, SEEK_SET);
else if ((s = a->oacc) && (*s == 'a' || *s == 'A')
&& FSEEK(b->ufd, 0, SEEK_END))
opnerr(a->oerr,129,"open");
diff --git a/libf2c/libI77/rewind.c b/libf2c/libI77/rewind.c
index 9ba4b239f32..06915195d67 100644
--- a/libf2c/libI77/rewind.c
+++ b/libf2c/libI77/rewind.c
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#ifdef KR_headers
@@ -20,7 +21,7 @@ integer f_rew(alist *a)
(void) t_runc(a);
b->uwrt = 3;
}
- rewind(b->ufd);
+ FSEEK(b->ufd, 0, SEEK_SET);
b->uend=0;
return(0);
}
diff --git a/libf2c/libI77/sfe.c b/libf2c/libI77/sfe.c
index 77ade5b5a7f..b67d823cf7c 100644
--- a/libf2c/libI77/sfe.c
+++ b/libf2c/libI77/sfe.c
@@ -1,4 +1,5 @@
/* sequential formatted external common routines*/
+#include "config.h"
#include "f2c.h"
#include "fio.h"
diff --git a/libf2c/libI77/wsfe.c b/libf2c/libI77/wsfe.c
index babfb3479d9..490231ac75a 100644
--- a/libf2c/libI77/wsfe.c
+++ b/libf2c/libI77/wsfe.c
@@ -1,4 +1,5 @@
/*write sequential formatted external*/
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "fmt.h"
diff --git a/libf2c/libU77/config.hin b/libf2c/libU77/config.hin
index 19f5399d538..d0fc0adf658 100644
--- a/libf2c/libU77/config.hin
+++ b/libf2c/libU77/config.hin
@@ -110,3 +110,10 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+
+/* Get Single Unix Specification semantics */
+#undef _XOPEN_SOURCE
+
+/* Get 64-bit file size support */
+#undef _FILE_OFFSET_BITS
+
diff --git a/libf2c/libU77/configure b/libf2c/libU77/configure
index 713704226c0..e0095463ae7 100755
--- a/libf2c/libU77/configure
+++ b/libf2c/libU77/configure
@@ -1060,7 +1060,7 @@ else
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
+typedef int charset[2]; const charset x = {0,0};
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@@ -1652,6 +1652,18 @@ test $ac_cv_func_clock = yes && MAYBES="$MAYBES mclock_.o"
+
+# These defines are necessary to get 64-bit file size support.
+
+cat >> confdefs.h <<\EOF
+#define _XOPEN_SOURCE 500L
+EOF
+
+cat >> confdefs.h <<\EOF
+#define _FILE_OFFSET_BITS 64
+EOF
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
diff --git a/libf2c/libU77/configure.in b/libf2c/libU77/configure.in
index 03bfe660a51..d5cecee4185 100644
--- a/libf2c/libU77/configure.in
+++ b/libf2c/libU77/configure.in
@@ -107,4 +107,10 @@ AC_SUBST(MAYBES)
AC_SUBST(CROSS)
AC_SUBST(RANLIB)
AC_SUBST(RANLIB_TEST)
+
+# These defines are necessary to get 64-bit file size support.
+
+AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics])
+AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
+
AC_OUTPUT(Makefile)