Does any of this help?
http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#O_LARGEFILE
--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:aaa...@daimi.au.dk
for(_=52;_;(_%5)||(_/=5),(_%5)&&(_-=2))putchar(_);
On my i386 system, you have to do the following:
#define __USE_LARGEFILE64
#include <fcntl.h>
In that order. (or just compile with -D__USE_LARGEFILE64) Then you
should have the definition, so you can open(2) the file according to
Kasper's page.
-Marcus
Yes it is.
> Who has any experience?
Me. What is your question? :-)
To get large file access to work, you need to
#define _FILE_OFFSET_BITS 64
#define _LARGEFILE_SOURCE
#define _LARGE_FILES
before you include any other header files. This enables large
file access for the open/read/write/lseek/close family of
functions. I'm not sure if it also works for fopen/fread etc.
The above should work form most platforms. If you want to detect
this stuff using GNU Autoconf you can use the AC_SYS_LARGEFILE
macro. However, I found that didn't work too well and wrapped
some other stuff around it for libsndfile:
http://www.zip.com.au/~erikd/libsndfile/
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo nos...@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"If you don't know what you need Windows NT for, you don't need it."
- Bill Gates
> Jt wrote:
>> If include <bits/fcntl.h> the compiler tells me include <fcntl.h> instead;
>> but if include <fcntl.h> it tells me O_LARGEFILE not defined.
>> I've heard that O_LARGEFILE is supported in linux 2.4.0 and later.
>> Who has any experience?
>
> On my i386 system, you have to do the following:
>
> #define __USE_LARGEFILE64
> #include <fcntl.h>
Read the glibc manual on "Feature Test Macros" or check <features.h>
directly. You have to define _LARGEFILE_SOURCE before the inclusion
of any header.
Andreas
--
Andreas Jaeger
SuSE Labs a...@suse.de
private a...@arthur.inka.de
http://www.suse.de/~aj
#ifndef O_LARGEFILE
#define O_LARGEFILE 0100000
#endif
"Jt" <globa...@sina.com> 写入消息新闻:b9qjs7$7q$1...@mail.cn99.com...