Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Nov 1998 11:09:55 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        Thomas David Rivers <rivers@dignus.com>, freebsd-hackers@freefall.cdrom.com
Subject:   Re: A stdio question...  does fpos_t really need to be 'long long'?
Message-ID:  <19981109110955.A5248@emsphone.com>
In-Reply-To: <199811091627.LAA23614@lakes.dignus.com>; from "Thomas David Rivers" on Mon Nov  9 11:27:10 GMT 1998
References:  <199811091627.LAA23614@lakes.dignus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Nov 09), Thomas David Rivers said:
> Ok - here's a question for the stdio internal gurus...
> 
> ftell() is defined to return a 'long' (32 bits).
> fpos_t is defined as a 'long long' (64 bits).
> fgetpos() accepts an fpos_t as it's second argument, and is
> implemented as:
>
> 	  retval = (*pos = ftell(fp)) == (fpos_t) -1;
> 	  return (retval);
>
> If this is the case... then why is fpos_t a 'long long'?  If, in
> fact, it can never be set that large?

I noticed this back in April and commented on it.  I believe the
consensus was that fsetpos()/fgetpos()/fseek()/ftell() should be
wrappers for the X/Open functions fseeko() and ftello(), which take
off_t arguments.

Unfortunately, I never submitted patches, and neither did anyone else.

	-Dan Nelson
	dnelson@emsphone.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981109110955.A5248>