From owner-freebsd-hackers Wed Apr 29 14:43:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA08217 for freebsd-hackers-outgoing; Wed, 29 Apr 1998 14:43:45 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail-out1.apple.com (mail-out1.apple.com [17.254.0.52]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA08110 for ; Wed, 29 Apr 1998 14:43:14 -0700 (PDT) (envelope-from conrad@apple.com) Received: from scv3.apple.com (A17-128-100-121.apple.com [17.128.100.121]) by mail-out1.apple.com (8.8.5/8.8.5) with ESMTP id OAA17256; Wed, 29 Apr 1998 14:31:52 -0700 Received: from [17.202.43.185] (wa.apple.com [17.202.43.185]) by scv3.apple.com (8.8.5/8.8.5) with ESMTP id OAA22176; Wed, 29 Apr 1998 14:31:51 -0700 X-Sender: conrad@mail.apple.com Message-Id: In-Reply-To: <19980429150055.A17639@emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 29 Apr 1998 14:31:49 -0700 To: Dan Nelson From: Conrad Minshall Subject: Re: how to fseek past 2GB? Cc: freebsd-hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 1:00 PM -0700 4/29/98, Dan Nelson wrote: >I recently noticed that there is no way to fseek() past the 2GB mark on >files opened with fopen(). The offset in the FILE struct is an fpos_t; >there's just no way to get at it. > >fseek(), unfortunately, is cursed with a "long" file offset, so that >can't change. [...] >Is there a "standard" function name for a fseek() function that takes >an off_t or fpos_t? Yes, and the name is "fseeko". The "Large File Summit" standard includes it and everything else for 64 bit file offsets. X/Open (now Open Group) adopted the standard into Unix98 (officially called Single Unix Specification, Version 2) Search Unix98 at: http://www.opengroup.org/onlinepubs/7908799/index.html or see the much more readable book "Go Solo 2", chapter 15, "Large File Support". -- Conrad Minshall mailto:conrad@apple.com If "conrad@apple.com" doesn't work, try using rad@acm.org. Picon viewable at: http://facesaver.usenix.org/faces/h/49/4974.htm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message