Date: Tue, 6 Jan 2004 11:48:28 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Alex <alex@dynaweb.ru> Cc: freebsd-questions@freebsd.org Subject: Re: how to use lseek() system call with over 2G files? Message-ID: <20040106174828.GD38169@dan.emsphone.com> In-Reply-To: <3FFAF127.3080309@dynaweb.ru> References: <3FFAF127.3080309@dynaweb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040106174828.GD38169>