Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Dec 1998 20:25:32 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        freebsd-current@FreeBSD.ORG
Subject:   PR bin/8637 fgetpos()/fsetpos() limited to 32 bits
Message-ID:  <199812130425.UAA16020@apollo.backplane.com>

next in thread | raw e-mail | index | archive | help
    This is an interesting one.  fgetpos() and fsetpos() utilizes
    fpos_t holding storage, which is 64 bits.  However, both of these
    routines use ftell() and fseek() internally which truncate offsets to
    32 bits.

    I've also examined the FILE structure which appears to store the offset
    as an fpos_t, a 64 bit quantity.

    It should therefore be relatively easy to fix fgetpos() and fsetpos()
    to operate with > 32 bit quantities (as, I think, they were meant to)
    without changing any critical structures.

    It would also be great if we could generate quad versions for fseek and
    ftell as well (since they'd have to be written anyway to support fgetpos()
    and fsetpos()).  

    I would put forth fqtell() and fqseek() unless there is some defacto
    standard already in place.  These functions would use the same typing
    as lseek().  i.e. off_t.

						-Matt

    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet 
                    Communications & God knows what else.
    <dillon@backplane.com> (Please include original email in any response)    

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



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