NetBSD Problem Report #6637

Received: (qmail 13338 invoked from network); 22 Dec 1998 20:45:50 -0000
Message-Id: <>
Date: Tue, 22 Dec 1998 15:48:18 -0500 (EST)
From: Phil Budne <>
Subject: libc does not support 64-bit file offsets; fgetpos truncates
X-Send-Pr-Version: 3.95

>Number:         6637
>Category:       standards
>Synopsis:       libc does not support 64-bit file offsets; fgetpos truncates
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kleink
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 22 12:50:00 +0000 1998
>Closed-Date:    Mon Sep 25 08:36:16 +0000 2000
>Last-Modified:  Mon Sep 25 08:36:16 +0000 2000
>Originator:     Phil Budne
>Release:        12/18/98
	little or none
	pc532, 1.3I
System: NetBSD pc532 1.3I NetBSD 1.3I (DDB) #0: Fri Dec 18 18:31:13 EST 1998 phil@pc532:/usr/src/sys-981218/arch/pc532/compile/DDB pc532

	fgetpos(3) truncates file position to 32-bits, despite
	returning value via fpos_t (cause it uses ftell) on systems
	where sizeof long is larger than sizeof fpos_t (anything but
	alpha or sparc64?)

	seems to have been recently send-pr'ed on FreeBSD (pr bin/8637)

	read lots of data, call fgetpos().

	Implement X/Open Large File Support functions ftello(), fseeko
		which use off_t rather than long for file offsets.
		Implement ftell, fseek using fello, fseeko.  ftell(),
		fseek() should fail with EOVERFLOW when file offset
		cannot be represented as a long.

	Add __warn_references() for ftell, fseek advising use
		of ftello/fgetpos fseeko/fsetpos??

		for other baggage in the Large File Support extension.
State-Changed-From-To: open->analyzed 
State-Changed-By: kleink 
State-Changed-When: Tue Dec 22 13:17:37 PST 1998 
The LFS proposal has been included in XSH5, hence it's a standards category 
question, which will be handled. 

Responsible-Changed-From-To: lib-bug-people->kleink 
Responsible-Changed-By: kleink 
Responsible-Changed-When: Tue Dec 22 13:17:37 PST 1998 
I've recently implemented the necessary changes and will commit them as soon 
as I get back from the holidays. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: kleink 
State-Changed-When: Mon Sep 25 01:35:58 PDT 2000 

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.