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