22 #ifndef XAPIAN_INCLUDED_SAFEFCNTL_H 23 #define XAPIAN_INCLUDED_SAFEFCNTL_H 35 inline int open(
const char *filename, int64_t flags, ...) {
39 if (flags & O_CREAT) {
40 mode = va_arg(ap, mode_t);
44 char* f =
const_cast<char*
>(filename);
45 return open64x(f, flags, mode, 0);
48 #elif defined __cplusplus && defined open 56 inline int fcntl_open_(
const char *filename,
int flags, mode_t mode) {
57 return open(filename, flags, mode);
60 inline int fcntl_open_(
const char *filename,
int flags) {
61 return open(filename, flags);
66 inline int open(
const char *filename,
int flags, mode_t mode) {
67 return fcntl_open_(filename, flags, mode);
70 inline int open(
const char *filename,
int flags) {
71 return fcntl_open_(filename, flags);
87 # define O_CLOEXEC O_NOINHERIT WritableDatabase open()
Construct a WritableDatabase object for a new, empty InMemory database.