O_DIRECT flag undefined
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
O_DIRECT flag undefined
- To: arm-gnu@xxxxxxxxxxxxxxxx
- Subject: O_DIRECT flag undefined
- From: "Bahadir Balban" <bilgehan.balban@xxxxxxxxx>
- Date: Tue, 4 Apr 2006 17:05:34 +0000
Hi,
I have two toolchains: arm-none-linux-gnueabi-2005q3 and
arm-linux-2004q3. In both, O_DIRECT flag is undefined if I want to
compile an application using open() with this flag.
In 2004q3 in arm-linux/include/bits/fcntl.h there's a define:
#ifdef __USE_GNU
# define O_DIRECTORY 040000 /* Must be a directory. */
# define O_NOFOLLOW 0100000 /* Do not follow links. */
# define O_DIRECT 0200000 /* Direct disk access. */
#endif
Why are they guarded with __USE_GNU? If I define O_DIRECT myself in
fcntl.h, then I get Invalid argument error at runtime.
I was unable to locate a similar header in 2005q3. How could I use
O_DIRECT in my application, preferably with 2004q3 toolchain? Is it an
unsupported flag?
Many thanks,
Bahadir