]> granicus.if.org Git - icu/commitdiff
ICU-10373 fix -DU_USING_ICU_NAMESPACE=0 issues
authorSteven R. Loomis <srl@icu-project.org>
Tue, 10 Sep 2013 00:13:41 +0000 (00:13 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Tue, 10 Sep 2013 00:13:41 +0000 (00:13 +0000)
X-SVN-Rev: 34251

19 files changed:
icu4c/source/common/brkiter.cpp
icu4c/source/common/locavailable.cpp
icu4c/source/common/rbbi.cpp
icu4c/source/common/ucnv_bld.cpp
icu4c/source/common/ucnv_io.cpp
icu4c/source/common/uinit.cpp
icu4c/source/common/unames.cpp
icu4c/source/common/uresbund.cpp
icu4c/source/i18n/calendar.cpp
icu4c/source/i18n/chnsecal.cpp
icu4c/source/i18n/coll.cpp
icu4c/source/i18n/csdetect.cpp
icu4c/source/i18n/dangical.cpp
icu4c/source/i18n/gender.cpp
icu4c/source/i18n/numfmt.cpp
icu4c/source/i18n/timezone.cpp
icu4c/source/i18n/ucol_bld.cpp
icu4c/source/i18n/ucurr.cpp
icu4c/source/i18n/zonemeta.cpp

index 56a532d4a5d0ac100629b581899ec63a228a62d1..3b6c94dc611cfa453f3645706e3fcbfa191d18a3 100644 (file)
@@ -266,12 +266,13 @@ ICUBreakIteratorService::~ICUBreakIteratorService() {}
 
 // -------------------------------------
 
-U_NAMESPACE_END
-
 // defined in ucln_cmn.h
+U_NAMESPACE_END
 
+static icu::UInitOnce gInitOnce;
 static icu::ICULocaleService* gService = NULL;
-static UInitOnce gInitOnce;
+
+
 
 /**
  * Release all static memory held by breakiterator.
index 62cdf972cba9e6c51ae3a507adec4e3329d83e3d..a04c20468c08891aa0d2239d492922ee1da620b4 100644 (file)
 
 // C++ API ----------------------------------------------------------------- ***
 
+U_NAMESPACE_BEGIN
+
 static icu::Locale*  availableLocaleList = NULL;
 static int32_t  availableLocaleListCount;
 static UInitOnce gInitOnce = U_INITONCE_INITIALIZER;
 
+U_NAMESPACE_END
+
 U_CDECL_BEGIN
 
 static UBool U_CALLCONV locale_available_cleanup(void)
@@ -172,3 +176,4 @@ uloc_countAvailable()
     _load_installedLocales();
     return _installedLocalesCount;
 }
+
index 8cc0ed2cbbba0fe0479dd8bd9026617c31120ec5..aa745c1c7073995b4e5fe4739a8dd74118f00578 100644 (file)
@@ -1788,12 +1788,13 @@ int32_t RuleBasedBreakIterator::checkDictionary(int32_t startPos,
     return (reverse ? startPos : endPos);
 }
 
+// defined in ucln_cmn.h
+
 U_NAMESPACE_END
 
-// defined in ucln_cmn.h
 
 static icu::UStack *gLanguageBreakFactories = NULL;
-static UInitOnce    gLanguageBreakFactoriesInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce    gLanguageBreakFactoriesInitOnce = U_INITONCE_INITIALIZER;
 
 /**
  * Release all static memory held by breakiterator.  
index 57d15e7c141eb32335e7d973f328a85db7400398..e07ec6210e1cd9a042f94d96fbb5d199c54a1f5d 100644 (file)
@@ -44,7 +44,7 @@
 #include "ucln_cmn.h"
 #include "ustr_cnv.h"
 
-
+U_NAMESPACE_BEGIN
 
 #if 0
 #include <stdio.h>
@@ -540,7 +540,7 @@ ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData)
  * Load a non-algorithmic converter.
  * If pkg==NULL, then this function must be called inside umtx_lock(&cnvCacheMutex).
  */
-UConverterSharedData *
+U_CAPI UConverterSharedData *
 ucnv_load(UConverterLoadArgs *pArgs, UErrorCode *err) {
     UConverterSharedData *mySharedConverterData;
 
@@ -890,7 +890,7 @@ ucnv_canCreateConverter(const char *converterName, UErrorCode *err) {
     return U_SUCCESS(*err);
 }
 
-UConverter *
+U_CAPI UConverter *
 ucnv_createAlgorithmicConverter(UConverter *myUConverter,
                                 UConverterType type,
                                 const char *locale, uint32_t options,
@@ -1702,4 +1702,6 @@ ucnv_swap(const UDataSwapper *ds,
 
 #endif /* #if !UCONFIG_NO_LEGACY_CONVERSION */
 
+U_NAMESPACE_END
+
 #endif
index 091a1b7c6c3ef6f41da3eb18674e635ff23d65c2..0ccb441698bd0596319005d521ebc112ee92935a 100644 (file)
  *
  */
 
+U_NAMESPACE_BEGIN
+
 /**
  * Used by the UEnumeration API
  */
@@ -1336,6 +1338,9 @@ ucnv_swapAliases(const UDataSwapper *ds,
 
 #endif
 
+
+U_NAMESPACE_END
+
 /*
  * Hey, Emacs, please set the following:
  *
index d9af2670629789ef9c346c743c852b146c5566db..9b745ab14d1c64f7b42accae327124f2f66f618d 100644 (file)
@@ -24,6 +24,8 @@
 #include "umutex.h"
 #include "utracimp.h"
 
+U_NAMESPACE_BEGIN
+
 static UInitOnce gICUInitOnce = U_INITONCE_INITIALIZER;
 
 static UBool U_CALLCONV uinit_cleanup() {
@@ -64,3 +66,5 @@ u_init(UErrorCode *status) {
     umtx_initOnce(gICUInitOnce, &initData, *status);
     UTRACE_EXIT_STATUS(*status);
 }
+
+U_NAMESPACE_END
index eafe70ccb8a45de7e60a3a136bbb07bbd25e0bbd..de74b4abaa23804220b625f54b6fac32d030df2a 100644 (file)
@@ -29,6 +29,8 @@
 #include "udataswp.h"
 #include "uprops.h"
 
+U_NAMESPACE_BEGIN
+
 /* prototypes ------------------------------------------------------------- */
 
 #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
@@ -2084,6 +2086,8 @@ uchar_swapNames(const UDataSwapper *ds,
     return headerSize+(int32_t)offset;
 }
 
+U_NAMESPACE_END
+
 /*
  * Hey, Emacs, please set the following:
  *
index e1915f6fc16547a6ffe83a434fcbeac6e09ebbca..035799c56ddf413ccb53e77eab391034852bee43 100644 (file)
@@ -36,6 +36,7 @@
 #include "putilimp.h"
 #include "uassert.h"
 
+U_NAMESPACE_BEGIN
 
 /*
 Static cache for already opened resource bundles - mostly for keeping fallback info
@@ -1119,6 +1120,7 @@ static UResourceBundle *init_resb_result(const ResourceData *rdata, Resource r,
     return resB;
 }
 
+U_CAPI
 UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle *original, UErrorCode *status) {
     UBool isStackObject;
     if(U_FAILURE(*status) || r == original) {
@@ -2877,4 +2879,5 @@ ures_getVersionByKey(const UResourceBundle* res, const char *key, UVersionInfo v
   } 
 }
 
+U_NAMESPACE_END
 /* eof */
index 928223891e154674554172f09b206fb99fe2a4cf..c76093202770e42c1cf7d3f0c9648f9ec09019fd 100644 (file)
@@ -60,7 +60,7 @@
 
 #if !UCONFIG_NO_SERVICE
 static icu::ICULocaleService* gService = NULL;
-static UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
 #endif
 
 // INTERNAL - for cleanup
index c32b0611c67e962cdf58173c7bfef564db35168c..8ff04ac5213d7235a450a9b7dd0e7ea352b74598 100644 (file)
@@ -54,7 +54,7 @@ static icu::CalendarAstronomer *gChineseCalendarAstro = NULL;
 static icu::CalendarCache *gChineseCalendarWinterSolsticeCache = NULL;
 static icu::CalendarCache *gChineseCalendarNewYearCache = NULL;
 static icu::TimeZone *gChineseCalendarZoneAstroCalc = NULL;
-static UInitOnce gChineseCalendarZoneAstroCalcInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gChineseCalendarZoneAstroCalcInitOnce = U_INITONCE_INITIALIZER;
 
 /**
  * The start year of the Chinese calendar, the 61st year of the reign
index c12f9d4e2cfb3a3f11e515efe8b3319cecb022cb..d4224ba39e5a5ed94ae5135e9b2805fbb51918e3 100644 (file)
@@ -58,8 +58,8 @@
 static icu::Locale* availableLocaleList = NULL;
 static int32_t  availableLocaleListCount;
 static icu::ICULocaleService* gService = NULL;
-static UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
-static UInitOnce gAvailableLocaleListInitOnce;
+static icu::UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gAvailableLocaleListInitOnce;
 
 /**
  * Release all static memory held by collator.
index 415c85421dbd2b82cb8c3575715c7d3a5fd1d00f..c7f82b5525a41079c18065fd16eb378c93ad4b33 100644 (file)
@@ -33,7 +33,7 @@
 #define DELETE_ARRAY(array) uprv_free((void *) (array))
 
 static icu::CharsetRecognizer **fCSRecognizers = NULL;
-static UInitOnce gCSRecognizersInitOnce;
+static icu::UInitOnce gCSRecognizersInitOnce;
 static int32_t fCSRecognizers_size = 0;
 
 U_CDECL_BEGIN
index 94e1458b8d00464d0dca25f9530a8acb7073fb0d..410260e52b9dc417ccbcd60e5d9fa20e539344f1 100644 (file)
@@ -22,7 +22,7 @@
 
 // --- The cache --
 static icu::TimeZone *gDangiCalendarZoneAstroCalc = NULL;
-static UInitOnce gDangiCalendarInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gDangiCalendarInitOnce = U_INITONCE_INITIALIZER;
 
 /**
  * The start year of the Korean traditional calendar (Dan-gi) is the inaugural
index 8e6e0d15bfd4505fbfc4495481e8a4d01bc49b62..be116eda294b329c2c6ce2a7be0616d3f573ba75 100644 (file)
@@ -35,7 +35,7 @@ static const char* gNeutralStr = "neutral";
 static const char* gMailTaintsStr = "maleTaints";
 static const char* gMixedNeutralStr = "mixedNeutral";
 static icu::GenderInfo* gObjs = NULL;
-static UInitOnce gGenderInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gGenderInitOnce = U_INITONCE_INITIALIZER;
 
 enum GenderStyle {
   NEUTRAL,
index 0e2aa64b2e374b73d28f68aaf807c345a1466eba..a89d16e9dc39ba195b6e44b3c20d02fcc80f4cdc 100644 (file)
@@ -140,11 +140,11 @@ static const char *gFormatKeys[UNUM_FORMAT_STYLE_COUNT] = {
 // Static hashtable cache of NumberingSystem objects used by NumberFormat
 static UHashtable * NumberingSystem_cache = NULL;
 static UMutex nscacheMutex = U_MUTEX_INITIALIZER;
-static UInitOnce gNSCacheInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gNSCacheInitOnce = U_INITONCE_INITIALIZER;
 
 #if !UCONFIG_NO_SERVICE
 static icu::ICULocaleService* gService = NULL;
-static UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
 #endif
 
 /**
index 0596a38e2c2aca6fd304cf9fbdccb1e14aba8164..5eb7da4d7e61195983862dce91b2d81454f3a476 100644 (file)
@@ -111,14 +111,14 @@ static const int32_t       GMT_ID_LENGTH = 3;
 static const int32_t       UNKNOWN_ZONE_ID_LENGTH = 11;
 
 static icu::TimeZone* DEFAULT_ZONE = NULL;
-static UInitOnce gDefaultZoneInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gDefaultZoneInitOnce = U_INITONCE_INITIALIZER;
 
 static icu::TimeZone* _GMT = NULL;
 static icu::TimeZone* _UNKNOWN_ZONE = NULL;
-static UInitOnce gStaticZonesInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gStaticZonesInitOnce = U_INITONCE_INITIALIZER;
 
 static char TZDATA_VERSION[16];
-static UInitOnce gTZDataVersionInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gTZDataVersionInitOnce = U_INITONCE_INITIALIZER;
 
 static int32_t* MAP_SYSTEM_ZONES = NULL;
 static int32_t* MAP_CANONICAL_SYSTEM_ZONES = NULL;
@@ -128,9 +128,9 @@ static int32_t LEN_SYSTEM_ZONES = 0;
 static int32_t LEN_CANONICAL_SYSTEM_ZONES = 0;
 static int32_t LEN_CANONICAL_SYSTEM_LOCATION_ZONES = 0;
 
-static UInitOnce gSystemZonesInitOnce = U_INITONCE_INITIALIZER;
-static UInitOnce gCanonicalZonesInitOnce = U_INITONCE_INITIALIZER;
-static UInitOnce gCanonicalLocationZonesInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemZonesInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gCanonicalZonesInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gCanonicalLocationZonesInitOnce = U_INITONCE_INITIALIZER;
 
 U_CDECL_BEGIN
 static UBool U_CALLCONV timeZone_cleanup(void)
index 22ca64055e230e69b5e723e2777edad29fbfc642..8a2bf1c36b95dff4240016a6d4136f89eaadac15 100644 (file)
@@ -42,7 +42,7 @@
 
 static const InverseUCATableHeader* _staticInvUCA = NULL;
 static UDataMemory* invUCA_DATA_MEM = NULL;
-static UInitOnce    gStaticInvUCAInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce    gStaticInvUCAInitOnce = U_INITONCE_INITIALIZER;
 
 U_CDECL_BEGIN
 static UBool U_CALLCONV
index f019007f9f285b794920adb432fadc738b71e305..d2b4b2fe70cf9673e6a83ef982537446c4754779 100644 (file)
@@ -113,11 +113,11 @@ static const UChar EUR_STR[] = {0x0045,0x0055,0x0052,0};
 
 // ISO codes mapping table
 static const UHashtable* gIsoCodes = NULL;
-static UInitOnce gIsoCodesInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gIsoCodesInitOnce = U_INITONCE_INITIALIZER;
 
 // Currency symbol equivalances
 static const icu::Hashtable* gCurrSymbolsEquiv = NULL;
-static UInitOnce gCurrSymbolsEquivInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gCurrSymbolsEquivInitOnce = U_INITONCE_INITIALIZER;
 
 // EquivIterator iterates over all strings that are equivalent to a given
 // string, s. Note that EquivIterator will never yield s itself.
index 3851ff17588a3c329e013c26d4169f22d3465206..2d2e4c35dcec1902086a4b0040dbca305248203b 100644 (file)
@@ -31,21 +31,21 @@ static UMutex gZoneMetaLock = U_MUTEX_INITIALIZER;
 
 // CLDR Canonical ID mapping table
 static UHashtable *gCanonicalIDCache = NULL;
-static UInitOnce   gCanonicalIDCacheInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce   gCanonicalIDCacheInitOnce = U_INITONCE_INITIALIZER;
 
 // Metazone mapping table
 static UHashtable *gOlsonToMeta = NULL;
-static UInitOnce   gOlsonToMetaInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce   gOlsonToMetaInitOnce = U_INITONCE_INITIALIZER;
 
 // Available metazone IDs vector and table
 static icu::UVector *gMetaZoneIDs = NULL;
 static UHashtable *gMetaZoneIDTable = NULL;
-static UInitOnce   gMetaZoneIDsInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce   gMetaZoneIDsInitOnce = U_INITONCE_INITIALIZER;
 
 // Country info vectors
 static icu::UVector *gSingleZoneCountries = NULL;
 static icu::UVector *gMultiZonesCountries = NULL;
-static UInitOnce gCountryInfoVectorsInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gCountryInfoVectorsInitOnce = U_INITONCE_INITIALIZER;
 
 U_CDECL_BEGIN