Re: [AD] bugfix for files > 2GB under unix

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


That's odd; it doesn't mention any of that in my man pages. What
version have you got?

When I compile this
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdint.h>

int main(void) {
 struct stat ss;
 printf("%d\n", sizeof(ss.st_size));
 return 0;
}
it gives me the answer '8', from which I inferred that st_size is 64 bits.

Pete


On 5/22/06, Chris <chris.kcat@xxxxxxxxxx> wrote:
On Sunday 21 May 2006 13:26, Peter Hull wrote:
> OSX doesn't (AFAICS) have stat64, but the file size field of struct
> stat is defined as off_t, which is 64-bit.

Not on 32-bit systems by default. According to my man pages:

The  library  routine lseek() uses the type off_t.  This is a 32-bit signed
type on 32-bit architectures, unless one compiles with

       #define _FILE_OFFSET_BITS 64

in which case it is a 64-bit signed type.


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/