diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 13:41:24 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 13:41:24 +0000 |
commit | b0b373d689287801f0057377ff9fea98b2accfa4 (patch) | |
tree | 2db408c2238ecc6098a4045e5897841d1bd032dd /base/icu_util.cc | |
parent | d26cd52757991911c111279e900d732ba283dd05 (diff) | |
download | chromium_src-b0b373d689287801f0057377ff9fea98b2accfa4.zip chromium_src-b0b373d689287801f0057377ff9fea98b2accfa4.tar.gz chromium_src-b0b373d689287801f0057377ff9fea98b2accfa4.tar.bz2 |
ICU isn't packaged on the Mac as it is on Windows.
Review URL: http://chrome-reviews.prom.corp.google.com/1092
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/icu_util.cc')
-rw-r--r-- | base/icu_util.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/base/icu_util.cc b/base/icu_util.cc index 4e72632..fdb2003 100644 --- a/base/icu_util.cc +++ b/base/icu_util.cc @@ -27,7 +27,12 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include "build/build_config.h" + +#ifdef OS_WIN #include <windows.h> +#endif + #include <string> #include "base/icu_util.h" @@ -40,10 +45,11 @@ namespace icu_util { bool Initialize() { +#ifdef OS_WIN // Assert that we are not called more than once. Even though calling this // function isn't harmful (ICU can handle it), being called twice probably // indicates a programming error. -#ifndef DEBUG +#ifndef NDEBUG static bool called_once = false; DCHECK(!called_once); called_once = true; @@ -65,6 +71,11 @@ bool Initialize() { UErrorCode err = U_ZERO_ERROR; udata_setCommonData(reinterpret_cast<void*>(addr), &err); return err == U_ZERO_ERROR; +#else + // Windows ships ICU's data separate, so it needs to link the code to data + // here. Other platforms don't need this. + return true; +#endif // OS_WIN } } // namespace icu_util |