* Map O_NOTRAVERSE to rarely used or non portable O_ modes if possible.

* Fixed indentation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34286 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-11-26 16:02:07 +00:00
parent 4dafc3b298
commit 64266621a2

View File

@ -62,14 +62,17 @@ extern ssize_t writev_pos(int fd, off_t pos, const struct iovec *vec,
size_t count);
// There's no O_NOTRAVERSE under Linux and FreeBSD, but there's a O_NOFOLLOW, which
// means something different (open() fails when the file is a symlink), but
// we can abuse this flag for our purposes (we filter it in libroot).
// There's no O_NOTRAVERSE under Linux and FreeBSD -- we replace it with a flag
// that won't be used by our tools, preferrably a non-portable one; a fixed
// constant could always lead to trouble on the host.
// We can abuse this flag for our purposes as we filter it in libroot.
#ifndef O_NOTRAVERSE
#ifdef O_NOFOLLOW
#define O_NOTRAVERSE O_NOFOLLOW
# ifdef O_NOCTTY
# define O_NOTRAVERSE O_NOCTTY
# elif defined(O_RANDOM)
# define O_NOTRAVERSE O_RANDOM
# else
#define O_NOTRAVERSE 0
# error "Search for a proper replacement value for O_NOTRAVERSE"
# endif
#endif
@ -86,7 +89,7 @@ extern char *_haiku_build_strerror(int errnum);
#undef strerror
#define strerror(errnum) _haiku_build_strerror(errnum)
#endif
#endif // BUILDING_HAIKU_ERROR_MAPPER
#ifdef __cplusplus
} // extern "C"