diff --git a/icu4c/source/common/unicode/utf_old.h b/icu4c/source/common/unicode/utf_old.h index 38d13efb6d9..f9125b1dd2e 100644 --- a/icu4c/source/common/unicode/utf_old.h +++ b/icu4c/source/common/unicode/utf_old.h @@ -1,11 +1,11 @@ /* ******************************************************************************* * -* Copyright (C) 2002-2011, International Business Machines +* Copyright (C) 2002-2012, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* -* file name: utf.h +* file name: utf_old.h * encoding: US-ASCII * tab size: 8 (not used) * indentation:4 @@ -298,7 +298,7 @@ typedef int32_t UTextOffset; * Code point comparisons need to be in uint32_t because UChar32 * may be a signed type, and negative values must be recognized. * - * @deprecated ICU 2.4. Use U8_LENGTH instead, see utf_old.h. + * @deprecated ICU 2.4. Use U8_LENGTH instead, see utf.h. */ #if 1 # define UTF8_CHAR_LENGTH(c) \ diff --git a/icu4c/source/extra/uconv/uconv.cpp b/icu4c/source/extra/uconv/uconv.cpp index 41ed32caf46..aaa0ab8b742 100644 --- a/icu4c/source/extra/uconv/uconv.cpp +++ b/icu4c/source/extra/uconv/uconv.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/icu4c/source/test/cintltst/cintltst.h b/icu4c/source/test/cintltst/cintltst.h index a4755396192..6e6d1614f0a 100644 --- a/icu4c/source/test/cintltst/cintltst.h +++ b/icu4c/source/test/cintltst/cintltst.h @@ -22,6 +22,12 @@ The main root for C API tests #include "unicode/utypes.h" #include "unicode/putil.h" #include "unicode/ctest.h" + +#if U_NO_DEFAULT_INCLUDE_UTF_HEADERS +/* deprecated - make tests pass with U_NO_DEFAULT_INCLUDE_UTF_HEADERS */ +#include "unicode/utf_old.h" +#endif + #include #ifndef U_USE_DEPRECATED_API diff --git a/icu4c/source/test/intltest/intltest.h b/icu4c/source/test/intltest/intltest.h index 3fef2d87917..3851c712163 100644 --- a/icu4c/source/test/intltest/intltest.h +++ b/icu4c/source/test/intltest/intltest.h @@ -15,13 +15,19 @@ #include "unicode/fmtable.h" #include "unicode/testlog.h" + +#if U_NO_DEFAULT_INCLUDE_UTF_HEADERS +/* deprecated - make tests pass with U_NO_DEFAULT_INCLUDE_UTF_HEADERS */ +#include "unicode/utf_old.h" +#endif + /** * \def ICU_USE_THREADS * * Enables multi-threaded testing. Moved here from uconfig.h. * Default: enabled * - * This switched used to allow thread support (use of mutexes) to be compiled out of ICU. + * This switch used to allow thread support (use of mutexes) to be compiled out of ICU. */ #ifdef ICU_USE_THREADS /* Use the predefined value. */ diff --git a/icu4c/source/tools/gendict/gendict.cpp b/icu4c/source/tools/gendict/gendict.cpp index c099c82277a..81affcd9c0f 100644 --- a/icu4c/source/tools/gendict/gendict.cpp +++ b/icu4c/source/tools/gendict/gendict.cpp @@ -20,6 +20,7 @@ #include "unicode/ucharstrie.h" #include "unicode/bytestrie.h" #include "unicode/ucnv.h" +#include "unicode/utf16.h" #include "charstr.h" #include "dictionarydata.h" diff --git a/icu4c/source/tools/genrb/read.c b/icu4c/source/tools/genrb/read.c index 8efad67c1ac..358c683577e 100644 --- a/icu4c/source/tools/genrb/read.c +++ b/icu4c/source/tools/genrb/read.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2011, International Business Machines +* Copyright (C) 1998-2012, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -19,6 +19,7 @@ #include "read.h" #include "errmsg.h" #include "unicode/ustring.h" +#include "unicode/utf16.h" #define OPENBRACE 0x007B #define CLOSEBRACE 0x007D diff --git a/icu4c/source/tools/genrb/reslist.c b/icu4c/source/tools/genrb/reslist.c index 209eea38adc..829dc22f7e5 100644 --- a/icu4c/source/tools/genrb/reslist.c +++ b/icu4c/source/tools/genrb/reslist.c @@ -27,7 +27,7 @@ #include "uelement.h" #include "uinvchar.h" #include "ustr_imp.h" - +#include "unicode/utf16.h" /* * Align binary data at a 16-byte offset from the start of the resource bundle, * to be safe for any data type it may contain. diff --git a/icu4c/source/tools/genrb/ustr.c b/icu4c/source/tools/genrb/ustr.c index faa03adef4e..91e6bd785ac 100644 --- a/icu4c/source/tools/genrb/ustr.c +++ b/icu4c/source/tools/genrb/ustr.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2011, International Business Machines +* Copyright (C) 1998-2012, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -20,6 +20,7 @@ #include "cstring.h" #include "unicode/ustring.h" #include "unicode/putil.h" +#include "unicode/utf16.h" /* Protos */ static void ustr_resize(struct UString *s, int32_t len, UErrorCode *status); diff --git a/icu4c/source/tools/genrb/wrtxml.cpp b/icu4c/source/tools/genrb/wrtxml.cpp index 7e760534a5a..4a642b9eb87 100644 --- a/icu4c/source/tools/genrb/wrtxml.cpp +++ b/icu4c/source/tools/genrb/wrtxml.cpp @@ -33,6 +33,8 @@ #include "ustr.h" #include "prscmnts.h" #include "unicode/unistr.h" +#include "unicode/utf8.h" +#include "unicode/utf16.h" #include U_NAMESPACE_USE @@ -251,7 +253,7 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength return NULL; } - if((destLen+UTF8_CHAR_LENGTH(c)) < destCap){ + if((destLen+U8_LENGTH(c)) < destCap){ /* ASCII Range */ if(c <=0x007F){