|
1 | | ---- orig/shell.c 2018-02-18 23:53:25.407627650 -0800 |
2 | | -+++ shell.c 2018-02-18 23:53:25.467627374 -0800 |
| 1 | +--- orig/shell.c 2019-06-11 15:05:36.341739007 -0700 |
| 2 | ++++ shell.c 2019-06-11 15:05:36.401739332 -0700 |
3 | 3 | @@ -87,6 +87,12 @@ |
4 | 4 | #endif |
5 | 5 | #include <ctype.h> |
6 | 6 | #include <stdarg.h> |
7 | 7 | +// Begin Android Add |
8 | 8 | +#ifndef NO_ANDROID_FUNCS |
9 | | -+#include "IcuUtils.h" |
| 9 | ++#include <aicu/AIcu.h> |
10 | 10 | +#include <sqlite3_android.h> |
11 | 11 | +#endif |
12 | 12 | +// End Android Add |
13 | 13 |
|
14 | 14 | #if !defined(_WIN32) && !defined(WIN32) |
15 | 15 | # include <signal.h> |
16 | | -@@ -10389,6 +10395,23 @@ |
17 | | - editFunc, 0, 0); |
| 16 | +@@ -11698,6 +11704,23 @@ |
18 | 17 | sqlite3_create_function(p->db, "edit", 2, SQLITE_UTF8, 0, |
19 | 18 | editFunc, 0, 0); |
| 19 | + #endif |
20 | 20 | + |
21 | | -+ // Begin Android Add |
22 | | -+ #ifndef NO_ANDROID_FUNCS |
23 | | -+ InitializeIcuOrDie(); |
24 | | -+ int err = register_localized_collators(p->db, "en_US", 0); |
25 | | -+ if (err != SQLITE_OK) { |
26 | | -+ fprintf(stderr, "register_localized_collators() failed\n"); |
27 | | -+ exit(1); |
28 | | -+ } |
29 | | -+ err = register_android_functions(p->db, 0); |
30 | | -+ if (err != SQLITE_OK) { |
31 | | -+ fprintf(stderr, "register_android_functions() failed\n"); |
32 | | -+ exit(1); |
33 | | -+ } |
34 | | -+ #endif |
35 | | -+ // End Android Add |
| 21 | ++// Begin Android Add |
| 22 | ++#ifndef NO_ANDROID_FUNCS |
| 23 | ++ AIcu_initializeIcuOrDie(); |
| 24 | ++ int err = register_localized_collators(p->db, "en_US", 0); |
| 25 | ++ if (err != SQLITE_OK) { |
| 26 | ++ fprintf(stderr, "register_localized_collators() failed\n"); |
| 27 | ++ exit(1); |
| 28 | ++ } |
| 29 | ++ err = register_android_functions(p->db, 0); |
| 30 | ++ if (err != SQLITE_OK) { |
| 31 | ++ fprintf(stderr, "register_android_functions() failed\n"); |
| 32 | ++ exit(1); |
| 33 | ++ } |
| 34 | ++#endif |
| 35 | ++// End Android Add |
36 | 36 | + |
37 | 37 | if( p->openMode==SHELL_OPEN_ZIPFILE ){ |
38 | 38 | char *zSql = sqlite3_mprintf( |
39 | 39 | "CREATE VIRTUAL TABLE zip USING zipfile(%Q);", p->zDbFilename); |
40 | | ---- orig/sqlite3.c 2018-02-18 23:53:25.459627411 -0800 |
41 | | -+++ sqlite3.c 2018-08-22 15:28:04.016188846 -0700 |
42 | | -@@ -30672,6 +30672,10 @@ |
| 40 | +--- orig/sqlite3.c 2019-06-11 15:05:36.393739289 -0700 |
| 41 | ++++ sqlite3.c 2019-06-11 15:05:36.449739593 -0700 |
| 42 | +@@ -32438,6 +32438,10 @@ |
43 | 43 | # include <sys/mount.h> |
44 | 44 | #endif |
45 | 45 |
|
|
50 | 50 | #ifdef HAVE_UTIME |
51 | 51 | # include <utime.h> |
52 | 52 | #endif |
53 | | -@@ -31422,6 +31426,12 @@ |
| 53 | +@@ -33197,6 +33201,12 @@ |
54 | 54 | #if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0) |
55 | 55 | osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC); |
56 | 56 | #endif |
|
63 | 63 | } |
64 | 64 | return fd; |
65 | 65 | } |
66 | | -@@ -31954,7 +31964,13 @@ |
| 66 | +@@ -33777,7 +33787,13 @@ |
67 | 67 | ** and move on. |
68 | 68 | */ |
69 | 69 | static void robust_close(unixFile *pFile, int h, int lineno){ |
|
77 | 77 | unixLogErrorAtLine(SQLITE_IOERR_CLOSE, "close", |
78 | 78 | pFile ? pFile->zPath : 0, lineno); |
79 | 79 | } |
80 | | -@@ -34428,7 +34444,7 @@ |
| 80 | +@@ -36310,7 +36326,7 @@ |
81 | 81 | SimulateIOError( rc=1 ); |
82 | 82 | if( rc!=0 ){ |
83 | 83 | storeLastErrno((unixFile*)id, errno); |
|
86 | 86 | } |
87 | 87 | *pSize = buf.st_size; |
88 | 88 |
|
89 | | -@@ -34464,7 +34480,7 @@ |
| 89 | +@@ -36346,7 +36362,7 @@ |
90 | 90 | struct stat buf; /* Used to hold return values of fstat() */ |
91 | 91 |
|
92 | 92 | if( osFstat(pFile->h, &buf) ){ |
|
95 | 95 | } |
96 | 96 |
|
97 | 97 | nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk; |
98 | | -@@ -35139,7 +35155,7 @@ |
| 98 | +@@ -37032,7 +37048,7 @@ |
99 | 99 | ** with the same permissions. |
100 | 100 | */ |
101 | 101 | if( osFstat(pDbFd->h, &sStat) ){ |
|
104 | 104 | goto shm_open_err; |
105 | 105 | } |
106 | 106 |
|
107 | | -@@ -118054,7 +118070,7 @@ |
| 107 | +@@ -123984,7 +124000,7 @@ |
108 | 108 | } |
109 | 109 | if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){ |
110 | 110 | sqlite3SetString(pzErrMsg, db, "unsupported file format"); |
|
113 | 113 | goto initone_error_out; |
114 | 114 | } |
115 | 115 |
|
116 | | -@@ -152769,13 +152785,25 @@ |
| 116 | +@@ -164271,13 +164287,25 @@ |
117 | 117 | ** module with sqlite. |
118 | 118 | */ |
119 | 119 | if( SQLITE_OK==rc |
|
0 commit comments