Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Unified Diff: third_party/sqlite/misalignment.patch

Issue 694353003: Get `gn gen` to succeed on Windows (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove GYP_DEFINES code Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/memcmp.patch ('k') | third_party/sqlite/misc.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/misalignment.patch
diff --git a/third_party/sqlite/misalignment.patch b/third_party/sqlite/misalignment.patch
new file mode 100644
index 0000000000000000000000000000000000000000..e42120879248d59f30740a40b1b624a31ffa5e6f
--- /dev/null
+++ b/third_party/sqlite/misalignment.patch
@@ -0,0 +1,48 @@
+diff --git ext/fts2/fts2_icu.c ext/fts2/fts2_icu.c
+index 6b9687e..a8b8359 100644
+--- ext/fts2/fts2_icu.c
++++ ext/fts2/fts2_icu.c
+@@ -118,15 +118,15 @@ static int icuOpen(
+ nChar = nInput+1;
+ pCsr = (IcuCursor *)sqlite3_malloc(
+ sizeof(IcuCursor) + /* IcuCursor */
+- nChar * sizeof(UChar) + /* IcuCursor.aChar[] */
+- (nChar+1) * sizeof(int) /* IcuCursor.aOffset[] */
++ (nChar+1) * sizeof(int) + /* IcuCursor.aOffset[] */
++ nChar * sizeof(UChar) /* IcuCursor.aChar[] */
+ );
+ if( !pCsr ){
+ return SQLITE_NOMEM;
+ }
+ memset(pCsr, 0, sizeof(IcuCursor));
+- pCsr->aChar = (UChar *)&pCsr[1];
+- pCsr->aOffset = (int *)&pCsr->aChar[nChar];
++ pCsr->aOffset = (int *)&pCsr[1];
++ pCsr->aChar = (UChar *)&pCsr->aOffset[nChar+1];
+
+ pCsr->aOffset[iOut] = iInput;
+ U8_NEXT(zInput, iInput, nInput, c);
+diff --git ext/fts3/fts3_icu.c ext/fts3/fts3_icu.c
+index a75b14a..e406168 100644
+--- ext/fts3/fts3_icu.c
++++ ext/fts3/fts3_icu.c
+@@ -118,15 +118,15 @@ static int icuOpen(
+ nChar = nInput+1;
+ pCsr = (IcuCursor *)sqlite3_malloc(
+ sizeof(IcuCursor) + /* IcuCursor */
+- nChar * sizeof(UChar) + /* IcuCursor.aChar[] */
+- (nChar+1) * sizeof(int) /* IcuCursor.aOffset[] */
++ (nChar+1) * sizeof(int) + /* IcuCursor.aOffset[] */
++ nChar * sizeof(UChar) /* IcuCursor.aChar[] */
+ );
+ if( !pCsr ){
+ return SQLITE_NOMEM;
+ }
+ memset(pCsr, 0, sizeof(IcuCursor));
+- pCsr->aChar = (UChar *)&pCsr[1];
+- pCsr->aOffset = (int *)&pCsr->aChar[nChar];
++ pCsr->aOffset = (int *)&pCsr[1];
++ pCsr->aChar = (UChar *)&pCsr->aOffset[nChar+1];
+
+ pCsr->aOffset[iOut] = iInput;
+ U8_NEXT(zInput, iInput, nInput, c);
« no previous file with comments | « third_party/sqlite/memcmp.patch ('k') | third_party/sqlite/misc.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698