OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/i18n/icu_util.h" | 5 #include "base/i18n/icu_util.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 15 matching lines...) Expand all Loading... |
26 #endif | 26 #endif |
27 | 27 |
28 #define ICU_UTIL_DATA_FILE 0 | 28 #define ICU_UTIL_DATA_FILE 0 |
29 #define ICU_UTIL_DATA_SHARED 1 | 29 #define ICU_UTIL_DATA_SHARED 1 |
30 #define ICU_UTIL_DATA_STATIC 2 | 30 #define ICU_UTIL_DATA_STATIC 2 |
31 | 31 |
32 #ifndef ICU_UTIL_DATA_IMPL | 32 #ifndef ICU_UTIL_DATA_IMPL |
33 | 33 |
34 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
35 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_SHARED | 35 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_SHARED |
| 36 #elif defined(OS_IOS) |
| 37 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_FILE |
36 #else | 38 #else |
37 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_STATIC | 39 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_STATIC |
38 #endif | 40 #endif |
39 | 41 |
40 #endif // ICU_UTIL_DATA_IMPL | 42 #endif // ICU_UTIL_DATA_IMPL |
41 | 43 |
42 #if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE | 44 #if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE |
43 #define ICU_UTIL_DATA_FILE_NAME "icudt" U_ICU_VERSION_SHORT "l.dat" | 45 #define ICU_UTIL_DATA_FILE_NAME "icudt" U_ICU_VERSION_SHORT "l.dat" |
44 #elif ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_SHARED | 46 #elif ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_SHARED |
45 #define ICU_UTIL_DATA_SYMBOL "icudt" U_ICU_VERSION_SHORT "_dat" | 47 #define ICU_UTIL_DATA_SYMBOL "icudt" U_ICU_VERSION_SHORT "_dat" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 124 } |
123 } | 125 } |
124 UErrorCode err = U_ZERO_ERROR; | 126 UErrorCode err = U_ZERO_ERROR; |
125 udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err); | 127 udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err); |
126 return err == U_ZERO_ERROR; | 128 return err == U_ZERO_ERROR; |
127 #endif // OS check | 129 #endif // OS check |
128 #endif | 130 #endif |
129 } | 131 } |
130 | 132 |
131 } // namespace icu_util | 133 } // namespace icu_util |
OLD | NEW |