From owner-freebsd-questions@FreeBSD.ORG Tue Jan 6 09:48:51 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E435B16A4CE for ; Tue, 6 Jan 2004 09:48:51 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3EF743D31 for ; Tue, 6 Jan 2004 09:48:47 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i06HmSw6068386; Tue, 6 Jan 2004 11:48:28 -0600 (CST) (envelope-from dan) Date: Tue, 6 Jan 2004 11:48:28 -0600 From: Dan Nelson To: Alex Message-ID: <20040106174828.GD38169@dan.emsphone.com> References: <3FFAF127.3080309@dynaweb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FFAF127.3080309@dynaweb.ru> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.5.1i cc: freebsd-questions@freebsd.org Subject: Re: how to use lseek() system call with over 2G files? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2004 17:48:52 -0000 In the last episode (Jan 06), Alex said: > Hi everybody! > > Some time ago there wasn't any possibility to create disk file larger > than 2G and there was no problem with lseek(). Some time ago meaning around 1997? FreeBSD has had 64-bit file access since at least 2.2.0. I don't remember if earlier versions had support for it or not. > But as for now we can do it but I looked into headers and found off_t is > equal to long -> no more than 2G on i386 machines. Actually, off_t is equal to __int64_t, which is a long long. Which headers are you looking at? FreeBSD 4.x: /usr/include/machine/ansi.h:69:#define _BSD_OFF_T_ __int64_t /usr/include/sys/types.h:82:typedef _BSD_OFF_T_ off_t; /* file offset */ FreeBSD 5.x: /usr/include/sys/_types.h:49:typedef __int64_t __off_t; /* file offset */ /usr/include/sys/types.h:194:typedef __off_t off_t; /* file offset */ -- Dan Nelson dnelson@allantgroup.com