Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Commit 49232bc

Browse files
committed
Don't include Android.patch diff in the patch (yeah...)
1 parent b4e9f95 commit 49232bc

File tree

1 file changed

+0
-146
lines changed

1 file changed

+0
-146
lines changed

dist/Android.patch

-146
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,3 @@
1-
diff --git a/dist/Android.patch b/dist/Android.patch
2-
index 7ecbecb..e69de29 100644
3-
--- a/dist/Android.patch
4-
+++ b/dist/Android.patch
5-
@@ -1,141 +0,0 @@
6-
---- orig/shell.c 2019-06-11 15:05:36.341739007 -0700
7-
-+++ shell.c 2019-06-11 15:05:36.401739332 -0700
8-
-@@ -87,6 +87,12 @@
9-
- #endif
10-
- #include <ctype.h>
11-
- #include <stdarg.h>
12-
-+// Begin Android Add
13-
-+#ifndef NO_ANDROID_FUNCS
14-
-+#include <aicu/AIcu.h>
15-
-+#include <sqlite3_android.h>
16-
-+#endif
17-
-+// End Android Add
18-
-
19-
- #if !defined(_WIN32) && !defined(WIN32)
20-
- # include <signal.h>
21-
-@@ -11698,6 +11704,23 @@
22-
- sqlite3_create_function(p->db, "edit", 2, SQLITE_UTF8, 0,
23-
- editFunc, 0, 0);
24-
- #endif
25-
-+
26-
-+// Begin Android Add
27-
-+#ifndef NO_ANDROID_FUNCS
28-
-+ AIcu_initializeIcuOrDie();
29-
-+ int err = register_localized_collators(p->db, "en_US", 0);
30-
-+ if (err != SQLITE_OK) {
31-
-+ fprintf(stderr, "register_localized_collators() failed\n");
32-
-+ exit(1);
33-
-+ }
34-
-+ err = register_android_functions(p->db, 0);
35-
-+ if (err != SQLITE_OK) {
36-
-+ fprintf(stderr, "register_android_functions() failed\n");
37-
-+ exit(1);
38-
-+ }
39-
-+#endif
40-
-+// End Android Add
41-
-+
42-
- if( p->openMode==SHELL_OPEN_ZIPFILE ){
43-
- char *zSql = sqlite3_mprintf(
44-
- "CREATE VIRTUAL TABLE zip USING zipfile(%Q);", p->zDbFilename);
45-
---- orig/sqlite3.c 2019-06-11 15:05:36.393739289 -0700
46-
-+++ sqlite3.c 2019-06-11 15:05:36.449739593 -0700
47-
-@@ -32438,6 +32438,10 @@
48-
- # include <sys/mount.h>
49-
- #endif
50-
-
51-
-+#if defined(__BIONIC__)
52-
-+# include <android/fdsan.h>
53-
-+#endif
54-
-+
55-
- #ifdef HAVE_UTIME
56-
- # include <utime.h>
57-
- #endif
58-
-@@ -33197,6 +33201,12 @@
59-
- #if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0)
60-
- osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
61-
- #endif
62-
-+
63-
-+#if defined(__BIONIC__) && __ANDROID_API__ >= __ANDROID_API_Q__
64-
-+ uint64_t tag = android_fdsan_create_owner_tag(
65-
-+ ANDROID_FDSAN_OWNER_TYPE_SQLITE, fd);
66-
-+ android_fdsan_exchange_owner_tag(fd, 0, tag);
67-
-+#endif
68-
- }
69-
- return fd;
70-
- }
71-
-@@ -33777,7 +33787,13 @@
72-
- ** and move on.
73-
- */
74-
- static void robust_close(unixFile *pFile, int h, int lineno){
75-
-+#if defined(__BIONIC__) && __ANDROID_API__ >= __ANDROID_API_Q__
76-
-+ uint64_t tag = android_fdsan_create_owner_tag(
77-
-+ ANDROID_FDSAN_OWNER_TYPE_SQLITE, h);
78-
-+ if( android_fdsan_close_with_tag(h, tag) ){
79-
-+#else
80-
- if( osClose(h) ){
81-
-+#endif
82-
- unixLogErrorAtLine(SQLITE_IOERR_CLOSE, "close",
83-
- pFile ? pFile->zPath : 0, lineno);
84-
- }
85-
-@@ -36310,7 +36326,7 @@
86-
- SimulateIOError( rc=1 );
87-
- if( rc!=0 ){
88-
- storeLastErrno((unixFile*)id, errno);
89-
-- return SQLITE_IOERR_FSTAT;
90-
-+ return unixLogError(SQLITE_IOERR_FSTAT, "fstat", ((unixFile*)id)->zPath);
91-
- }
92-
- *pSize = buf.st_size;
93-
-
94-
-@@ -36346,7 +36362,7 @@
95-
- struct stat buf; /* Used to hold return values of fstat() */
96-
-
97-
- if( osFstat(pFile->h, &buf) ){
98-
-- return SQLITE_IOERR_FSTAT;
99-
-+ return unixLogError(SQLITE_IOERR_FSTAT, "fstat", pFile->zPath);
100-
- }
101-
-
102-
- nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
103-
-@@ -37032,7 +37048,7 @@
104-
- ** with the same permissions.
105-
- */
106-
- if( osFstat(pDbFd->h, &sStat) ){
107-
-- rc = SQLITE_IOERR_FSTAT;
108-
-+ rc = unixLogError(SQLITE_IOERR_FSTAT, "fstat", pDbFd->zPath);
109-
- goto shm_open_err;
110-
- }
111-
-
112-
-@@ -123984,7 +124000,7 @@
113-
- }
114-
- if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
115-
- sqlite3SetString(pzErrMsg, db, "unsupported file format");
116-
-- rc = SQLITE_ERROR;
117-
-+ rc = SQLITE_CORRUPT_BKPT; // Android Change from "rc = SQLITE_ERROR;";
118-
- goto initone_error_out;
119-
- }
120-
-
121-
-@@ -164271,13 +164287,25 @@
122-
- ** module with sqlite.
123-
- */
124-
- if( SQLITE_OK==rc
125-
-+#ifndef ANDROID /* fts3_tokenizer disabled for security reasons */
126-
- && SQLITE_OK==(rc = sqlite3Fts3InitHashTable(db, pHash, "fts3_tokenizer"))
127-
-+#endif
128-
- && SQLITE_OK==(rc = sqlite3_overload_function(db, "snippet", -1))
129-
- && SQLITE_OK==(rc = sqlite3_overload_function(db, "offsets", 1))
130-
- && SQLITE_OK==(rc = sqlite3_overload_function(db, "matchinfo", 1))
131-
- && SQLITE_OK==(rc = sqlite3_overload_function(db, "matchinfo", 2))
132-
- && SQLITE_OK==(rc = sqlite3_overload_function(db, "optimize", 1))
133-
- ){
134-
-+#ifdef SQLITE_ENABLE_FTS3_BACKWARDS
135-
-+ rc = sqlite3_create_module_v2(
136-
-+ db, "fts1", &fts3Module, (void *)pHash, 0
137-
-+ );
138-
-+ if(rc) return rc;
139-
-+ rc = sqlite3_create_module_v2(
140-
-+ db, "fts2", &fts3Module, (void *)pHash, 0
141-
-+ );
142-
-+ if(rc) return rc;
143-
-+#endif
144-
- rc = sqlite3_create_module_v2(
145-
- db, "fts3", &fts3Module, (void *)pHash, hashDestroy
146-
- );
1471
diff --git a/dist/shell.c b/dist/shell.c
1482
index 4e3d397..fc13bd9 100644
1493
--- a/dist/shell.c

0 commit comments

Comments
 (0)