From: Michael Ow Date: Thu, 19 Sep 2013 20:47:22 +0000 (+0000) Subject: ICU-10398 Fix uconfig test errors in ICU 52 X-Git-Tag: milestone-59-0-1~2469 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5a9a38924bbeb6587337e082592cbbe460ca5d9;p=icu ICU-10398 Fix uconfig test errors in ICU 52 X-SVN-Rev: 34404 --- diff --git a/icu4c/source/common/unicode/unistr.h b/icu4c/source/common/unicode/unistr.h index 248f1d5412e..c6e8b4466ad 100644 --- a/icu4c/source/common/unicode/unistr.h +++ b/icu4c/source/common/unicode/unistr.h @@ -54,12 +54,10 @@ U_STABLE int32_t U_EXPORT2 u_strlen(const UChar *s); #endif -#ifndef U_HIDE_INTERNAL_API /** * \def U_STRING_CASE_MAPPER_DEFINED * @internal */ - #ifndef U_STRING_CASE_MAPPER_DEFINED #define U_STRING_CASE_MAPPER_DEFINED @@ -74,7 +72,6 @@ UStringCaseMapper(const UCaseMap *csm, UErrorCode *pErrorCode); #endif -#endif /* U_HIDE_INTERNAL_API */ U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/unicode/dcfmtsym.h b/icu4c/source/i18n/unicode/dcfmtsym.h index bfb14500524..609ce027ace 100644 --- a/icu4c/source/i18n/unicode/dcfmtsym.h +++ b/icu4c/source/i18n/unicode/dcfmtsym.h @@ -350,7 +350,6 @@ private: void setCurrencyForSymbols(); public: -#ifndef U_HIDE_INTERNAL_API /** * _Internal_ function - more efficient version of getSymbol, * returning a const reference to one of the symbol strings. @@ -364,6 +363,7 @@ public: */ inline const UnicodeString &getConstSymbol(ENumberFormatSymbol symbol) const; +#ifndef U_HIDE_INTERNAL_API /** * Returns that pattern stored in currecy info. Internal API for use by NumberFormat API. * @internal @@ -458,10 +458,12 @@ DecimalFormatSymbols::getLocale() const { return locale; } +#ifndef U_HIDE_INTERNAL_API inline const UChar* DecimalFormatSymbols::getCurrencyPattern() const { return currPattern; } +#endif /* U_HIDE_INTERNAL_API */ U_NAMESPACE_END diff --git a/icu4c/source/i18n/unicode/decimfmt.h b/icu4c/source/i18n/unicode/decimfmt.h index 5f14de4460d..ab167ce4711 100644 --- a/icu4c/source/i18n/unicode/decimfmt.h +++ b/icu4c/source/i18n/unicode/decimfmt.h @@ -41,7 +41,6 @@ #include "unicode/curramt.h" #include "unicode/enumset.h" -#ifndef U_HIDE_INTERNAL_API /** * \def UNUM_DECIMALFORMAT_INTERNAL_SIZE * @internal @@ -49,7 +48,6 @@ #if UCONFIG_FORMAT_FASTPATHS_49 #define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16 #endif -#endif /* U_HIDE_INTERNAL_API */ U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/unicode/dtfmtsym.h b/icu4c/source/i18n/unicode/dtfmtsym.h index e246bdfb0ec..bc82f6fc1cd 100644 --- a/icu4c/source/i18n/unicode/dtfmtsym.h +++ b/icu4c/source/i18n/unicode/dtfmtsym.h @@ -505,7 +505,6 @@ public: */ Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; -#ifndef U_HIDE_INTERNAL_API /** * Constants for capitalization context usage types. * @internal @@ -528,7 +527,6 @@ public: kCapContextUsageMetazoneShort, kCapContextUsageTypeCount }; -#endif /* U_HIDE_INTERNAL_API */ /** * ICU "poor man's RTTI", returns a UClassID for the actual class. diff --git a/icu4c/source/i18n/unicode/fmtable.h b/icu4c/source/i18n/unicode/fmtable.h index 4d9e0791034..4d6bd3f7388 100644 --- a/icu4c/source/i18n/unicode/fmtable.h +++ b/icu4c/source/i18n/unicode/fmtable.h @@ -33,7 +33,6 @@ U_NAMESPACE_BEGIN class CharString; class DigitList; -#ifndef U_HIDE_INTERNAL_API /** * \def UNUM_INTERNAL_STACKARRAY_SIZE * @internal @@ -43,7 +42,6 @@ class DigitList; #else #define UNUM_INTERNAL_STACKARRAY_SIZE 128 #endif -#endif /* U_HIDE_INTERNAL_API */ /** * Formattable objects can be passed to the Format class or @@ -724,9 +722,11 @@ inline UnicodeString& Formattable::getString(void) { return *fValue.fString; } +#ifndef U_HIDE_DEPRECATED_API inline int32_t Formattable::getLong(UErrorCode* status) const { return getLong(*status); } +#endif /* U_HIDE_DEPRECATED_API */ inline UFormattable* Formattable::toUFormattable() { return (UFormattable*)(this); diff --git a/icu4c/source/i18n/unicode/numsys.h b/icu4c/source/i18n/unicode/numsys.h index 2335228214c..1777d915040 100644 --- a/icu4c/source/i18n/unicode/numsys.h +++ b/icu4c/source/i18n/unicode/numsys.h @@ -18,14 +18,12 @@ #include "unicode/utypes.h" -#ifndef U_HIDE_INTERNAL_API /** * \def NUMSYS_NAME_CAPACITY * Size of a numbering system name. * @internal */ #define NUMSYS_NAME_CAPACITY 8 -#endif /* U_HIDE_INTERNAL_API */ /** diff --git a/icu4c/source/i18n/unicode/tblcoll.h b/icu4c/source/i18n/unicode/tblcoll.h index 947ac65d59d..367df52c6dc 100644 --- a/icu4c/source/i18n/unicode/tblcoll.h +++ b/icu4c/source/i18n/unicode/tblcoll.h @@ -846,10 +846,12 @@ inline void RuleBasedCollator::setUCollator(UCollator *collator) setRuleStringFromCollator(); } +#ifndef U_HIDE_INTERNAL_API inline const UCollator * RuleBasedCollator::getUCollator() { return ucollator; } +#endif /* U_HIDE_INTERNAL_API */ U_NAMESPACE_END diff --git a/icu4c/source/i18n/unicode/translit.h b/icu4c/source/i18n/unicode/translit.h index 57f4f059591..469e94316d9 100644 --- a/icu4c/source/i18n/unicode/translit.h +++ b/icu4c/source/i18n/unicode/translit.h @@ -1308,6 +1308,7 @@ inline void Transliterator::setID(const UnicodeString& id) { ID.truncate(ID.length()-1); } +#ifndef U_HIDE_INTERNAL_API inline Transliterator::Token Transliterator::integerToken(int32_t i) { Token t; t.integer = i; @@ -1319,6 +1320,7 @@ inline Transliterator::Token Transliterator::pointerToken(void* p) { t.pointer = p; return t; } +#endif /* U_HIDE_INTERNAL_API */ U_NAMESPACE_END diff --git a/icu4c/source/i18n/unicode/tzfmt.h b/icu4c/source/i18n/unicode/tzfmt.h index cc3ef0a387a..b4adc93b5f5 100644 --- a/icu4c/source/i18n/unicode/tzfmt.h +++ b/icu4c/source/i18n/unicode/tzfmt.h @@ -190,13 +190,11 @@ typedef enum UTimeZoneFormatGMTOffsetPatternType { UTZFMT_PAT_NEGATIVE_H, #endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_INTERNAL_API /** * Number of UTimeZoneFormatGMTOffsetPatternType types. * @internal */ UTZFMT_PAT_COUNT -#endif /* U_HIDE_INTERNAL_API */ } UTimeZoneFormatGMTOffsetPatternType; /** diff --git a/icu4c/source/i18n/unicode/unum.h b/icu4c/source/i18n/unicode/unum.h index 82d343e06c6..7cc5f538f9f 100644 --- a/icu4c/source/i18n/unicode/unum.h +++ b/icu4c/source/i18n/unicode/unum.h @@ -880,7 +880,7 @@ typedef enum UNumberFormatAttribute { * @draft ICU 51 */ UNUM_SCALE = UNUM_LENIENT_PARSE + 2, #endif /* U_HIDE_DRAFT_API */ -#ifndef U_HIDE_INTERNAL_API + /** Count of "regular" numeric attributes. * @internal */ UNUM_NUMERIC_ATTRIBUTE_COUNT, @@ -889,7 +889,6 @@ typedef enum UNumberFormatAttribute { * All items after this one are stored in boolean form. * @internal */ UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF, -#endif /* U_HIDE_INTERNAL_API */ /** If 1, specifies that if setting the "max integer digits" attribute would truncate a value, set an error status rather than silently truncating. * For example, formatting the value 1234 with 4 max int digits would succeed, but formatting 12345 would fail. There is no effect on parsing. @@ -905,11 +904,9 @@ typedef enum UNumberFormatAttribute { */ UNUM_PARSE_NO_EXPONENT, -#ifndef U_HIDE_INTERNAL_API /** Limit of boolean attributes. * @internal */ UNUM_LIMIT_BOOLEAN_ATTRIBUTE -#endif /* U_HIDE_INTERNAL_API */ } UNumberFormatAttribute; /** diff --git a/icu4c/source/test/cintltst/cloctst.c b/icu4c/source/test/cintltst/cloctst.c index b4e89404667..89b46ad4077 100644 --- a/icu4c/source/test/cintltst/cloctst.c +++ b/icu4c/source/test/cintltst/cloctst.c @@ -1073,6 +1073,7 @@ static void TestDisplayNameBrackets() log_data_err("uloc_getDisplayName for displayLocale %s and namedLocale %s returns unexpected name or status %s\n", itemPtr->displayLocale, itemPtr->namedLocale, myErrorName(status)); } +#if !UCONFIG_NO_FORMATTING status = U_ZERO_ERROR; uldn = uldn_open(itemPtr->displayLocale, ULDN_STANDARD_NAMES, &status); if (U_SUCCESS(status)) { @@ -1092,6 +1093,7 @@ static void TestDisplayNameBrackets() } else { log_data_err("uldn_open fails for displayLocale %s, status=%s\n", itemPtr->displayLocale, u_errorName(status)); } +#endif } } diff --git a/icu4c/source/test/intltest/csdetest.cpp b/icu4c/source/test/intltest/csdetest.cpp index 9776e9b10ae..4363380b212 100644 --- a/icu4c/source/test/intltest/csdetest.cpp +++ b/icu4c/source/test/intltest/csdetest.cpp @@ -814,7 +814,7 @@ void CharsetDetectionTest::Ticket6394Test() { // similar Windows and non-Windows SBCS encodings. State was kept in the shared // Charset Recognizer objects, and could be overwritten. void CharsetDetectionTest::Ticket6954Test() { -#if !UCONFIG_NO_CONVERSION +#if !UCONFIG_NO_CONVERSION && !UCONFIG_NO_FORMATTING UErrorCode status = U_ZERO_ERROR; UnicodeString sISO = "This is a small sample of some English text. Just enough to be sure that it detects correctly."; UnicodeString ssWindows("This is another small sample of some English text. Just enough to be sure that it detects correctly." diff --git a/icu4c/source/tools/genrb/derb.c b/icu4c/source/tools/genrb/derb.c index 972e2c3d5bc..8c8fdd81c32 100644 --- a/icu4c/source/tools/genrb/derb.c +++ b/icu4c/source/tools/genrb/derb.c @@ -27,6 +27,8 @@ #include "toolutil.h" #include "ustrfmt.h" +#if !UCONFIG_NO_FORMATTING + #define DERB_VERSION "1.1" #define DERB_DEFAULT_TRUNC 80 @@ -667,6 +669,14 @@ static void reportError(const char *pname, UErrorCode *status, const char *when) u_fprintf(ustderr, "%s: error %d while %s: %s\n", pname, *status, when, u_errorName(*status)); } +#else +extern int +main(int argc, char* argv[]) { + /* Changing stdio.h ustdio.h requires that formatting not be disabled. */ + return 3; +} +#endif /* !UCONFIG_NO_FORMATTING */ + /* * Local Variables: * indent-tabs-mode: nil