summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNarayan Kamath2015-01-14 18:41:23 +0000
committerNarayan Kamath2015-01-14 18:41:23 +0000
commit0266b374020e3274292c231d4848c39904a10b7f (patch)
tree776516a7af23786b4cceaa1267b410b4ccb3329f
parent006c79750f8494ea445316f608905216693c6814 (diff)
Revert "Store inodes in unsigned long long"
This reverts commit 006c79750f8494ea445316f608905216693c6814. We've committed a better fix, and we shouldn't encourage folks to copy paste this workaround. bug: 19012244
-rw-r--r--dist/Android.patch38
-rw-r--r--dist/sqlite3.c9
2 files changed, 12 insertions, 35 deletions
diff --git a/dist/Android.patch b/dist/Android.patch
index f60126e..4b8ef9d 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 2014-10-03 12:18:31.191186450 +0100
-+++ ./shell.c 2014-10-03 12:18:31.227186226 +0100
+--- orig/shell.c 2014-08-20 16:26:07.117256041 -0700
++++ ./shell.c 2014-08-20 16:45:00.468546769 -0700
@@ -35,6 +35,11 @@
#include "sqlite3.h"
#include <ctype.h>
@@ -36,8 +36,8 @@ diff -r -u -d orig/shell.c ./shell.c
}
diff -r -u -d orig/sqlite3.c ./sqlite3.c
---- orig/sqlite3.c 2014-10-03 12:18:31.223186251 +0100
-+++ ./sqlite3.c 2014-11-19 14:12:49.785181208 +0000
+--- orig/sqlite3.c 2014-08-20 16:26:07.145255923 -0700
++++ ./sqlite3.c 2014-08-20 16:26:36.205134826 -0700
@@ -24109,6 +24109,13 @@
*/
#if SQLITE_OS_UNIX /* This file is used on unix only */
@@ -80,23 +80,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
{ "fchmod", (sqlite3_syscall_ptr)fchmod, 0 },
#define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent)
-@@ -25301,7 +25319,14 @@
- #if OS_VXWORKS
- struct vxworksFileId *pId; /* Unique file ID for vxworks. */
- #else
-- ino_t ino; /* Inode number */
-+#ifdef ANDROID
-+ // Bionic's struct stat has a 64 bit st_ino on both 32 and
-+ // 64 bit architectures. ino_t remains 32 bits wide on 32 bit
-+ // architectures and can lead to inode truncation.
-+ unsigned long long ino; /* Inode number */
-+#else
-+ ino_t ino; /* Inode number */
-+#endif
- #endif
- };
-
-@@ -27909,7 +27934,7 @@
+@@ -27909,7 +27927,7 @@
SimulateIOError( rc=1 );
if( rc!=0 ){
((unixFile*)id)->lastErrno = errno;
@@ -105,7 +89,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
}
*pSize = buf.st_size;
-@@ -27944,7 +27969,9 @@
+@@ -27944,7 +27962,9 @@
i64 nSize; /* Required file size */
struct stat buf; /* Used to hold return values of fstat() */
@@ -116,7 +100,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
if( nSize>(i64)buf.st_size ){
-@@ -28510,7 +28537,7 @@
+@@ -28510,7 +28530,7 @@
** with the same permissions.
*/
if( osFstat(pDbFd->h, &sStat) && pInode->bProcessLock==0 ){
@@ -125,7 +109,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
goto shm_open_err;
}
-@@ -29848,7 +29875,7 @@
+@@ -29848,7 +29868,7 @@
*pUid = sStat.st_uid;
*pGid = sStat.st_gid;
}else{
@@ -134,7 +118,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
}
}else if( flags & SQLITE_OPEN_DELETEONCLOSE ){
*pMode = 0600;
-@@ -100867,7 +100894,7 @@
+@@ -100867,7 +100887,7 @@
}
if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
sqlite3SetString(pzErrMsg, db, "unsupported file format");
@@ -143,7 +127,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
goto initone_error_out;
}
-@@ -124770,9 +124797,9 @@
+@@ -124770,9 +124790,9 @@
#endif
#ifdef SQLITE_ENABLE_FTS3
@@ -156,7 +140,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
#endif
#ifdef SQLITE_ENABLE_ICU
-@@ -130660,16 +130687,28 @@
+@@ -130660,16 +130680,28 @@
** module with sqlite.
*/
if( SQLITE_OK==rc
diff --git a/dist/sqlite3.c b/dist/sqlite3.c
index e1aa127..edd2045 100644
--- a/dist/sqlite3.c
+++ b/dist/sqlite3.c
@@ -25319,14 +25319,7 @@ struct unixFileId {
#if OS_VXWORKS
struct vxworksFileId *pId; /* Unique file ID for vxworks. */
#else
-#ifdef ANDROID
- // Bionic's struct stat has a 64 bit st_ino on both 32 and
- // 64 bit architectures. ino_t remains 32 bits wide on 32 bit
- // architectures and can lead to inode truncation.
- unsigned long long ino; /* Inode number */
-#else
- ino_t ino; /* Inode number */
-#endif
+ ino_t ino; /* Inode number */
#endif
};