This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Fortran - trunk, committed] Final patch for 64-bit file size support.


L.S.,

I committed the following patch [attached] after I stopped the last
testsuite failure.

Bootstrapped and checked on i686-pc-linux-gnu.

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
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.

*** libI77/Makefile.in.orig	Sat Jul  7 18:31:03 2001
--- libI77/Makefile.in	Sat Jul  7 20:33:34 2001
*************** rdfmt.o:	fio.h config.h
*** 125,129 ****
  rdfmt.o:	fmt.h
  rdfmt.o:	rdfmt.c fp.h
! rewind.o:	rewind.c fio.h
  rsfe.o:		fio.h config.h
  rsfe.o:		rsfe.c fmt.h
--- 125,129 ----
  rdfmt.o:	fmt.h
  rdfmt.o:	rdfmt.c fp.h
! rewind.o:	rewind.c fio.h config.h
  rsfe.o:		fio.h config.h
  rsfe.o:		rsfe.c fmt.h
*************** rsli.o:		rsli.c lio.h
*** 132,136 ****
  rsne.o:		fio.h config.h
  rsne.o:		rsne.c lio.h
! sfe.o:		sfe.c fio.h
  sue.o:		sue.c fio.h config.h
  typesize.o:	typesize.c config.h
--- 132,136 ----
  rsne.o:		fio.h config.h
  rsne.o:		rsne.c lio.h
! sfe.o:		sfe.c fio.h config.h
  sue.o:		sue.c fio.h config.h
  typesize.o:	typesize.c config.h
*************** wref.o:		wref.c fp.h
*** 142,146 ****
  wrtfmt.o:	fio.h config.h
  wrtfmt.o:	wrtfmt.c fmt.h
! wsfe.o:		fio.h
  wsfe.o:		wsfe.c fmt.h
  wsle.o:		fio.h config.h
--- 142,146 ----
  wrtfmt.o:	fio.h config.h
  wrtfmt.o:	wrtfmt.c fmt.h
! wsfe.o:		fio.h config.h
  wsfe.o:		wsfe.c fmt.h
  wsle.o:		fio.h config.h
*** libI77/configure.in.orig	Fri Jul  6 11:07:47 2001
--- libI77/configure.in	Sat Jul  7 18:33:44 2001
*************** AC_TYPE_OFF_T
*** 202,205 ****
--- 202,210 ----
  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)
  
*** libI77/endfile.c.orig	Fri Jul  6 11:18:27 2001
--- libI77/endfile.c	Sat Jul  7 19:41:02 2001
*************** t_runc(alist *a)
*** 112,116 ****
  	if (!(bf = freopen(b->ufnm, f__w_mode[0], bf)))
  		goto bad1;
! 	rewind(tf);
  	if (copy(tf, loc, bf))
  		goto bad1;
--- 112,116 ----
  	if (!(bf = freopen(b->ufnm, f__w_mode[0], bf)))
  		goto bad1;
! 	FSEEK(tf, 0, SEEK_SET);
  	if (copy(tf, loc, bf))
  		goto bad1;
*** libI77/err.c.orig	Fri Jul  6 11:19:03 2001
--- libI77/err.c	Sat Jul  7 19:22:01 2001
*************** f__nowwriting(unit *x)
*** 242,246 ****
  #endif
  {
! 	long loc;
  	int ufmt;
  	extern char *f__w_mode[];
--- 242,246 ----
  #endif
  {
! 	off_t loc;
  	int ufmt;
  	extern char *f__w_mode[];
*** libI77/open.c.orig	Fri Jul  6 11:21:28 2001
--- libI77/open.c	Sat Jul  7 19:43:08 2001
*************** integer f_open(olist *a)
*** 282,286 ****
  	if(b->useek)
  		if (a->orl)
! 			rewind(b->ufd);
  		else if ((s = a->oacc) && (*s == 'a' || *s == 'A')
  			&& FSEEK(b->ufd, 0, SEEK_END))
--- 282,286 ----
  	if(b->useek)
  		if (a->orl)
! 			FSEEK(b->ufd, 0, SEEK_SET);
  		else if ((s = a->oacc) && (*s == 'a' || *s == 'A')
  			&& FSEEK(b->ufd, 0, SEEK_END))
*** libI77/rewind.c.orig	Sat Sep  4 17:09:18 1999
--- libI77/rewind.c	Sat Jul  7 19:41:46 2001
***************
*** 1,2 ****
--- 1,3 ----
+ #include "config.h"
  #include "f2c.h"
  #include "fio.h"
*************** integer f_rew(alist *a)
*** 21,25 ****
  		b->uwrt = 3;
  		}
! 	rewind(b->ufd);
  	b->uend=0;
  	return(0);
--- 22,26 ----
  		b->uwrt = 3;
  		}
! 	FSEEK(b->ufd, 0, SEEK_SET);
  	b->uend=0;
  	return(0);
*** libI77/sfe.c.orig	Sun Mar 12 20:20:47 2000
--- libI77/sfe.c	Sat Jul  7 20:05:31 2001
***************
*** 1,3 ****
--- 1,4 ----
  /* sequential formatted external common routines*/
+ #include "config.h"
  #include "f2c.h"
  #include "fio.h"
*** libI77/wsfe.c.orig	Wed Jul  1 12:30:22 1998
--- libI77/wsfe.c	Sat Jul  7 20:05:57 2001
***************
*** 1,3 ****
--- 1,4 ----
  /*write sequential formatted external*/
+ #include "config.h"
  #include "f2c.h"
  #include "fio.h"
*** libU77/configure.in.orig	Fri Feb  9 08:14:35 2001
--- libU77/configure.in	Sat Jul  7 20:20:59 2001
*************** AC_SUBST(CROSS)
*** 108,110 ****
--- 108,116 ----
  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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]