[lug] Max file size
John Karns
jkarns at csd.net
Tue Dec 18 14:30:44 MST 2001
Thanx much - should prove very useful!
----------------------------------------------------------------
John Karns jkarns at csd.net
On Tue, 18 Dec 2001, D. Stimits said:
> Use these: "-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64". It is the 2nd
> part that gives you O_LARGEFILE on open, but GNU_SOURCE is a handy
> catch-all for several other useful things. Refer to the comment
> near the top of /usr/include/features.h which describes each flag.
>
> Here's a quick-fire way to test this...
> # strace /usr/bin/tcsh -c 'echo > /tmp/blop' |& grep 'open("/tmp/blop"'
> open("/tmp/blop", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
>
> And compiled with the above flags...
> # strace ./tcsh -c 'echo > /tmp/blop' |& grep 'open("/tmp/blop"'
> open("/tmp/blop", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
> </quote>
More information about the LUG
mailing list