+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.
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
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
/* 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
+
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
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:
}
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;
f__nowwriting(unit *x)
#endif
{
- long loc;
+ off_t loc;
int ufmt;
extern char *f__w_mode[];
#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");
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#ifdef KR_headers
(void) t_runc(a);
b->uwrt = 3;
}
- rewind(b->ufd);
+ FSEEK(b->ufd, 0, SEEK_SET);
b->uend=0;
return(0);
}
/* sequential formatted external common routines*/
+#include "config.h"
#include "f2c.h"
#include "fio.h"
/*write sequential formatted external*/
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "fmt.h"
/* 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
+
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;
+
+# 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
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)