* contrib/3rd/sqlite3/sqlite3.c
* contrib/3rd/sqlite3/sqlite3.dif
* contrib/3rd/sqlite3/sqlite3.h
* contrib/3rd/sqlite3/sqlite3.hbp
* Update to SQLite 3.7.16.2
! Correct fix for previous issue: re-enable SQLite for Minix,
disable WAL extension only.
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
diff -urN sqlite3.orig/sqlite3.c sqlite3/sqlite3.c
|
|
--- sqlite3.orig/sqlite3.c 2013-05-16 23:10:24.391059972 +0200
|
|
+++ sqlite3/sqlite3.c 2013-05-16 23:10:24.391059972 +0200
|
|
@@ -26469,7 +26469,11 @@
|
|
** is the same technique used by glibc to implement posix_fallocate()
|
|
** on systems that do not have a real fallocate() system call.
|
|
*/
|
|
+#if __minix
|
|
+ int nBlk = 4096; /* MFS default; good enough for now */
|
|
+#else
|
|
int nBlk = buf.st_blksize; /* File-system block size */
|
|
+#endif
|
|
i64 iWrite; /* Next offset to write to */
|
|
|
|
if( robust_ftruncate(pFile->h, nSize) ){
|
|
@@ -31778,6 +31782,11 @@
|
|
** create a substitute.
|
|
*/
|
|
/* #include <time.h> */
|
|
+#if defined( _MSC_VER )
|
|
+#define _LL( num ) num
|
|
+#else
|
|
+#define _LL( num ) num##LL
|
|
+#endif
|
|
struct tm *__cdecl localtime(const time_t *t)
|
|
{
|
|
static struct tm y;
|
|
@@ -31785,7 +31794,7 @@
|
|
SYSTEMTIME pTm;
|
|
sqlite3_int64 t64;
|
|
t64 = *t;
|
|
- t64 = (t64 + 11644473600)*10000000;
|
|
+ t64 = (t64 + _LL(11644473600))*10000000;
|
|
uTm.dwLowDateTime = (DWORD)(t64 & 0xFFFFFFFF);
|
|
uTm.dwHighDateTime= (DWORD)(t64 >> 32);
|
|
osFileTimeToLocalFileTime(&uTm,&lTm);
|