aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-01-11 13:10:41 +0000
committerdrh <drh@noemail.net>2016-01-11 13:10:41 +0000
commit604ce70448d0572477ad25bb3510b1dc3f2ad967 (patch)
tree5311ccb5ee4087afa2ee0b80dccad066cc20a918 /src/os_unix.c
parentf56a2a07ff4f9156640844f53e5ae3668e995b89 (diff)
parent2fca70569d8db348a85c059151b2af5d20527302 (diff)
downloadsqlite-604ce70448d0572477ad25bb3510b1dc3f2ad967.tar.gz
sqlite-604ce70448d0572477ad25bb3510b1dc3f2ad967.zip
Merge recent enhancements, and especially the WAL overwrite change, from trunk.
FossilOrigin-Name: c4a858b228a164be2f89f5b01833f0b5e0d7735b
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 791ba5d8d..a40a86678 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -437,26 +437,36 @@ static struct unix_syscall {
#define osGeteuid ((uid_t(*)(void))aSyscall[21].pCurrent)
#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
- { "mmap", (sqlite3_syscall_ptr)mmap, 0 },
+ { "mmap", (sqlite3_syscall_ptr)mmap, 0 },
+#else
+ { "mmap", (sqlite3_syscall_ptr)0, 0 },
+#endif
#define osMmap ((void*(*)(void*,size_t,int,int,int,off_t))aSyscall[22].pCurrent)
+#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
{ "munmap", (sqlite3_syscall_ptr)munmap, 0 },
+#else
+ { "munmap", (sqlite3_syscall_ptr)0, 0 },
+#endif
#define osMunmap ((void*(*)(void*,size_t))aSyscall[23].pCurrent)
-#if HAVE_MREMAP
+#if HAVE_MREMAP && (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0)
{ "mremap", (sqlite3_syscall_ptr)mremap, 0 },
#else
{ "mremap", (sqlite3_syscall_ptr)0, 0 },
#endif
#define osMremap ((void*(*)(void*,size_t,size_t,int,...))aSyscall[24].pCurrent)
+#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
{ "getpagesize", (sqlite3_syscall_ptr)unixGetpagesize, 0 },
+#else
+ { "getpagesize", (sqlite3_syscall_ptr)0, 0 },
+#endif
#define osGetpagesize ((int(*)(void))aSyscall[25].pCurrent)
{ "readlink", (sqlite3_syscall_ptr)readlink, 0 },
#define osReadlink ((ssize_t(*)(const char*,char*,size_t))aSyscall[26].pCurrent)
-#endif
}; /* End of the overrideable system calls */