Fossil SCM
Merge trunk. Make it work with SQLITE_ENABLE_LOCKING_STYLE=1, both on Linux and VxWorks. Still experimental, as the unlink issue when using dosFs is not handled yet.
Commit
1cef35ba55f8d9880e857a80433c25320b3942f5
Parent
9d0bc3a83b43119…
5 files changed
+1
-1
+1
+5
-5
+5
-5
+28
-12
+1
-1
| --- Makefile.in | ||
| +++ Makefile.in | ||
| @@ -37,11 +37,11 @@ | ||
| 37 | 37 | # care about testing the end result, this can be blank. |
| 38 | 38 | # |
| 39 | 39 | TCLSH = tclsh |
| 40 | 40 | |
| 41 | 41 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 42 | -TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H | |
| 42 | +TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H | |
| 43 | 43 | INSTALLDIR = $(DESTDIR)@prefix@/bin |
| 44 | 44 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 45 | 45 | |
| 46 | 46 | include $(SRCDIR)/main.mk |
| 47 | 47 | |
| 48 | 48 |
| --- Makefile.in | |
| +++ Makefile.in | |
| @@ -37,11 +37,11 @@ | |
| 37 | # care about testing the end result, this can be blank. |
| 38 | # |
| 39 | TCLSH = tclsh |
| 40 | |
| 41 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 42 | TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H |
| 43 | INSTALLDIR = $(DESTDIR)@prefix@/bin |
| 44 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 45 | |
| 46 | include $(SRCDIR)/main.mk |
| 47 | |
| 48 |
| --- Makefile.in | |
| +++ Makefile.in | |
| @@ -37,11 +37,11 @@ | |
| 37 | # care about testing the end result, this can be blank. |
| 38 | # |
| 39 | TCLSH = tclsh |
| 40 | |
| 41 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 42 | TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H |
| 43 | INSTALLDIR = $(DESTDIR)@prefix@/bin |
| 44 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 45 | |
| 46 | include $(SRCDIR)/main.mk |
| 47 | |
| 48 |
M
auto.def
+1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -262,10 +262,11 @@ | ||
| 262 | 262 | define-append LIBS -lwsock32 |
| 263 | 263 | } |
| 264 | 264 | } |
| 265 | 265 | cc-check-function-in-lib iconv iconv |
| 266 | 266 | cc-check-functions utime |
| 267 | +cc-check-functions usleep | |
| 267 | 268 | |
| 268 | 269 | # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE |
| 269 | 270 | if {![cc-check-functions getloadavg]} { |
| 270 | 271 | define FOSSIL_OMIT_LOAD_AVERAGE 1 |
| 271 | 272 | msg-result "Load average support unavailable" |
| 272 | 273 |
| --- auto.def | |
| +++ auto.def | |
| @@ -262,10 +262,11 @@ | |
| 262 | define-append LIBS -lwsock32 |
| 263 | } |
| 264 | } |
| 265 | cc-check-function-in-lib iconv iconv |
| 266 | cc-check-functions utime |
| 267 | |
| 268 | # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE |
| 269 | if {![cc-check-functions getloadavg]} { |
| 270 | define FOSSIL_OMIT_LOAD_AVERAGE 1 |
| 271 | msg-result "Load average support unavailable" |
| 272 |
| --- auto.def | |
| +++ auto.def | |
| @@ -262,10 +262,11 @@ | |
| 262 | define-append LIBS -lwsock32 |
| 263 | } |
| 264 | } |
| 265 | cc-check-function-in-lib iconv iconv |
| 266 | cc-check-functions utime |
| 267 | cc-check-functions usleep |
| 268 | |
| 269 | # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE |
| 270 | if {![cc-check-functions getloadavg]} { |
| 271 | define FOSSIL_OMIT_LOAD_AVERAGE 1 |
| 272 | msg-result "Load average support unavailable" |
| 273 |
+5
-5
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -24323,11 +24323,11 @@ | ||
| 24323 | 24323 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent) |
| 24324 | 24324 | |
| 24325 | 24325 | { "write", (sqlite3_syscall_ptr)write, 0 }, |
| 24326 | 24326 | #define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent) |
| 24327 | 24327 | |
| 24328 | -#if defined(USE_PREAD) || SQLITE_ENABLE_LOCKING_STYLE | |
| 24328 | +#if defined(USE_PREAD) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) | |
| 24329 | 24329 | { "pwrite", (sqlite3_syscall_ptr)pwrite, 0 }, |
| 24330 | 24330 | #else |
| 24331 | 24331 | { "pwrite", (sqlite3_syscall_ptr)0, 0 }, |
| 24332 | 24332 | #endif |
| 24333 | 24333 | #define osPwrite ((ssize_t(*)(int,const void*,size_t,off_t))\ |
| @@ -29567,14 +29567,14 @@ | ||
| 29567 | 29567 | int isExclusive = (flags & SQLITE_OPEN_EXCLUSIVE); |
| 29568 | 29568 | int isDelete = (flags & SQLITE_OPEN_DELETEONCLOSE); |
| 29569 | 29569 | int isCreate = (flags & SQLITE_OPEN_CREATE); |
| 29570 | 29570 | int isReadonly = (flags & SQLITE_OPEN_READONLY); |
| 29571 | 29571 | int isReadWrite = (flags & SQLITE_OPEN_READWRITE); |
| 29572 | -#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS | |
| 29572 | +#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) | |
| 29573 | 29573 | int isAutoProxy = (flags & SQLITE_OPEN_AUTOPROXY); |
| 29574 | 29574 | #endif |
| 29575 | -#if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) | |
| 29575 | +#if defined(__APPLE__) | |
| 29576 | 29576 | struct statfs fsInfo; |
| 29577 | 29577 | #endif |
| 29578 | 29578 | |
| 29579 | 29579 | /* If creating a master or main-file journal, this function will open |
| 29580 | 29580 | ** a file-descriptor on the directory too. The first time unixSync() |
| @@ -29736,11 +29736,11 @@ | ||
| 29736 | 29736 | #endif |
| 29737 | 29737 | |
| 29738 | 29738 | noLock = eType!=SQLITE_OPEN_MAIN_DB; |
| 29739 | 29739 | |
| 29740 | 29740 | |
| 29741 | -#if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) | |
| 29741 | +#if defined(__APPLE__) | |
| 29742 | 29742 | if( fstatfs(fd, &fsInfo) == -1 ){ |
| 29743 | 29743 | ((unixFile*)pFile)->lastErrno = errno; |
| 29744 | 29744 | robust_close(p, fd, __LINE__); |
| 29745 | 29745 | return SQLITE_IOERR_ACCESS; |
| 29746 | 29746 | } |
| @@ -29754,11 +29754,11 @@ | ||
| 29754 | 29754 | if( isReadonly ) ctrlFlags |= UNIXFILE_RDONLY; |
| 29755 | 29755 | if( noLock ) ctrlFlags |= UNIXFILE_NOLOCK; |
| 29756 | 29756 | if( syncDir ) ctrlFlags |= UNIXFILE_DIRSYNC; |
| 29757 | 29757 | if( flags & SQLITE_OPEN_URI ) ctrlFlags |= UNIXFILE_URI; |
| 29758 | 29758 | |
| 29759 | -#if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) | |
| 29759 | +#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) | |
| 29760 | 29760 | #if SQLITE_PREFER_PROXY_LOCKING |
| 29761 | 29761 | isAutoProxy = 1; |
| 29762 | 29762 | #endif |
| 29763 | 29763 | if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){ |
| 29764 | 29764 | char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING"); |
| 29765 | 29765 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -24323,11 +24323,11 @@ | |
| 24323 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent) |
| 24324 | |
| 24325 | { "write", (sqlite3_syscall_ptr)write, 0 }, |
| 24326 | #define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent) |
| 24327 | |
| 24328 | #if defined(USE_PREAD) || SQLITE_ENABLE_LOCKING_STYLE |
| 24329 | { "pwrite", (sqlite3_syscall_ptr)pwrite, 0 }, |
| 24330 | #else |
| 24331 | { "pwrite", (sqlite3_syscall_ptr)0, 0 }, |
| 24332 | #endif |
| 24333 | #define osPwrite ((ssize_t(*)(int,const void*,size_t,off_t))\ |
| @@ -29567,14 +29567,14 @@ | |
| 29567 | int isExclusive = (flags & SQLITE_OPEN_EXCLUSIVE); |
| 29568 | int isDelete = (flags & SQLITE_OPEN_DELETEONCLOSE); |
| 29569 | int isCreate = (flags & SQLITE_OPEN_CREATE); |
| 29570 | int isReadonly = (flags & SQLITE_OPEN_READONLY); |
| 29571 | int isReadWrite = (flags & SQLITE_OPEN_READWRITE); |
| 29572 | #if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS |
| 29573 | int isAutoProxy = (flags & SQLITE_OPEN_AUTOPROXY); |
| 29574 | #endif |
| 29575 | #if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) |
| 29576 | struct statfs fsInfo; |
| 29577 | #endif |
| 29578 | |
| 29579 | /* If creating a master or main-file journal, this function will open |
| 29580 | ** a file-descriptor on the directory too. The first time unixSync() |
| @@ -29736,11 +29736,11 @@ | |
| 29736 | #endif |
| 29737 | |
| 29738 | noLock = eType!=SQLITE_OPEN_MAIN_DB; |
| 29739 | |
| 29740 | |
| 29741 | #if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) |
| 29742 | if( fstatfs(fd, &fsInfo) == -1 ){ |
| 29743 | ((unixFile*)pFile)->lastErrno = errno; |
| 29744 | robust_close(p, fd, __LINE__); |
| 29745 | return SQLITE_IOERR_ACCESS; |
| 29746 | } |
| @@ -29754,11 +29754,11 @@ | |
| 29754 | if( isReadonly ) ctrlFlags |= UNIXFILE_RDONLY; |
| 29755 | if( noLock ) ctrlFlags |= UNIXFILE_NOLOCK; |
| 29756 | if( syncDir ) ctrlFlags |= UNIXFILE_DIRSYNC; |
| 29757 | if( flags & SQLITE_OPEN_URI ) ctrlFlags |= UNIXFILE_URI; |
| 29758 | |
| 29759 | #if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) |
| 29760 | #if SQLITE_PREFER_PROXY_LOCKING |
| 29761 | isAutoProxy = 1; |
| 29762 | #endif |
| 29763 | if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){ |
| 29764 | char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING"); |
| 29765 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -24323,11 +24323,11 @@ | |
| 24323 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent) |
| 24324 | |
| 24325 | { "write", (sqlite3_syscall_ptr)write, 0 }, |
| 24326 | #define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent) |
| 24327 | |
| 24328 | #if defined(USE_PREAD) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) |
| 24329 | { "pwrite", (sqlite3_syscall_ptr)pwrite, 0 }, |
| 24330 | #else |
| 24331 | { "pwrite", (sqlite3_syscall_ptr)0, 0 }, |
| 24332 | #endif |
| 24333 | #define osPwrite ((ssize_t(*)(int,const void*,size_t,off_t))\ |
| @@ -29567,14 +29567,14 @@ | |
| 29567 | int isExclusive = (flags & SQLITE_OPEN_EXCLUSIVE); |
| 29568 | int isDelete = (flags & SQLITE_OPEN_DELETEONCLOSE); |
| 29569 | int isCreate = (flags & SQLITE_OPEN_CREATE); |
| 29570 | int isReadonly = (flags & SQLITE_OPEN_READONLY); |
| 29571 | int isReadWrite = (flags & SQLITE_OPEN_READWRITE); |
| 29572 | #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) |
| 29573 | int isAutoProxy = (flags & SQLITE_OPEN_AUTOPROXY); |
| 29574 | #endif |
| 29575 | #if defined(__APPLE__) |
| 29576 | struct statfs fsInfo; |
| 29577 | #endif |
| 29578 | |
| 29579 | /* If creating a master or main-file journal, this function will open |
| 29580 | ** a file-descriptor on the directory too. The first time unixSync() |
| @@ -29736,11 +29736,11 @@ | |
| 29736 | #endif |
| 29737 | |
| 29738 | noLock = eType!=SQLITE_OPEN_MAIN_DB; |
| 29739 | |
| 29740 | |
| 29741 | #if defined(__APPLE__) |
| 29742 | if( fstatfs(fd, &fsInfo) == -1 ){ |
| 29743 | ((unixFile*)pFile)->lastErrno = errno; |
| 29744 | robust_close(p, fd, __LINE__); |
| 29745 | return SQLITE_IOERR_ACCESS; |
| 29746 | } |
| @@ -29754,11 +29754,11 @@ | |
| 29754 | if( isReadonly ) ctrlFlags |= UNIXFILE_RDONLY; |
| 29755 | if( noLock ) ctrlFlags |= UNIXFILE_NOLOCK; |
| 29756 | if( syncDir ) ctrlFlags |= UNIXFILE_DIRSYNC; |
| 29757 | if( flags & SQLITE_OPEN_URI ) ctrlFlags |= UNIXFILE_URI; |
| 29758 | |
| 29759 | #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) |
| 29760 | #if SQLITE_PREFER_PROXY_LOCKING |
| 29761 | isAutoProxy = 1; |
| 29762 | #endif |
| 29763 | if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){ |
| 29764 | char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING"); |
| 29765 |
+5
-5
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -24323,11 +24323,11 @@ | ||
| 24323 | 24323 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent) |
| 24324 | 24324 | |
| 24325 | 24325 | { "write", (sqlite3_syscall_ptr)write, 0 }, |
| 24326 | 24326 | #define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent) |
| 24327 | 24327 | |
| 24328 | -#if defined(USE_PREAD) || SQLITE_ENABLE_LOCKING_STYLE | |
| 24328 | +#if defined(USE_PREAD) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) | |
| 24329 | 24329 | { "pwrite", (sqlite3_syscall_ptr)pwrite, 0 }, |
| 24330 | 24330 | #else |
| 24331 | 24331 | { "pwrite", (sqlite3_syscall_ptr)0, 0 }, |
| 24332 | 24332 | #endif |
| 24333 | 24333 | #define osPwrite ((ssize_t(*)(int,const void*,size_t,off_t))\ |
| @@ -29567,14 +29567,14 @@ | ||
| 29567 | 29567 | int isExclusive = (flags & SQLITE_OPEN_EXCLUSIVE); |
| 29568 | 29568 | int isDelete = (flags & SQLITE_OPEN_DELETEONCLOSE); |
| 29569 | 29569 | int isCreate = (flags & SQLITE_OPEN_CREATE); |
| 29570 | 29570 | int isReadonly = (flags & SQLITE_OPEN_READONLY); |
| 29571 | 29571 | int isReadWrite = (flags & SQLITE_OPEN_READWRITE); |
| 29572 | -#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS | |
| 29572 | +#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) | |
| 29573 | 29573 | int isAutoProxy = (flags & SQLITE_OPEN_AUTOPROXY); |
| 29574 | 29574 | #endif |
| 29575 | -#if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) | |
| 29575 | +#if defined(__APPLE__) | |
| 29576 | 29576 | struct statfs fsInfo; |
| 29577 | 29577 | #endif |
| 29578 | 29578 | |
| 29579 | 29579 | /* If creating a master or main-file journal, this function will open |
| 29580 | 29580 | ** a file-descriptor on the directory too. The first time unixSync() |
| @@ -29736,11 +29736,11 @@ | ||
| 29736 | 29736 | #endif |
| 29737 | 29737 | |
| 29738 | 29738 | noLock = eType!=SQLITE_OPEN_MAIN_DB; |
| 29739 | 29739 | |
| 29740 | 29740 | |
| 29741 | -#if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) | |
| 29741 | +#if defined(__APPLE__) | |
| 29742 | 29742 | if( fstatfs(fd, &fsInfo) == -1 ){ |
| 29743 | 29743 | ((unixFile*)pFile)->lastErrno = errno; |
| 29744 | 29744 | robust_close(p, fd, __LINE__); |
| 29745 | 29745 | return SQLITE_IOERR_ACCESS; |
| 29746 | 29746 | } |
| @@ -29754,11 +29754,11 @@ | ||
| 29754 | 29754 | if( isReadonly ) ctrlFlags |= UNIXFILE_RDONLY; |
| 29755 | 29755 | if( noLock ) ctrlFlags |= UNIXFILE_NOLOCK; |
| 29756 | 29756 | if( syncDir ) ctrlFlags |= UNIXFILE_DIRSYNC; |
| 29757 | 29757 | if( flags & SQLITE_OPEN_URI ) ctrlFlags |= UNIXFILE_URI; |
| 29758 | 29758 | |
| 29759 | -#if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) | |
| 29759 | +#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) | |
| 29760 | 29760 | #if SQLITE_PREFER_PROXY_LOCKING |
| 29761 | 29761 | isAutoProxy = 1; |
| 29762 | 29762 | #endif |
| 29763 | 29763 | if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){ |
| 29764 | 29764 | char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING"); |
| 29765 | 29765 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -24323,11 +24323,11 @@ | |
| 24323 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent) |
| 24324 | |
| 24325 | { "write", (sqlite3_syscall_ptr)write, 0 }, |
| 24326 | #define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent) |
| 24327 | |
| 24328 | #if defined(USE_PREAD) || SQLITE_ENABLE_LOCKING_STYLE |
| 24329 | { "pwrite", (sqlite3_syscall_ptr)pwrite, 0 }, |
| 24330 | #else |
| 24331 | { "pwrite", (sqlite3_syscall_ptr)0, 0 }, |
| 24332 | #endif |
| 24333 | #define osPwrite ((ssize_t(*)(int,const void*,size_t,off_t))\ |
| @@ -29567,14 +29567,14 @@ | |
| 29567 | int isExclusive = (flags & SQLITE_OPEN_EXCLUSIVE); |
| 29568 | int isDelete = (flags & SQLITE_OPEN_DELETEONCLOSE); |
| 29569 | int isCreate = (flags & SQLITE_OPEN_CREATE); |
| 29570 | int isReadonly = (flags & SQLITE_OPEN_READONLY); |
| 29571 | int isReadWrite = (flags & SQLITE_OPEN_READWRITE); |
| 29572 | #if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS |
| 29573 | int isAutoProxy = (flags & SQLITE_OPEN_AUTOPROXY); |
| 29574 | #endif |
| 29575 | #if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) |
| 29576 | struct statfs fsInfo; |
| 29577 | #endif |
| 29578 | |
| 29579 | /* If creating a master or main-file journal, this function will open |
| 29580 | ** a file-descriptor on the directory too. The first time unixSync() |
| @@ -29736,11 +29736,11 @@ | |
| 29736 | #endif |
| 29737 | |
| 29738 | noLock = eType!=SQLITE_OPEN_MAIN_DB; |
| 29739 | |
| 29740 | |
| 29741 | #if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) |
| 29742 | if( fstatfs(fd, &fsInfo) == -1 ){ |
| 29743 | ((unixFile*)pFile)->lastErrno = errno; |
| 29744 | robust_close(p, fd, __LINE__); |
| 29745 | return SQLITE_IOERR_ACCESS; |
| 29746 | } |
| @@ -29754,11 +29754,11 @@ | |
| 29754 | if( isReadonly ) ctrlFlags |= UNIXFILE_RDONLY; |
| 29755 | if( noLock ) ctrlFlags |= UNIXFILE_NOLOCK; |
| 29756 | if( syncDir ) ctrlFlags |= UNIXFILE_DIRSYNC; |
| 29757 | if( flags & SQLITE_OPEN_URI ) ctrlFlags |= UNIXFILE_URI; |
| 29758 | |
| 29759 | #if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) |
| 29760 | #if SQLITE_PREFER_PROXY_LOCKING |
| 29761 | isAutoProxy = 1; |
| 29762 | #endif |
| 29763 | if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){ |
| 29764 | char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING"); |
| 29765 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -24323,11 +24323,11 @@ | |
| 24323 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent) |
| 24324 | |
| 24325 | { "write", (sqlite3_syscall_ptr)write, 0 }, |
| 24326 | #define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent) |
| 24327 | |
| 24328 | #if defined(USE_PREAD) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) |
| 24329 | { "pwrite", (sqlite3_syscall_ptr)pwrite, 0 }, |
| 24330 | #else |
| 24331 | { "pwrite", (sqlite3_syscall_ptr)0, 0 }, |
| 24332 | #endif |
| 24333 | #define osPwrite ((ssize_t(*)(int,const void*,size_t,off_t))\ |
| @@ -29567,14 +29567,14 @@ | |
| 29567 | int isExclusive = (flags & SQLITE_OPEN_EXCLUSIVE); |
| 29568 | int isDelete = (flags & SQLITE_OPEN_DELETEONCLOSE); |
| 29569 | int isCreate = (flags & SQLITE_OPEN_CREATE); |
| 29570 | int isReadonly = (flags & SQLITE_OPEN_READONLY); |
| 29571 | int isReadWrite = (flags & SQLITE_OPEN_READWRITE); |
| 29572 | #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) |
| 29573 | int isAutoProxy = (flags & SQLITE_OPEN_AUTOPROXY); |
| 29574 | #endif |
| 29575 | #if defined(__APPLE__) |
| 29576 | struct statfs fsInfo; |
| 29577 | #endif |
| 29578 | |
| 29579 | /* If creating a master or main-file journal, this function will open |
| 29580 | ** a file-descriptor on the directory too. The first time unixSync() |
| @@ -29736,11 +29736,11 @@ | |
| 29736 | #endif |
| 29737 | |
| 29738 | noLock = eType!=SQLITE_OPEN_MAIN_DB; |
| 29739 | |
| 29740 | |
| 29741 | #if defined(__APPLE__) |
| 29742 | if( fstatfs(fd, &fsInfo) == -1 ){ |
| 29743 | ((unixFile*)pFile)->lastErrno = errno; |
| 29744 | robust_close(p, fd, __LINE__); |
| 29745 | return SQLITE_IOERR_ACCESS; |
| 29746 | } |
| @@ -29754,11 +29754,11 @@ | |
| 29754 | if( isReadonly ) ctrlFlags |= UNIXFILE_RDONLY; |
| 29755 | if( noLock ) ctrlFlags |= UNIXFILE_NOLOCK; |
| 29756 | if( syncDir ) ctrlFlags |= UNIXFILE_DIRSYNC; |
| 29757 | if( flags & SQLITE_OPEN_URI ) ctrlFlags |= UNIXFILE_URI; |
| 29758 | |
| 29759 | #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) |
| 29760 | #if SQLITE_PREFER_PROXY_LOCKING |
| 29761 | isAutoProxy = 1; |
| 29762 | #endif |
| 29763 | if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){ |
| 29764 | char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING"); |
| 29765 |
+28
-12
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1222,21 +1222,32 @@ | ||
| 1222 | 1222 | } |
| 1223 | 1223 | if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid); |
| 1224 | 1224 | } |
| 1225 | 1225 | blob_appendf(&desc, " of %z[%.10s]</a>", |
| 1226 | 1226 | href("%R/info/%s", zUuid), zUuid); |
| 1227 | - if( (tmFlags & TIMELINE_UNHIDE)==0 ){ | |
| 1228 | - if( p_rid ){ | |
| 1229 | - url_add_parameter(&url, "p", zUuid); | |
| 1230 | - } | |
| 1231 | - if( d_rid ){ | |
| 1232 | - if( p_rid ){ | |
| 1233 | - /* If both p= and d= are set, we don't have the uuid of d yet. */ | |
| 1234 | - zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid); | |
| 1235 | - } | |
| 1236 | - url_add_parameter(&url, "d", zUuid); | |
| 1237 | - } | |
| 1227 | + if( p_rid ){ | |
| 1228 | + url_add_parameter(&url, "p", zUuid); | |
| 1229 | + } | |
| 1230 | + if( d_rid ){ | |
| 1231 | + if( p_rid ){ | |
| 1232 | + /* If both p= and d= are set, we don't have the uuid of d yet. */ | |
| 1233 | + zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid); | |
| 1234 | + } | |
| 1235 | + url_add_parameter(&url, "d", zUuid); | |
| 1236 | + } | |
| 1237 | + if( nEntry>20 ){ | |
| 1238 | + timeline_submenu(&url, "20 Entries", "n", "20", 0); | |
| 1239 | + } | |
| 1240 | + if( nEntry<200 ){ | |
| 1241 | + timeline_submenu(&url, "200 Entries", "n", "200", 0); | |
| 1242 | + } | |
| 1243 | + if( tmFlags & TIMELINE_FCHANGES ){ | |
| 1244 | + timeline_submenu(&url, "Hide Files", "v", 0, 0); | |
| 1245 | + }else{ | |
| 1246 | + timeline_submenu(&url, "Show Files", "v", "", 0); | |
| 1247 | + } | |
| 1248 | + if( (tmFlags & TIMELINE_UNHIDE)==0 ){ | |
| 1238 | 1249 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1239 | 1250 | } |
| 1240 | 1251 | }else if( f_rid && g.perm.Read ){ |
| 1241 | 1252 | /* If f= is present, ignore all other parameters other than n= */ |
| 1242 | 1253 | char *zUuid; |
| @@ -1252,12 +1263,17 @@ | ||
| 1252 | 1263 | if( useDividers ) timeline_add_dividers(0, f_rid); |
| 1253 | 1264 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1254 | 1265 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1255 | 1266 | blob_appendf(&desc, "%z[%.10s]</a>", href("%R/info/%s", zUuid), zUuid); |
| 1256 | 1267 | tmFlags |= TIMELINE_DISJOINT; |
| 1268 | + url_add_parameter(&url, "f", zUuid); | |
| 1269 | + if( tmFlags & TIMELINE_FCHANGES ){ | |
| 1270 | + timeline_submenu(&url, "Hide Files", "v", 0, 0); | |
| 1271 | + }else{ | |
| 1272 | + timeline_submenu(&url, "Show Files", "v", "", 0); | |
| 1273 | + } | |
| 1257 | 1274 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1258 | - url_add_parameter(&url, "f", zUuid); | |
| 1259 | 1275 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1260 | 1276 | } |
| 1261 | 1277 | }else{ |
| 1262 | 1278 | /* Otherwise, a timeline based on a span of time */ |
| 1263 | 1279 | int n; |
| 1264 | 1280 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1222,21 +1222,32 @@ | |
| 1222 | } |
| 1223 | if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid); |
| 1224 | } |
| 1225 | blob_appendf(&desc, " of %z[%.10s]</a>", |
| 1226 | href("%R/info/%s", zUuid), zUuid); |
| 1227 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1228 | if( p_rid ){ |
| 1229 | url_add_parameter(&url, "p", zUuid); |
| 1230 | } |
| 1231 | if( d_rid ){ |
| 1232 | if( p_rid ){ |
| 1233 | /* If both p= and d= are set, we don't have the uuid of d yet. */ |
| 1234 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid); |
| 1235 | } |
| 1236 | url_add_parameter(&url, "d", zUuid); |
| 1237 | } |
| 1238 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1239 | } |
| 1240 | }else if( f_rid && g.perm.Read ){ |
| 1241 | /* If f= is present, ignore all other parameters other than n= */ |
| 1242 | char *zUuid; |
| @@ -1252,12 +1263,17 @@ | |
| 1252 | if( useDividers ) timeline_add_dividers(0, f_rid); |
| 1253 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1254 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1255 | blob_appendf(&desc, "%z[%.10s]</a>", href("%R/info/%s", zUuid), zUuid); |
| 1256 | tmFlags |= TIMELINE_DISJOINT; |
| 1257 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1258 | url_add_parameter(&url, "f", zUuid); |
| 1259 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1260 | } |
| 1261 | }else{ |
| 1262 | /* Otherwise, a timeline based on a span of time */ |
| 1263 | int n; |
| 1264 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1222,21 +1222,32 @@ | |
| 1222 | } |
| 1223 | if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid); |
| 1224 | } |
| 1225 | blob_appendf(&desc, " of %z[%.10s]</a>", |
| 1226 | href("%R/info/%s", zUuid), zUuid); |
| 1227 | if( p_rid ){ |
| 1228 | url_add_parameter(&url, "p", zUuid); |
| 1229 | } |
| 1230 | if( d_rid ){ |
| 1231 | if( p_rid ){ |
| 1232 | /* If both p= and d= are set, we don't have the uuid of d yet. */ |
| 1233 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid); |
| 1234 | } |
| 1235 | url_add_parameter(&url, "d", zUuid); |
| 1236 | } |
| 1237 | if( nEntry>20 ){ |
| 1238 | timeline_submenu(&url, "20 Entries", "n", "20", 0); |
| 1239 | } |
| 1240 | if( nEntry<200 ){ |
| 1241 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1242 | } |
| 1243 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1244 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1245 | }else{ |
| 1246 | timeline_submenu(&url, "Show Files", "v", "", 0); |
| 1247 | } |
| 1248 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1249 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1250 | } |
| 1251 | }else if( f_rid && g.perm.Read ){ |
| 1252 | /* If f= is present, ignore all other parameters other than n= */ |
| 1253 | char *zUuid; |
| @@ -1252,12 +1263,17 @@ | |
| 1263 | if( useDividers ) timeline_add_dividers(0, f_rid); |
| 1264 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1265 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1266 | blob_appendf(&desc, "%z[%.10s]</a>", href("%R/info/%s", zUuid), zUuid); |
| 1267 | tmFlags |= TIMELINE_DISJOINT; |
| 1268 | url_add_parameter(&url, "f", zUuid); |
| 1269 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1270 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1271 | }else{ |
| 1272 | timeline_submenu(&url, "Show Files", "v", "", 0); |
| 1273 | } |
| 1274 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1275 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1276 | } |
| 1277 | }else{ |
| 1278 | /* Otherwise, a timeline based on a span of time */ |
| 1279 | int n; |
| 1280 |