diff options
author | Alex Naidis <alex.naidis@linux.com> | 2016-07-10 14:13:38 +0200 |
---|---|---|
committer | Alex Naidis <alex.naidis@linux.com> | 2016-08-07 14:50:19 +0200 |
commit | 60fa6fd5623cb0939ef089b799adeb068389218f (patch) | |
tree | c964f0db58f4f558705f84606fa77ae2002d1f73 /dist/Android.patch | |
parent | a90d80c9c154737c590c0e9b1e08a7f62bcc25ee (diff) |
sqlite: upgrade to SQLite 3.13.0
Downloaded from http://sqlite.com/2016/sqlite-amalgamation-3130000.zip
$ sha256sum sqlite-amalgamation-3130000.zip
f9ef8811f5f221d81a3ba811a8dfdcc54b19acc6d8032c74719ff95ed0026611 sqlite-amalgamation-3130000.zip
dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above.
dist contains a copy of dist/orig, but with the Android.patch file applied.
Please see Android.patch for a list of differences between stock and
Android.
The Android specific patch for sqlite3.c failed to apply cleanly.
The conflicts were resolved and the Android.patch file was regenerated.
It is to note that the Android specific changes from "off_t" to "off64_t" for "osPread64" and "osPwrite64" are no longer necessary.
Upstream applied these changes in the newest 3.13.0 release.
Also this patch deletes the dist/version file as it is obsoleted and replaced by README.version for Android.
The changes in the new releases can be found here: https://www.sqlite.org/changes.html
Change-Id: I20001055339015b3c05836f7cef7b724700b08a9
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
Diffstat (limited to 'dist/Android.patch')
-rw-r--r-- | dist/Android.patch | 54 |
1 files changed, 13 insertions, 41 deletions
diff --git a/dist/Android.patch b/dist/Android.patch index 342e967..9e0093e 100644 --- a/dist/Android.patch +++ b/dist/Android.patch @@ -1,6 +1,6 @@ diff -r -u -d orig/shell.c ./shell.c ---- orig/shell.c 2016-04-16 21:02:33.163176554 -0700 -+++ ./shell.c 2016-04-16 21:02:33.207176154 -0700 +--- orig/shell.c 2016-05-18 13:07:03.000000000 +0200 ++++ ./shell.c 2016-07-10 13:46:29.256283352 +0200 @@ -52,6 +52,12 @@ #endif #include <ctype.h> @@ -14,7 +14,7 @@ diff -r -u -d orig/shell.c ./shell.c #if !defined(_WIN32) && !defined(WIN32) # include <signal.h> -@@ -1943,6 +1949,22 @@ +@@ -2368,6 +2374,22 @@ readfileFunc, 0, 0); sqlite3_create_function(p->db, "writefile", 2, SQLITE_UTF8, 0, writefileFunc, 0, 0); @@ -38,37 +38,9 @@ diff -r -u -d orig/shell.c ./shell.c } diff -r -u -d orig/sqlite3.c ./sqlite3.c ---- orig/sqlite3.c 2016-04-16 21:02:33.203176190 -0700 -+++ ./sqlite3.c 2016-04-16 21:52:23.179841572 -0700 -@@ -27024,7 +27024,12 @@ - #else - { "pread64", (sqlite3_syscall_ptr)0, 0 }, - #endif -+#ifdef ANDROID -+// Bionic defines pread64 using off64_t rather than off_t. -+#define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent) -+#else - #define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent) -+#endif - - { "write", (sqlite3_syscall_ptr)write, 0 }, - #define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent) -@@ -27042,8 +27047,14 @@ - #else - { "pwrite64", (sqlite3_syscall_ptr)0, 0 }, - #endif -+#ifdef ANDROID -+// Bionic defines pwrite64 using off64_t rather than off_t. -+#define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off64_t))\ -+ aSyscall[13].pCurrent) -+#else - #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off_t))\ - aSyscall[13].pCurrent) -+#endif - - { "fchmod", (sqlite3_syscall_ptr)fchmod, 0 }, - #define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent) -@@ -30292,7 +30303,7 @@ +--- orig/sqlite3.c 2016-05-18 13:07:03.000000000 +0200 ++++ ./sqlite3.c 2016-07-10 14:08:07.553031674 +0200 +@@ -32748,7 +32748,7 @@ SimulateIOError( rc=1 ); if( rc!=0 ){ storeLastErrno((unixFile*)id, errno); @@ -77,7 +49,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c } *pSize = buf.st_size; -@@ -30328,7 +30339,7 @@ +@@ -32784,7 +32784,7 @@ struct stat buf; /* Used to hold return values of fstat() */ if( osFstat(pFile->h, &buf) ){ @@ -86,16 +58,16 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c } nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk; -@@ -30913,7 +30924,7 @@ +@@ -33358,7 +33358,7 @@ ** with the same permissions. */ - if( osFstat(pDbFd->h, &sStat) && pInode->bProcessLock==0 ){ + if( osFstat(pDbFd->h, &sStat) ){ - rc = SQLITE_IOERR_FSTAT; + rc = unixLogError(SQLITE_IOERR_FSTAT, "fstat", pDbFd->zPath); goto shm_open_err; } -@@ -32260,7 +32271,7 @@ +@@ -34697,7 +34697,7 @@ *pUid = sStat.st_uid; *pGid = sStat.st_gid; }else{ @@ -104,16 +76,16 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c } }else if( flags & SQLITE_OPEN_DELETEONCLOSE ){ *pMode = 0600; -@@ -108046,7 +108057,7 @@ +@@ -112267,7 +112267,7 @@ } if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){ sqlite3SetString(pzErrMsg, db, "unsupported file format"); - rc = SQLITE_ERROR; -+ rc = SQLITE_CORRUPT_BKPT; // Android Change from "rc = SQLITE_ERROR;" ++ rc = SQLITE_CORRUPT_BKPT; // Android Change from "rc = SQLITE_ERROR;"; goto initone_error_out; } -@@ -139786,13 +139797,25 @@ +@@ -144810,13 +144810,25 @@ ** module with sqlite. */ if( SQLITE_OK==rc |