From vazquez@panic.iqm.unicamp.br  Thu Sep 14 15:06:16 2000
Return-Path: <vazquez@panic.iqm.unicamp.br>
Received: from panic.iqm.unicamp.br (panic.iqm.unicamp.br [143.106.51.4])
	by hub.freebsd.org (Postfix) with ESMTP id 2A07037B422
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 14 Sep 2000 15:06:15 -0700 (PDT)
Received: by panic.iqm.unicamp.br (V-MTA, from userid 105)
	id 0BD642072; Thu, 14 Sep 2000 19:05:46 -0300 (BRT)
Message-Id: <20000914220546.0BD642072@panic.iqm.unicamp.br>
Date: Thu, 14 Sep 2000 19:05:46 -0300 (BRT)
From: vazquez@panic.iqm.unicamp.br
Reply-To: vazquez@panic.iqm.unicamp.br
To: FreeBSD-gnats-submit@freebsd.org
Subject: libI77 is unable to handle files >2Gbytes
X-Send-Pr-Version: 3.2

>Number:         21276
>Category:       gnu
>Synopsis:       libI77 is unable to handle files >2Gbytes
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 14 15:10:01 PDT 2000
>Closed-Date:    Thu Nov 13 14:59:31 PST 2003
>Last-Modified:  Thu Nov 13 14:59:31 PST 2003
>Originator:     Pedro Vazquez
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
>Environment:

FreeBSD panic.iqm.unicamp.br 4.1-STABLE FreeBSD 4.1-STABLE #7: Fri Jul 28 14:54:48 BRT 2000     cordeiro@panic.iqm.unicamp.br:/usr/src/sys/compile/PANIC  i386


>Description:

libI77 is unable to handle files greater than 2147627376 bytes (2G),
this makes the g77 (and f2c/gcc too on the latest freebsd versions )
generated binaries unable to deal with large quantum chemistry
calculations, for example

>How-To-Repeat:

Try to create a file bigger than 2G using fortran.
Run any big quantum chemistry ab-initio calculation , I've
old binaries (from 1996) of gaussian (www.gaussian.com)
compiled on FreeBSD2.x that run fine with big files, I found
this when building new binaries with FreeBSD4.x

>Fix:

I'm not sure but it seems this bug may be related to this modification:

/usr/src/contrib/libf2c/libI77/Version.c

/* 19 Jan. 1998: backspace.c: for b->ufmt==0, change sizeof(int) to
                 sizeof(uiolen).  On machines where this would make a
                 difference, it is best for portability to compile libI77 with
                 -DUIOLEN_int (which will render the change invisible). */


According to 
/usr/src/contrib/libf2c/libI77/README.netlib

Unformatted sequential records consist of a length of record
contents, the record contents themselves, and the length of
record contents again (for backspace).  Prior to 17 Oct. 1991,
the length was of type int; now it is of type long, but you
can change it back to int by inserting

#define UIOLEN_int

at the beginning of fio.h.  This affects only sue.c and uio.c .

I'm not an expert on the recent Make buildworld structure to follow
all steps from the import of libf2c into egcs to trace this problem
but I believe somewhere from 1996 to now something was changed
and limited the IO routines to 2G.

>Release-Note:
>Audit-Trail:

From: vazquez@penelope.iqm.unicamp.br
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: gnu/21276: libI77 is unable to handle files >2Gbytes
Date: Mon, 9 Oct 2000 11:44:40 -0200

 --oyUTqETQ0mS9luUI
 Content-Type: text/plain; charset=us-ascii
 
 The following patch allows random direct access files bigger than >2Gbytes
 on FreeBSD/x86, it applies against the netlib libI77 sources. To integrate
 this on gcc would require that autoconf tests all the 32 bit target archs
 for:
 	1) The presence of fseeko/ftello or fseek64/ftell64 or...
 	the appropriate pair of 64bit off_set functions;
 	2) What argument these functions use: off_t, 'long long';
 	3) Other targets (16bit, 64bit, linux/x86) should be left
 	untouched (that is, it seems this patch is specific to *BSD intel)
 
 an alternative way would be to submit these patchs to David Gay at
 Bell (the f2c/lib*77 mantainer) and hope this will be imported on
 gcc sometime and from there into FreeBSD tree.
 
 Pedro
 
 
 
 --oyUTqETQ0mS9luUI
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=diff
 
 Index: Notice
 ===================================================================
 RCS file: /home/Repositorio/libi77/Notice,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: README
 ===================================================================
 RCS file: /home/Repositorio/libi77/README,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: Version.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/Version.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: backspace.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/backspace.c,v
 retrieving revision 1.1
 retrieving revision 1.3
 diff -u -r1.1 -r1.3
 --- backspace.c	2000/10/06 13:27:42	1.1
 +++ backspace.c	2000/10/06 16:15:16	1.3
 @@ -6,7 +6,7 @@
  integer f_back(alist *a)
  #endif
  {	unit *b;
 -	long v, w, x, y, z;
 +	f77_offset v, w, x, y, z;
  	uiolen n;
  	FILE *f;
  
 @@ -30,31 +30,31 @@
  	f = b->ufd;	/* may have changed in t_runc() */
  	if(b->url>0)
  	{
 -		x=ftell(f);
 +		x=FTELL(f);
  		y = x % b->url;
  		if(y == 0) x--;
  		x /= b->url;
  		x *= b->url;
 -		(void) fseek(f,x,SEEK_SET);
 +		(void) FSEEK(f,x,SEEK_SET);
  		return(0);
  	}
  
  	if(b->ufmt==0)
 -	{	fseek(f,-(long)sizeof(uiolen),SEEK_CUR);
 +	{	FSEEK(f,-(long)sizeof(uiolen),SEEK_CUR);
  		fread((char *)&n,sizeof(uiolen),1,f);
 -		fseek(f,-(long)n-2*sizeof(uiolen),SEEK_CUR);
 +		FSEEK(f,-(f77_offset)n-2*sizeof(uiolen),SEEK_CUR);
  		return(0);
  	}
 -	w = x = ftell(f);
 +	w = x = FTELL(f);
  	z = 0;
   loop:
  	while(x) {
  		x -= x < 64 ? x : 64;
 -		fseek(f,x,SEEK_SET);
 +		FSEEK(f,x,SEEK_SET);
  		for(y = x; y < w; y++) {
  			if (getc(f) != '\n')
  				continue;
 -			v = ftell(f);
 +			v = FTELL(f);
  			if (v == w) {
  				if (z)
  					goto break2;
 @@ -65,6 +65,6 @@
  		err(a->aerr,(EOF),"backspace")
  		}
   break2:
 -	fseek(f, z, SEEK_SET);
 +	FSEEK(f, z, SEEK_SET);
  	return 0;
  }
 Index: close.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/close.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: dfe.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/dfe.c,v
 retrieving revision 1.1
 retrieving revision 1.3
 diff -u -r1.1 -r1.3
 --- dfe.c	2000/10/06 13:27:42	1.1
 +++ dfe.c	2000/10/06 16:15:16	1.3
 @@ -81,7 +81,7 @@
  	f__fmtbuf=a->cifmt;
  	if(a->cirec <= 0)
  		err(a->cierr,130,"dfe")
 -	fseek(f__cf,(long)f__curunit->url * (a->cirec-1),SEEK_SET);
 +	FSEEK(f__cf,(f77_offset)f__curunit->url * (a->cirec-1),SEEK_SET);
  	f__curunit->uend = 0;
  	return(0);
  }
 Index: dolio.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/dolio.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: due.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/due.c,v
 retrieving revision 1.1
 retrieving revision 1.3
 diff -u -r1.1 -r1.3
 --- due.c	2000/10/06 13:27:42	1.1
 +++ due.c	2000/10/06 16:15:16	1.3
 @@ -21,7 +21,7 @@
  	if(f__curunit->ufd==NULL) err(a->cierr,114,"cdue")
  	if(a->cirec <= 0)
  		err(a->cierr,130,"due")
 -	fseek(f__cf,(long)(a->cirec-1)*f__curunit->url,SEEK_SET);
 +	FSEEK(f__cf,(f77_offset)(a->cirec-1)*f__curunit->url,SEEK_SET);
  	f__curunit->uend = 0;
  	return(0);
  }
 @@ -55,8 +55,8 @@
  {
  	if(f__curunit->url==1 || f__recpos==f__curunit->url)
  		return(0);
 -	fseek(f__cf,(long)(f__curunit->url-f__recpos),SEEK_CUR);
 -	if(ftell(f__cf)%f__curunit->url)
 +	FSEEK(f__cf,(f77_offset)(f__curunit->url-f__recpos),SEEK_CUR);
 +	if(FTELL(f__cf)%f__curunit->url)
  		err(f__elist->cierr,200,"syserr");
  	return(0);
  }
 Index: endfile.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/endfile.c,v
 retrieving revision 1.1
 retrieving revision 1.2
 diff -u -r1.1 -r1.2
 --- endfile.c	2000/10/06 13:27:42	1.1
 +++ endfile.c	2000/10/06 13:56:20	1.2
 @@ -62,7 +62,7 @@
  t_runc(alist *a)
  #endif
  {
 -	long loc, len;
 +	f77_offset loc, len;
  	unit *b;
  	FILE *bf, *tf;
  	int rc = 0;
 @@ -70,9 +70,9 @@
  	b = &f__units[a->aunit];
  	if(b->url)
  		return(0);	/*don't truncate direct files*/
 -	loc=ftell(bf = b->ufd);
 -	fseek(bf,0L,SEEK_END);
 -	len=ftell(bf);
 +	loc=FTELL(bf = b->ufd);
 +	FSEEK(bf,0L,SEEK_END);
 +	len=FTELL(bf);
  	if (loc >= len || b->useek == 0 || b->ufnm == NULL)
  		return(0);
  	fclose(b->ufd);
 @@ -108,7 +108,7 @@
  		fclose(bf);
  		if (!(bf = fopen(b->ufnm, f__w_mode[3])))
  			goto bad;
 -		fseek(bf,0L,SEEK_END);
 +		FSEEK(bf,0L,SEEK_END);
  		b->urw = 3;
  		}
  #endif
 Index: err.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/err.c,v
 retrieving revision 1.1
 retrieving revision 1.2
 diff -u -r1.1 -r1.2
 --- err.c	2000/10/06 13:27:42	1.1
 +++ err.c	2000/10/06 13:56:20	1.2
 @@ -192,7 +192,7 @@
  f__nowreading(unit *x)
  #endif
  {
 -	long loc;
 +	f77_offset loc;
  	int ufmt, urw;
  	extern char *f__r_mode[], *f__w_mode[];
  
 @@ -201,7 +201,7 @@
  	if (!x->ufnm)
  		goto cantread;
  	ufmt = x->url ? 0 : x->ufmt;
 -	loc = ftell(x->ufd);
 +	loc = FTELL(x->ufd);
  	urw = 3;
  	if (!freopen(x->ufnm, f__w_mode[ufmt|2], x->ufd)) {
  		urw = 1;
 @@ -211,7 +211,7 @@
  			return 1;
  			}
  		}
 -	fseek(x->ufd,loc,SEEK_SET);
 +	FSEEK(x->ufd,loc,SEEK_SET);
  	x->urw = urw;
   done:
  	x->uwrt = 0;
 @@ -239,7 +239,7 @@
  		x->urw = 2;
  		}
  	else {
 -		loc=ftell(x->ufd);
 +		loc=FTELL(x->ufd);
  		if (!(f__cf = x->ufd =
  			freopen(x->ufnm, f__w_mode[ufmt |= 2], x->ufd)))
  			{
 @@ -249,7 +249,7 @@
  			return(1);
  			}
  		x->urw = 3;
 -		fseek(x->ufd,loc,SEEK_SET);
 +		FSEEK(x->ufd,loc,SEEK_SET);
  		}
   done:
  	x->uwrt = 1;
 Index: f2c.h
 ===================================================================
 RCS file: /home/Repositorio/libi77/f2c.h,v
 retrieving revision 1.1
 retrieving revision 1.3
 diff -u -r1.1 -r1.3
 --- f2c.h	2000/10/06 16:20:44	1.1
 +++ f2c.h	2000/10/09 12:59:52	1.3
 @@ -6,7 +6,14 @@
  
  #ifndef F2C_INCLUDE
  #define F2C_INCLUDE
 +#include <unistd.h>
  
 +#ifndef F77_OFFSET
 +typedef int f77_offset;
 +#else
 +typedef F77_OFFSET f77_offset;
 +#endif
 +
  typedef long int integer;
  typedef unsigned long uinteger;
  typedef char *address;
 @@ -36,6 +43,14 @@
  
  /* I/O stuff */
  
 +#ifndef FSEEK
 +#define FSEEK fseek
 +#endif
 +
 +#ifndef FTELL
 +#define FTELL ftell
 +#endif
 +
  #ifdef f2c_i2
  /* for -i2 */
  typedef short flag;
 @@ -117,7 +132,7 @@
  	char	*inunf;
  	ftnlen	inunflen;
  	ftnint	*inrecl;
 -	ftnint	*innrec;
 +	f77_offset	*innrec;
  	char	*inblank;
  	ftnlen	inblanklen;
  } inlist;
 Index: f2ch.add
 ===================================================================
 RCS file: /home/Repositorio/libi77/f2ch.add,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: fio.h
 ===================================================================
 RCS file: /home/Repositorio/libi77/fio.h,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: fmt.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/fmt.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: fmt.h
 ===================================================================
 RCS file: /home/Repositorio/libi77/fmt.h,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: fmtlib.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/fmtlib.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: fp.h
 ===================================================================
 RCS file: /home/Repositorio/libi77/fp.h,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: ftell_.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/ftell_.c,v
 retrieving revision 1.1
 retrieving revision 1.3
 diff -u -r1.1 -r1.3
 --- ftell_.c	2000/10/06 13:27:42	1.1
 +++ ftell_.c	2000/10/06 16:15:16	1.3
 @@ -13,22 +13,23 @@
  	return f__units[Unit].ufd;
  	}
  
 - integer
 +f77_offset
 +/* integer*/
  #ifdef KR_headers
 -ftell_(Unit) integer *Unit;
 +FTELL_(Unit) integer *Unit;
  #else
 -ftell_(integer *Unit)
 +FTELL_(integer *Unit)
  #endif
  {
  	FILE *f;
 -	return (f = unit_chk(*Unit, "ftell")) ? ftell(f) : -1L;
 +	return (f = unit_chk(*Unit, "FTELL")) ? FTELL(f) : -1L;
  	}
  
   int
  #ifdef KR_headers
 -fseek_(Unit, offset, whence) integer *Unit, *offset, *whence;
 +FSEEK_(Unit, offset, whence) integer *Unit, f77_offset *offset, integer *whence;
  #else
 -fseek_(integer *Unit, integer *offset, integer *whence)
 +FSEEK_(integer *Unit, f77_offset *offset, integer *whence)
  #endif
  {
  	FILE *f;
 @@ -41,6 +42,6 @@
  #ifdef SEEK_SET
  	w = wohin[w];
  #endif
 -	return	!(f = unit_chk(*Unit, "fseek"))
 -		|| fseek(f, *offset, w) ? 1 : 0;
 +	return	!(f = unit_chk(*Unit, "FSEEK"))
 +		|| FSEEK(f, *offset, w) ? 1 : 0;
  	}
 Index: iio.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/iio.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: ilnw.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/ilnw.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: inquire.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/inquire.c,v
 retrieving revision 1.1
 retrieving revision 1.2
 diff -u -r1.1 -r1.2
 --- inquire.c	2000/10/06 13:27:42	1.1
 +++ inquire.c	2000/10/06 13:56:20	1.2
 @@ -100,7 +100,7 @@
  	if(a->inrecl!=NULL && p!=NULL)
  		*a->inrecl=p->url;
  	if(a->innrec!=NULL && p!=NULL && p->url>0)
 -		*a->innrec=ftell(p->ufd)/p->url+1;
 +		*a->innrec=FTELL(p->ufd)/p->url+1;
  	if(a->inblank && p!=NULL && p->ufmt)
  		if(p->ublnk)
  			b_char("ZERO",a->inblank,a->inblanklen);
 Index: libI77.xsum
 ===================================================================
 RCS file: /home/Repositorio/libi77/libI77.xsum,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: lio.h
 ===================================================================
 RCS file: /home/Repositorio/libi77/lio.h,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: lread.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/lread.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: lwrite.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/lwrite.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: makefile
 ===================================================================
 RCS file: /home/Repositorio/libi77/makefile,v
 retrieving revision 1.1
 retrieving revision 1.2
 diff -u -r1.1 -r1.2
 --- makefile	2000/10/06 13:27:42	1.1
 +++ makefile	2000/10/09 12:59:52	1.2
 @@ -5,7 +5,7 @@
  
  # compile, then strip unnecessary symbols
  .c.o:
 -	$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
 +	$(CC) -c -DFSEEK=fseeko -DLSEEK=lseeko -DF77OFF=off_t -DSkip_f2c_Undefs $(CFLAGS) $*.c
  	ld -r -x -o $*.xxx $*.o
  	mv $*.xxx $*.o
  ## Under Solaris (and other systems that do not understand ld -x),
 Index: open.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/open.c,v
 retrieving revision 1.1
 retrieving revision 1.2
 diff -u -r1.1 -r1.2
 --- open.c	2000/10/06 13:27:42	1.1
 +++ open.c	2000/10/06 13:56:20	1.2
 @@ -266,7 +266,7 @@
  		if (a->orl)
  			rewind(b->ufd);
  		else if ((s = a->oacc) && (*s == 'a' || *s == 'A')
 -			&& fseek(b->ufd, 0L, SEEK_END))
 +			&& FSEEK(b->ufd, 0L, SEEK_END))
  				opnerr(a->oerr,129,"open");
  	return(0);
  }
 Index: rawio.h
 ===================================================================
 RCS file: /home/Repositorio/libi77/rawio.h,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: rdfmt.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/rdfmt.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: rewind.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/rewind.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: rsfe.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/rsfe.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: rsli.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/rsli.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: rsne.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/rsne.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: sfe.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/sfe.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: sue.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/sue.c,v
 retrieving revision 1.1
 retrieving revision 1.2
 diff -u -r1.1 -r1.2
 --- sue.c	2000/10/06 13:27:42	1.1
 +++ sue.c	2000/10/06 13:56:20	1.2
 @@ -1,7 +1,7 @@
  #include "f2c.h"
  #include "fio.h"
  extern uiolen f__reclen;
 -long f__recloc;
 +f77_offset f__recloc;
  
  #ifdef KR_headers
  c_sue(a) cilist *a;
 @@ -59,25 +59,25 @@
  	f__reclen=0;
  	if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
  		err(a->cierr, errno, "write start");
 -	f__recloc=ftell(f__cf);
 -	(void) fseek(f__cf,(long)sizeof(uiolen),SEEK_CUR);
 +	f__recloc=FTELL(f__cf);
 +	(void) FSEEK(f__cf,(long)sizeof(uiolen),SEEK_CUR);
  	return(0);
  }
  integer e_wsue(Void)
 -{	long loc;
 +{	f77_offset loc;
  	fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf);
  #ifdef ALWAYS_FLUSH
  	if (fflush(f__cf))
  		err(f__elist->cierr, errno, "write end");
  #endif
 -	loc=ftell(f__cf);
 -	fseek(f__cf,f__recloc,SEEK_SET);
 +	loc=FTELL(f__cf);
 +	FSEEK(f__cf,f__recloc,SEEK_SET);
  	fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf);
 -	fseek(f__cf,loc,SEEK_SET);
 +	FSEEK(f__cf,loc,SEEK_SET);
  	return(0);
  }
  integer e_rsue(Void)
  {
 -	(void) fseek(f__cf,(long)(f__reclen-f__recpos+sizeof(uiolen)),SEEK_CUR);
 +	(void) FSEEK(f__cf,(long)(f__reclen-f__recpos+sizeof(uiolen)),SEEK_CUR);
  	return(0);
  }
 Index: typesize.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/typesize.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: uio.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/uio.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: util.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/util.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: wref.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/wref.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: wrtfmt.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/wrtfmt.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: wsfe.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/wsfe.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: wsle.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/wsle.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: wsne.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/wsne.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 Index: xwsne.c
 ===================================================================
 RCS file: /home/Repositorio/libi77/xwsne.c,v
 retrieving revision 1.1
 retrieving revision 1.1.1.1
 diff -u -r1.1 -r1.1.1.1
 
 --oyUTqETQ0mS9luUI--
 

From: Mark Valentine <mark@thuvia.demon.co.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc: vazquez@panic.iqm.unicamp.br, obrien@freebsd.org
Subject: Re: gnu/21276: libI77 is unable to handle files >2Gbytes
Date: Mon, 13 May 2002 02:08:30 +0100 (BST)

 This bug was apparently introduced with the import of contrib/f2c.
 
 Recently the gcc 3.1 version of f2c was imported into FreeBSD 5.0-CURRENT;
 this version appears to address at least part of this issue with the use
 of off_t instead of long.
 
 		Cheers,
 
 		Mark.
 
 -- 
 Mark Valentine, Thuvia Labs <mark@thuvia.co.uk>       <http://www.thuvia.co.uk>
 "Tigers will do ANYTHING for a tuna fish sandwich."       Mark Valentine uses
 "We're kind of stupid that way."   *munch* *munch*        and endorses FreeBSD
   -- <http://www.calvinandhobbes.com>                  <http://www.freebsd.org>
Responsible-Changed-From-To: freebsd-bugs->kan 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Jul 12 17:21:39 PDT 2003 
Responsible-Changed-Why:  
Assign to gcc maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21276 
State-Changed-From-To: open->closed 
State-Changed-By: kan 
State-Changed-When: Thu Nov 13 14:57:56 PST 2003 
State-Changed-Why:  
Fixed in GCC 3.x series. GCC 2.95.x is closed for development. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21276 
>Unformatted:
