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

Unified Diff: src/icu_util.cc

Issue 2182043002: Set correct default icu data file for big endian (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adjust code for consistency Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/icu_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/icu_util.cc
diff --git a/src/icu_util.cc b/src/icu_util.cc
index a6f0453fc23e95145b1965eb3688e6968551f7f4..bf59fd0aec5629bac0787e4ea768279828921643 100644
--- a/src/icu_util.cc
+++ b/src/icu_util.cc
@@ -15,6 +15,7 @@
#include "unicode/putil.h"
#include "unicode/udata.h"
+#include "src/base/build_config.h"
#include "src/base/file-utils.h"
#define ICU_UTIL_DATA_FILE 0
@@ -50,7 +51,13 @@ bool InitializeICUDefaultLocation(const char* exec_path,
return InitializeICU(icu_data_file);
}
char* icu_data_file_default;
+#if defined(V8_TARGET_LITTLE_ENDIAN)
RelativePath(&icu_data_file_default, exec_path, "icudtl.dat");
+#elif defined(V8_TARGET_BIG_ENDIAN)
+ RelativePath(&icu_data_file_default, exec_path, "icudtb.dat");
+#else
+#error Unknown byte ordering
+#endif
bool result = InitializeICU(icu_data_file_default);
free(icu_data_file_default);
return result;
« no previous file with comments | « src/icu_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698