diff options
author | drh <drh@noemail.net> | 2013-04-22 23:59:06 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-04-22 23:59:06 +0000 |
commit | 16fb176814bd2b8fe46f7ed0e50a0b3d33db89a0 (patch) | |
tree | 95791389bfc2d16f158af35b89e36fd39b23cc53 /src/os.c | |
parent | 8bc8bfcb05ab15cac3c84b137b572350beb4de65 (diff) | |
parent | da8caa0b2da85ebaf75fce1b19f5d645246f3eba (diff) | |
download | sqlite-16fb176814bd2b8fe46f7ed0e50a0b3d33db89a0.tar.gz sqlite-16fb176814bd2b8fe46f7ed0e50a0b3d33db89a0.zip |
Merge the latest trunk changes into the sessions branch.
FossilOrigin-Name: 6994826c0784280f2e9728dfa4185848846d03df
Diffstat (limited to 'src/os.c')
-rw-r--r-- | src/os.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -141,6 +141,26 @@ int sqlite3OsShmMap( return id->pMethods->xShmMap(id, iPage, pgsz, bExtend, pp); } +#if SQLITE_MAX_MMAP_SIZE>0 +/* The real implementation of xFetch and xUnfetch */ +int sqlite3OsFetch(sqlite3_file *id, i64 iOff, int iAmt, void **pp){ + DO_OS_MALLOC_TEST(id); + return id->pMethods->xFetch(id, iOff, iAmt, pp); +} +int sqlite3OsUnfetch(sqlite3_file *id, i64 iOff, void *p){ + return id->pMethods->xUnfetch(id, iOff, p); +} +#else +/* No-op stubs to use when memory-mapped I/O is disabled */ +int sqlite3OsFetch(sqlite3_file *id, i64 iOff, int iAmt, void **pp){ + *pp = 0; + return SQLITE_OK; +} +int sqlite3OsUnfetch(sqlite3_file *id, i64 iOff, void *p){ + return SQLITE_OK; +} +#endif + /* ** The next group of routines are convenience wrappers around the ** VFS methods. |