ICU-10373 fix -DU_USING_ICU_NAMESPACE=0 issues

X-SVN-Rev: 34251
This commit is contained in:
Steven R. Loomis 2013-09-10 00:13:41 +00:00
parent 74f4eeb5e2
commit 86c481026c
19 changed files with 56 additions and 31 deletions

View File

@ -266,12 +266,13 @@ ICUBreakIteratorService::~ICUBreakIteratorService() {}
// -------------------------------------
// defined in ucln_cmn.h
U_NAMESPACE_END
// defined in ucln_cmn.h
static icu::UInitOnce gInitOnce;
static icu::ICULocaleService* gService = NULL;
static UInitOnce gInitOnce;
/**
* Release all static memory held by breakiterator.

View File

@ -29,10 +29,14 @@
// 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;
}

View File

@ -1788,12 +1788,13 @@ int32_t RuleBasedBreakIterator::checkDictionary(int32_t startPos,
return (reverse ? startPos : endPos);
}
U_NAMESPACE_END
// defined in ucln_cmn.h
U_NAMESPACE_END
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.

View 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

View File

@ -161,6 +161,8 @@
*
*/
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:
*

View 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

View 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:
*

View 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 */

View 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

View 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

View 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.

View 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

View 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

View 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,

View 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
/**

View 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)

View 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

View 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.

View 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