diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-03-20 16:04:42 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-03-20 16:04:42 -0400 |
commit | 153619ee1dfd04c654c0075ad2daa6d3aa57dcea (patch) | |
tree | 232f7b760f7d164b1cbcada5ca60e390929900da /src/include | |
parent | 123c0bd6a2cf96c2fd17d542f537257b9de8a8b9 (diff) | |
download | mongo-153619ee1dfd04c654c0075ad2daa6d3aa57dcea.tar.gz |
Push the rest of the FILE handle functions down into the OS-specific
code, get rid of all calls to __wt_errno() from the upper-level code.
Rename the WiredTiger FILE handle functions to match stdio(3).
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/extern.h | 7 | ||||
-rw-r--r-- | src/include/misc.h | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/include/extern.h b/src/include/extern.h index e977ff5c96e..a27fb587069 100644 --- a/src/include/extern.h +++ b/src/include/extern.h @@ -485,8 +485,11 @@ extern int __wt_rename(WT_SESSION_IMPL *session, const char *from, const char *t extern int __wt_read( WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t offset, size_t len, void *buf); extern int __wt_write(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t offset, size_t len, const void *buf); extern void __wt_sleep(uint64_t seconds, uint64_t micro_seconds); -extern int __wt_fp_open(WT_SESSION_IMPL *session, const char *name, const char *mode, FILE **fpp); -extern int __wt_fp_close(WT_SESSION_IMPL *session, FILE **fpp); +extern int __wt_fopen(WT_SESSION_IMPL *session, const char *name, const char *mode, u_int flags, FILE **fpp); +extern int __wt_vfprintf(WT_SESSION_IMPL *session, FILE *fp, const char *fmt, va_list ap); +extern int __wt_fprintf(WT_SESSION_IMPL *session, FILE *fp, const char *fmt, ...) WT_GCC_FUNC_DECL_ATTRIBUTE((format (printf, 3, 4))); +extern int __wt_fflush(WT_SESSION_IMPL *session, FILE *fp); +extern int __wt_fclose(WT_SESSION_IMPL *session, FILE **fpp); extern uint64_t __wt_strtouq(const char *nptr, char **endptr, int base); extern int __wt_thread_create(WT_SESSION_IMPL *session, wt_thread_t *tidret, void *(*func)(void *), void *arg); extern int __wt_thread_join(WT_SESSION_IMPL *session, wt_thread_t tid); diff --git a/src/include/misc.h b/src/include/misc.h index 02b21db6b1f..5e8122316a3 100644 --- a/src/include/misc.h +++ b/src/include/misc.h @@ -32,6 +32,11 @@ #define WT_DIRLIST_INCLUDE 0x2 /* Include files matching prefix */ /* + * FILE handle open configuration. + */ +#define WT_FOPEN_FIXED 0x1 /* Path isn't relative to home */ + +/* * Sizes that cannot be larger than 2**32 are stored in uint32_t fields in * common structures to save space. To minimize conversions from size_t to * uint32_t through the code, we use the following macros. |