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

Side by Side Diff: third_party/sqlite/src/shell_icu_linux.c

Issue 3108030: Move bundled copy of sqlite one level deeper to better separate it... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/shell.c ('k') | third_party/sqlite/src/shell_icu_win.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Copyright 2007 Google Inc. All Rights Reserved.
2 **/
3
4 #include <limits.h>
5 #include <unistd.h>
6 #include "unicode/udata.h"
7
8 /*
9 ** This function attempts to load the ICU data tables from a data file.
10 ** Returns 0 on failure, nonzero on success.
11 ** This a hack job of icu_utils.cc:Initialize(). It's Chrome-specific code.
12 */
13 int sqlite_shell_init_icu() {
14 char bin_dir[PATH_MAX + 1];
15 int bin_dir_size = readlink("/proc/self/exe", bin_dir, PATH_MAX);
16 if (bin_dir_size < 0 || bin_dir_size > PATH_MAX)
17 return 0;
18 bin_dir[bin_dir_size] = 0;;
19
20 u_setDataDirectory(bin_dir);
21 // Only look for the packaged data file;
22 // the default behavior is to look for individual files.
23 UErrorCode err = U_ZERO_ERROR;
24 udata_setFileAccess(UDATA_ONLY_PACKAGES, &err);
25 return err == U_ZERO_ERROR;
26 }
OLDNEW
« no previous file with comments | « third_party/sqlite/src/shell.c ('k') | third_party/sqlite/src/shell_icu_win.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698