]> granicus.if.org Git - icu/commitdiff
ICU-12752 commit some IBM z fixes. Library code building
authorSteven R. Loomis <srl@icu-project.org>
Tue, 27 Sep 2016 23:39:01 +0000 (23:39 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Tue, 27 Sep 2016 23:39:01 +0000 (23:39 +0000)
X-SVN-Rev: 39368

32 files changed:
icu4c/source/common/loclikely.cpp
icu4c/source/common/ucnv2022.cpp
icu4c/source/common/ucnv_io.cpp
icu4c/source/common/ucnv_io.h
icu4c/source/common/ucnvbocu.cpp
icu4c/source/common/ucnvmbcs.cpp
icu4c/source/common/udata.cpp
icu4c/source/common/uloc.cpp
icu4c/source/common/umutex.h
icu4c/source/common/unicode/platform.h
icu4c/source/common/uresbund.cpp
icu4c/source/common/uresdata.cpp
icu4c/source/i18n/collationroot.cpp
icu4c/source/i18n/collationroot.h
icu4c/source/i18n/dayperiodrules.cpp
icu4c/source/i18n/dayperiodrules.h
icu4c/source/i18n/dtfmtsym.cpp
icu4c/source/i18n/dtptngen.cpp
icu4c/source/i18n/islamcal.cpp
icu4c/source/i18n/islamcal.h
icu4c/source/i18n/region.cpp
icu4c/source/i18n/rulebasedcollator.cpp
icu4c/source/i18n/tridpars.cpp
icu4c/source/i18n/tridpars.h
icu4c/source/i18n/ucln_in.cpp
icu4c/source/i18n/ucol_imp.h
icu4c/source/i18n/ucol_res.cpp
icu4c/source/i18n/unicode/dtptngen.h
icu4c/source/i18n/unicode/region.h
icu4c/source/i18n/unicode/tblcoll.h
icu4c/source/i18n/uspoof_impl.cpp
icu4c/source/io/ucln_io.cpp

index 0a2afd4e052aeae1285b7dfbe0bab5e7b16b0de6..c13b37e1a1f2d6146aca20e0e893f4e1ad059680 100644 (file)
@@ -1332,6 +1332,8 @@ Locale::isRightToLeft() const {
     return uloc_isRightToLeft(getBaseName());
 }
 
+U_NAMESPACE_END
+
 // The following must at least allow for rg key value (6) plus terminator (1).
 #define ULOC_RG_BUFLEN 8
 
@@ -1381,4 +1383,3 @@ ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion,
     return u_terminateChars(region, regionCapacity, rgLen, status);
 }
 
-U_NAMESPACE_END
index 03fcbc5a05f3aa5ae2ffadfaf9399020339b979c..d4c3f5299c6028c3a51ebda87735a05cb9b1e3e8 100644 (file)
@@ -225,10 +225,10 @@ typedef struct{
 /* ISO-2022 ----------------------------------------------------------------- */
 
 /*Forward declaration */
-U_CFUNC void
+U_CFUNC void U_CALLCONV
 ucnv_fromUnicode_UTF8(UConverterFromUnicodeArgs * args,
                       UErrorCode * err);
-U_CFUNC void
+U_CFUNC void U_CALLCONV
 ucnv_fromUnicode_UTF8_OFFSETS_LOGIC(UConverterFromUnicodeArgs * args,
                                     UErrorCode * err);
 
@@ -385,26 +385,26 @@ typedef enum{
 } Variant2022;
 
 /*********** ISO 2022 Converter Protos ***********/
-static void
+static void U_CALLCONV
 _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode);
 
-static void
+static void U_CALLCONV
  _ISO2022Close(UConverter *converter);
 
-static void
+static void U_CALLCONV
 _ISO2022Reset(UConverter *converter, UConverterResetChoice choice);
 
-static const char*
+static const char  U_CALLCONV*
 _ISO2022getName(const UConverter* cnv);
 
-static void
+static void  U_CALLCONV
 _ISO_2022_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err);
 
-static UConverter *
+static UConverter  U_CALLCONV*
 _ISO_2022_SafeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status);
 
 #ifdef U_ENABLE_GENERIC_ISO_2022
-static void
+static void U_CALLCONV
 T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverterToUnicodeArgs* args, UErrorCode* err);
 #endif
 
@@ -470,7 +470,7 @@ setInitialStateFromUnicodeKR(UConverter* converter,UConverterDataISO2022 *myConv
     }
 }
 
-static void
+static void U_CALLCONV
 _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
 
     char myLocale[6]={' ',' ',' ',' ',' ',' '};
@@ -648,7 +648,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
 }
 
 
-static void
+static void U_CALLCONV
 _ISO2022Close(UConverter *converter) {
     UConverterDataISO2022* myData =(UConverterDataISO2022 *) (converter->extraInfo);
     UConverterSharedData **array = myData->myConverterArray;
@@ -671,7 +671,7 @@ _ISO2022Close(UConverter *converter) {
     }
 }
 
-static void
+static void U_CALLCONV
 _ISO2022Reset(UConverter *converter, UConverterResetChoice choice) {
     UConverterDataISO2022 *myConverterData=(UConverterDataISO2022 *) (converter->extraInfo);
     if(choice<=UCNV_RESET_TO_UNICODE) {
@@ -716,7 +716,7 @@ _ISO2022Reset(UConverter *converter, UConverterResetChoice choice) {
     }
 }
 
-static const char*
+static const char U_CALLCONV*
 _ISO2022getName(const UConverter* cnv){
     if(cnv->extraInfo){
         UConverterDataISO2022* myData= (UConverterDataISO2022*)cnv->extraInfo;
@@ -1245,7 +1245,7 @@ _2022ToGR94DBCS(uint32_t value) {
 *
 */
 
-static void
+static void U_CALLCONV
 T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverterToUnicodeArgs* args,
                                                            UErrorCode* err){
     const char* mySourceLimit, *realSourceLimit;
@@ -1651,7 +1651,7 @@ static const uint16_t hwkana_fb[HWKANA_END - HWKANA_START + 1] = {
     0x212C   /* U+FF9F */
 };
 
-static void
+static void U_CALLCONV
 UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args, UErrorCode* err) {
     UConverter *cnv = args->converter;
     UConverterDataISO2022 *converterData;
@@ -2068,7 +2068,7 @@ getTrail:
 
 /*************** to unicode *******************/
 
-static void
+static void U_CALLCONV
 UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
                                                UErrorCode* err){
     char tempBuf[2];
@@ -2320,7 +2320,7 @@ endloop:
 *  ii) There are only 2 shifting sequences SO to shift into double byte mode
 *      and SI to shift into single byte mode
 */
-static void
+static void U_CALLCONV
 UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterFromUnicodeArgs* args, UErrorCode* err){
 
     UConverter* saveConv = args->converter;
@@ -2344,7 +2344,7 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterFromUnicodeArgs*
     args->converter=saveConv;
 }
 
-static void
+static void U_CALLCONV
 UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args, UErrorCode* err){
 
     const UChar *source = args->source;
@@ -2563,7 +2563,7 @@ getTrail:
 
 /************************ To Unicode ***************************************/
 
-static void
+static void U_CALLCONV
 UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterToUnicodeArgs *args,
                                                             UErrorCode* err){
     char const* sourceStart;
@@ -2661,7 +2661,7 @@ escape:
     }
 }
 
-static void
+static void U_CALLCONV
 UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
                                                             UErrorCode* err){
     char tempBuf[2];
@@ -2903,7 +2903,7 @@ static const char* const escSeqCharsCN[10] ={
         CNS_11643_1992_Plane_7_STR
 };
 
-static void
+static void U_CALLCONV
 UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args, UErrorCode* err){
     UConverter *cnv = args->converter;
     UConverterDataISO2022 *converterData;
@@ -3254,7 +3254,7 @@ getTrail:
 }
 
 
-static void
+static void U_CALLCONV
 UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
                                                UErrorCode* err){
     char tempBuf[3];
@@ -3456,7 +3456,7 @@ endloop:
 }
 #endif /* #if !UCONFIG_ONLY_HTML_CONVERSION */
 
-static void
+static void U_CALLCONV
 _ISO_2022_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err) {
     UConverter *cnv = args->converter;
     UConverterDataISO2022 *myConverterData=(UConverterDataISO2022 *) cnv->extraInfo;
@@ -3580,7 +3580,7 @@ struct cloneStruct
 };
 
 
-static UConverter *
+static UConverter U_CALLCONV *
 _ISO_2022_SafeClone(
             const UConverter *cnv,
             void *stackBuffer,
@@ -3627,7 +3627,7 @@ _ISO_2022_SafeClone(
     return &localClone->cnv;
 }
 
-static void
+static void U_CALLCONV
 _ISO_2022_GetUnicodeSet(const UConverter *cnv,
                     const USetAdder *sa,
                     UConverterUnicodeSet which,
index 9c3a5a87f20cc18c8398466aff6c849b18b85614..9c94ab3c7080aa4d8c60bb153658d794e86061a3 100644 (file)
@@ -382,7 +382,7 @@ static const uint8_t ebcdicTypes[128] = {
 #endif
 
 /* @see ucnv_compareNames */
-U_CFUNC char * U_EXPORT2
+U_CAPI char * U_EXPORT2
 ucnv_io_stripASCIIForCompare(char *dst, const char *name) {
     char *dstItr = dst;
     uint8_t type, nextType;
@@ -417,7 +417,7 @@ ucnv_io_stripASCIIForCompare(char *dst, const char *name) {
     return dst;
 }
 
-U_CFUNC char * U_EXPORT2
+U_CAPI char * U_EXPORT2
 ucnv_io_stripEBCDICForCompare(char *dst, const char *name) {
     char *dstItr = dst;
     uint8_t type, nextType;
@@ -778,7 +778,7 @@ ucnv_io_countStandardAliases(UEnumeration *enumerator, UErrorCode * /*pErrorCode
     return value;
 }
 
-static const char* U_CALLCONV
+static const char U_CALLCONV *
 ucnv_io_nextStandardAliases(UEnumeration *enumerator,
                             int32_t* resultLength,
                             UErrorCode * /*pErrorCode*/)
@@ -1017,7 +1017,7 @@ ucnv_io_countAllConverters(UEnumeration * /*enumerator*/, UErrorCode * /*pErrorC
     return gMainTable.converterListSize;
 }
 
-static const char* U_CALLCONV
+static const char U_CALLCONV *
 ucnv_io_nextAllConverters(UEnumeration *enumerator,
                             int32_t* resultLength,
                             UErrorCode * /*pErrorCode*/)
@@ -1087,7 +1087,7 @@ ucnv_io_countKnownConverters(UErrorCode *pErrorCode) {
 
 /* alias table swapping ----------------------------------------------------- */
 
-typedef char * U_CALLCONV StripForCompareFn(char *dst, const char *name);
+typedef char U_CALLCONV * StripForCompareFn(char *dst, const char *name);
 
 /*
  * row of a temporary array
@@ -1111,7 +1111,7 @@ enum {
     STACK_ROW_CAPACITY=500
 };
 
-static int32_t
+static int32_t U_CALLCONV
 io_compareRows(const void *context, const void *left, const void *right) {
     char strippedLeft[UCNV_MAX_CONVERTER_NAME_LENGTH],
          strippedRight[UCNV_MAX_CONVERTER_NAME_LENGTH];
index d0b52cebf660e8b7a89a9b035dbea0c9c56c62c9..bfaca1794c1b0a60647f120b171b812c0f11b274 100644 (file)
@@ -77,10 +77,10 @@ typedef struct UConverterAlias {
 #   error U_CHARSET_FAMILY is not valid
 #endif
 
-U_CAPI char * U_EXPORT2
+U_CAPI char U_CALLCONV * 
 ucnv_io_stripASCIIForCompare(char *dst, const char *name);
 
-U_CAPI char * U_EXPORT2
+U_CAPI char U_CALLCONV *
 ucnv_io_stripEBCDICForCompare(char *dst, const char *name);
 
 /**
index 50c3dc395e837348e39364affcfe401754d5efde..69763ca32136af9e2f6ec6bfc7851977993c2836 100644 (file)
@@ -388,7 +388,7 @@ packDiff(int32_t diff) {
 }
 
 
-static void
+static void U_CALLCONV
 _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
                              UErrorCode *pErrorCode) {
     UConverter *cnv;
@@ -649,7 +649,7 @@ getTrail:
  * re-copy the original function and remove the variables
  * offsets, sourceIndex, and nextSourceIndex.
  */
-static void
+static void U_CALLCONV
 _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs,
                   UErrorCode *pErrorCode) {
     UConverter *cnv;
@@ -952,7 +952,7 @@ decodeBocu1TrailByte(int32_t count, int32_t b) {
     }
 }
 
-static void
+static void U_CALLCONV
 _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
                            UErrorCode *pErrorCode) {
     UConverter *cnv;
@@ -1175,7 +1175,7 @@ endloop:
  * re-copy the original function and remove the variables
  * offsets, sourceIndex, and nextSourceIndex.
  */
-static void
+static void U_CALLCONV
 _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs,
                 UErrorCode *pErrorCode) {
     UConverter *cnv;
index af813a2b9e46db906f86872cfcaf2d79de3c8122..c5ea059cbedf3468ad5e1d51bc28a10d2926830d 100644 (file)
 typedef UBool U_CALLCONV
 UConverterEnumToUCallback(const void *context, uint32_t value, UChar32 codePoints[32]);
 
-static void
+static void U_CALLCONV
 ucnv_MBCSLoad(UConverterSharedData *sharedData,
           UConverterLoadArgs *pArgs,
           const uint8_t *raw,
           UErrorCode *pErrorCode);
 
-static void
+static void U_CALLCONV
 ucnv_MBCSUnload(UConverterSharedData *sharedData);
 
-static void
+static void U_CALLCONV
 ucnv_MBCSOpen(UConverter *cnv,
               UConverterLoadArgs *pArgs,
               UErrorCode *pErrorCode);
 
-static UChar32
+static UChar32 U_CALLCONV
 ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs,
                   UErrorCode *pErrorCode);
 
-static void
+static void U_CALLCONV
 ucnv_MBCSGetStarters(const UConverter* cnv,
                  UBool starters[256],
                  UErrorCode *pErrorCode);
 
-static const char *
+static const char U_CALLCONV *
 ucnv_MBCSGetName(const UConverter *cnv);
 
-static void
+static void U_CALLCONV
 ucnv_MBCSWriteSub(UConverterFromUnicodeArgs *pArgs,
               int32_t offsetIndex,
               UErrorCode *pErrorCode);
 
-static UChar32
+static UChar32 U_CALLCONV
 ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs,
                   UErrorCode *pErrorCode);
 
-static void
+static void U_CALLCONV
 ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
                   UConverterToUnicodeArgs *pToUArgs,
                   UErrorCode *pErrorCode);
 
-static void
+static void U_CALLCONV
 ucnv_MBCSGetUnicodeSet(const UConverter *cnv,
                    const USetAdder *sa,
                    UConverterUnicodeSet which,
                    UErrorCode *pErrorCode);
 
-static void
+static void U_CALLCONV
 ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
                   UConverterToUnicodeArgs *pToUArgs,
                   UErrorCode *pErrorCode);
@@ -505,7 +505,6 @@ static const UConverterImpl _MBCSImpl={
     NULL
 };
 
-
 /* Static data is in tools/makeconv/ucnvstat.c for data-based
  * converters. Be sure to update it as well.
  */
@@ -847,7 +846,7 @@ ucnv_MBCSEnumToUnicode(UConverterMBCSTable *mbcsTable,
     }
 }
 
-U_CFUNC void
+U_CFUNC void 
 ucnv_MBCSGetFilteredUnicodeSetForUnicode(const UConverterSharedData *sharedData,
                                          const USetAdder *sa,
                                          UConverterUnicodeSet which,
@@ -1069,7 +1068,7 @@ ucnv_MBCSGetUnicodeSetForUnicode(const UConverterSharedData *sharedData,
         pErrorCode);
 }
 
-static void
+static void U_CALLCONV
 ucnv_MBCSGetUnicodeSet(const UConverter *cnv,
                    const USetAdder *sa,
                    UConverterUnicodeSet which,
@@ -1549,7 +1548,7 @@ reconstituteData(UConverterMBCSTable *mbcsTable,
 
 /* MBCS setup functions ----------------------------------------------------- */
 
-static void
+static void U_CALLCONV
 ucnv_MBCSLoad(UConverterSharedData *sharedData,
           UConverterLoadArgs *pArgs,
           const uint8_t *raw,
@@ -1874,7 +1873,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData,
     }
 }
 
-static void
+static void U_CALLCONV
 ucnv_MBCSUnload(UConverterSharedData *sharedData) {
     UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
 
@@ -1892,7 +1891,7 @@ ucnv_MBCSUnload(UConverterSharedData *sharedData) {
     }
 }
 
-static void
+static void U_CALLCONV
 ucnv_MBCSOpen(UConverter *cnv,
               UConverterLoadArgs *pArgs,
               UErrorCode *pErrorCode) {
@@ -1983,7 +1982,7 @@ ucnv_MBCSOpen(UConverter *cnv,
 #endif
 }
 
-static const char *
+static const char U_CALLCONV *
 ucnv_MBCSGetName(const UConverter *cnv) {
     if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0 && cnv->sharedData->mbcs.swapLFNLName!=NULL) {
         return cnv->sharedData->mbcs.swapLFNLName;
@@ -1994,7 +1993,7 @@ ucnv_MBCSGetName(const UConverter *cnv) {
 
 /* MBCS-to-Unicode conversion functions ------------------------------------- */
 
-static UChar32
+static UChar32 U_CALLCONV
 ucnv_MBCSGetFallback(UConverterMBCSTable *mbcsTable, uint32_t offset) {
     const _MBCSToUFallback *toUFallbacks;
     uint32_t i, start, limit;
@@ -2957,7 +2956,7 @@ ucnv_MBCSSingleGetNextUChar(UConverterToUnicodeArgs *pArgs,
  *
  * All normal mappings and errors are handled here.
  */
-static UChar32
+static UChar32 U_CALLCONV
 ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs,
                   UErrorCode *pErrorCode) {
     UConverter *cnv;
@@ -5014,7 +5013,7 @@ utf8_minLegal[5]={ 0, 0, 0x80, 0x800, 0x10000 };
 static const UChar32
 utf8_offsets[7]={ 0, 0, 0x3080, 0xE2080, 0x3C82080 };
 
-static void
+static void U_CALLCONV
 ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
                   UConverterToUnicodeArgs *pToUArgs,
                   UErrorCode *pErrorCode) {
@@ -5320,7 +5319,7 @@ moreBytes:
     pFromUArgs->target=(char *)target;
 }
 
-static void
+static void U_CALLCONV
 ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
                   UConverterToUnicodeArgs *pToUArgs,
                   UErrorCode *pErrorCode) {
@@ -5632,7 +5631,7 @@ unassigned:
 
 /* miscellaneous ------------------------------------------------------------ */
 
-static void
+static void U_CALLCONV
 ucnv_MBCSGetStarters(const UConverter* cnv,
                  UBool starters[256],
                  UErrorCode *) {
@@ -5655,7 +5654,7 @@ ucnv_MBCSIsLeadByte(UConverterSharedData *sharedData, char byte) {
     return (UBool)MBCS_ENTRY_IS_TRANSITION(sharedData->mbcs.stateTable[0][(uint8_t)byte]);
 }
 
-static void
+static void U_CALLCONV
 ucnv_MBCSWriteSub(UConverterFromUnicodeArgs *pArgs,
               int32_t offsetIndex,
               UErrorCode *pErrorCode) {
index cfcf1f3fe2ab98b5fc257aeed2e3012a8b8553af..ec72a0ce2c772a5b03cc949e2b33fd6e6ea025cb 100644 (file)
@@ -270,7 +270,7 @@ static void U_CALLCONV DataCacheElement_deleter(void *pDCEl) {
     uprv_free(pDCEl);                  /* delete 'this'          */
 }
 
-static void udata_initHashTable(UErrorCode &err) {
+static void U_CALLCONV udata_initHashTable(UErrorCode &err) {
     U_ASSERT(gCommonDataCache == NULL);
     gCommonDataCache = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &err);
     if (U_FAILURE(err)) {
index 3b07f6eab0c84b4870ef5645cec9e5bbe26fd198..da254a59566603402e6c96a0c2dc3b7319cf8c9e 100644 (file)
@@ -1492,7 +1492,7 @@ uloc_kw_countKeywords(UEnumeration *en, UErrorCode * /*status*/) {
     return result;
 }
 
-static const char* U_CALLCONV
+static const char U_CALLCONV*
 uloc_kw_nextKeyword(UEnumeration* en,
                     int32_t* resultLength,
                     UErrorCode* /*status*/) {
index d0d35d585aabfa622c6ef92428009c5761f8dcf2..f1fc4bb5d9b4ed60bc35019287155ff391db3d13 100644 (file)
@@ -231,7 +231,7 @@ struct UInitOnce {
 U_COMMON_API UBool U_EXPORT2 umtx_initImplPreInit(UInitOnce &);
 U_COMMON_API void  U_EXPORT2 umtx_initImplPostInit(UInitOnce &);
 
-template<class T> void umtx_initOnce(UInitOnce &uio, T *obj, void (T::*fp)()) {
+template<class T> void umtx_initOnce(UInitOnce &uio, T *obj, void (T::*U_CALLCONV fp)()) {
     if (umtx_loadAcquire(uio.fState) == 2) {
         return;
     }
@@ -244,7 +244,7 @@ template<class T> void umtx_initOnce(UInitOnce &uio, T *obj, void (T::*fp)()) {
 
 // umtx_initOnce variant for plain functions, or static class functions.
 //               No context parameter.
-inline void umtx_initOnce(UInitOnce &uio, void (*fp)()) {
+inline void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)()) {
     if (umtx_loadAcquire(uio.fState) == 2) {
         return;
     }
@@ -256,7 +256,7 @@ inline void umtx_initOnce(UInitOnce &uio, void (*fp)()) {
 
 // umtx_initOnce variant for plain functions, or static class functions.
 //               With ErrorCode, No context parameter.
-inline void umtx_initOnce(UInitOnce &uio, void (*fp)(UErrorCode &), UErrorCode &errCode) {
+inline void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)(UErrorCode &), UErrorCode &errCode) {
     if (U_FAILURE(errCode)) {
         return;
     }
@@ -275,7 +275,7 @@ inline void umtx_initOnce(UInitOnce &uio, void (*fp)(UErrorCode &), UErrorCode &
 
 // umtx_initOnce variant for plain functions, or static class functions,
 //               with a context parameter.
-template<class T> void umtx_initOnce(UInitOnce &uio, void (*fp)(T), T context) {
+template<class T> void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)(T), T context) {
     if (umtx_loadAcquire(uio.fState) == 2) {
         return;
     }
@@ -287,7 +287,7 @@ template<class T> void umtx_initOnce(UInitOnce &uio, void (*fp)(T), T context) {
 
 // umtx_initOnce variant for plain functions, or static class functions,
 //               with a context parameter and an error code.
-template<class T> void umtx_initOnce(UInitOnce &uio, void (*fp)(T, UErrorCode &), T context, UErrorCode &errCode) {
+template<class T> void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)(T, UErrorCode &), T context, UErrorCode &errCode) {
     if (U_FAILURE(errCode)) {
         return;
     }
index 92a94c47eee5474c590cf9320d8aff9ab311c2ed..157c951d04614e68c8299aec69aa62740c20ebd8 100644 (file)
  * This is only used for non-ICU-API functions.
  * When a function is a public ICU API,
  * you must use the U_CAPI and U_EXPORT2 qualifiers.
+ *
+ * Please note, you need to use U_CALLCONV before the *.
+ *
+ * YES: "static const char U_CALLCONV *func( . . . )"
+ * NO:  "static const char* U_CALLCONV func( . . . )"
+ *
  * @stable ICU 2.0
  */
 #if U_PLATFORM == U_PF_OS390 && defined(__cplusplus)
index c49e1e548683307134021e691e3c7d74c763d73c..2e524eb07ddfa07e01141df87d3ba8701eb898f4 100644 (file)
@@ -269,7 +269,7 @@ static UBool U_CALLCONV ures_cleanup(void)
 }
 
 /** INTERNAL: Initializes the cache for resources */
-static void createCache(UErrorCode &status) {
+static void U_CALLCONV createCache(UErrorCode &status) {
     U_ASSERT(cache == NULL);
     cache = uhash_open(hashEntry, compareEntries, NULL, &status);
     ucln_common_registerCleanup(UCLN_COMMON_URES, ures_cleanup);
@@ -2408,7 +2408,7 @@ ures_loc_countLocales(UEnumeration *en, UErrorCode * /*status*/) {
     return ures_getSize(&ctx->installed);
 }
 
-static const char* U_CALLCONV 
+static const char U_CALLCONV *
 ures_loc_nextLocale(UEnumeration* en,
                     int32_t* resultLength,
                     UErrorCode* status) {
index 9a1ed11d60f312186d9a3942f70a880334e5be51..44654dcf57973ce3bd6030bb4a7597491407aa54 100644 (file)
@@ -985,7 +985,7 @@ typedef struct Row {
     int32_t keyIndex, sortIndex;
 } Row;
 
-static int32_t
+static int32_t U_CALLCONV
 ures_compareRows(const void *context, const void *left, const void *right) {
     const char *keyChars=(const char *)context;
     return (int32_t)uprv_strcmp(keyChars+((const Row *)left)->keyIndex,
index 354b426d25623389a5aeacf964643d48a73beaac..f862e410b81cd56668384598424c153e4287d320 100644 (file)
@@ -47,7 +47,7 @@ static UBool U_CALLCONV uprv_collation_root_cleanup() {
 
 U_CDECL_END
 
-void
+void U_CALLCONV
 CollationRoot::load(UErrorCode &errorCode) {
     if(U_FAILURE(errorCode)) { return; }
     LocalPointer<CollationTailoring> t(new CollationTailoring(NULL));
index 96fb574412a2db152b3344e5ee10154c11a9bb10..26e5071fff8b7a9927793b6d601fb2abd5b241d4 100644 (file)
@@ -36,7 +36,7 @@ public:
     static const CollationSettings *getSettings(UErrorCode &errorCode);
 
 private:
-    static void load(UErrorCode &errorCode);
+    static void U_CALLCONV load(UErrorCode &errorCode);
 };
 
 U_NAMESPACE_END
index 5ebaed3ce8b6d00940c14aa31b3aebb6b09af13e..30414823efdfe34165414e3727a1550a052a4c9f 100644 (file)
@@ -303,7 +303,7 @@ namespace {
 
 UInitOnce initOnce = U_INITONCE_INITIALIZER;
 
-UBool dayPeriodRulesCleanup() {
+U_CFUNC UBool U_CALLCONV dayPeriodRulesCleanup() {
     delete[] data->rules;
     uhash_close(data->localeToRuleSetNumMap);
     delete data;
@@ -313,7 +313,7 @@ UBool dayPeriodRulesCleanup() {
 
 }  // namespace
 
-void DayPeriodRules::load(UErrorCode &errorCode) {
+void U_CALLCONV DayPeriodRules::load(UErrorCode &errorCode) {
     if (U_FAILURE(errorCode)) {
         return;
     }
index 7345f76f99be99afd29a5fd7d142d74adcfc1bc6..3c006cdc2f59dd29e359b5b2b0c4e67b2aaae506 100644 (file)
@@ -61,7 +61,7 @@ private:
     // Translates "morning1" to DAYPERIOD_MORNING1, for example.
     static DayPeriod getDayPeriodFromString(const char *type_str);
 
-    static void load(UErrorCode &errorCode);
+    static void U_CALLCONV load(UErrorCode &errorCode);
 
     // Sets period type for all hours in [startHour, limitHour).
     void add(int32_t startHour, int32_t limitHour, DayPeriod period);
index d7f869e14b179a5efbbef51a5018d21888fb0968..c6e4b6400252f017f768078ef1d2d6c9ebd9a9b9 100644 (file)
@@ -1832,12 +1832,12 @@ struct CalendarDataSink : public ResourceSink {
     }
 
     // Deleter function to be used by 'arrays'
-    static void deleteUnicodeStringArray(void *uArray) {
+    static void U_CALLCONV deleteUnicodeStringArray(void *uArray) {
         delete[] static_cast<UnicodeString *>(uArray);
     }
 
     // Deleter function to be used by 'maps'
-    static void deleteHashtable(void *table) {
+    static void U_CALLCONV deleteHashtable(void *table) {
         delete static_cast<Hashtable *>(table);
     }
 };
index f57f08fe1f511fe8d54f16eedbaca4384b1b12ff..17e7ec7cde8a219c44ac4603dedcc5465402c9a2 100644 (file)
@@ -390,12 +390,12 @@ UInitOnce initOnce = U_INITONCE_INITIALIZER;
 UHashtable *localeToAllowedHourFormatsMap = NULL;
 
 // Value deleter for hashmap.
-void deleteAllowedHourFormats(void *ptr) {
+U_CFUNC void U_CALLCONV deleteAllowedHourFormats(void *ptr) {
     uprv_free(ptr);
 }
 
 // Close hashmap at cleanup.
-UBool allowedHourFormatsCleanup() {
+U_CFUNC UBool U_CALLCONV allowedHourFormatsCleanup() {
     uhash_close(localeToAllowedHourFormatsMap);
     return TRUE;
 }
@@ -494,7 +494,7 @@ struct AllowedHourFormatsSink : public ResourceSink {
 
 AllowedHourFormatsSink::~AllowedHourFormatsSink() {}
 
-void DateTimePatternGenerator::loadAllowedHourFormatsData(UErrorCode &status) {
+U_CFUNC void U_CALLCONV DateTimePatternGenerator::loadAllowedHourFormatsData(UErrorCode &status) {
     if (U_FAILURE(status)) { return; }
     localeToAllowedHourFormatsMap = uhash_open(
         uhash_hashChars, uhash_compareChars, NULL, &status);
index aaccca9ec6cfb69a912870f5962fd76310d7b130..123b245f2d97e6eaa67efb4ae307d6609ec916e7 100644 (file)
@@ -736,7 +736,7 @@ int32_t IslamicCalendar::defaultCenturyStartYear() const
 }
 
 
-void U_CALLCONV
+U_CFUNC void U_CALLCONV
 IslamicCalendar::initializeSystemDefaultCentury()
 {
     // initialize systemDefaultCentury and systemDefaultCenturyYear based
index 16e26c9c1b90a4b50a87830cdc0f831dc6270732..7f6faed8867a9373050b8dd697ba442b2e55ee81 100644 (file)
@@ -419,7 +419,7 @@ class U_I18N_API IslamicCalendar : public Calendar {
    * are considered to fall within so that its start date is 80 years
    * before the current time.
    */
-  static void  initializeSystemDefaultCentury(void);
+  static void U_CALLCONV initializeSystemDefaultCentury(void);
 };
 
 U_NAMESPACE_END
index 22d767e9cc95b28c741dd4b323da15a209e05c4a..81ddc233384c33a2b5540acfaaa0bf188a23b509 100644 (file)
@@ -81,7 +81,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RegionNameEnumeration)
  * If the region data has already loaded, then this method simply returns without doing
  * anything meaningful.
  */
-void Region::loadRegionData(UErrorCode &status) {
+void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
 
     // Construct service objs first
     LocalUHashtablePointer newRegionIDMap(uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, &status));
index dd70d457c69e5328c1243cb506d958217a12433c..4852667ada8079eeb3285493c99e8156fd8fa45f 100644 (file)
@@ -1611,7 +1611,7 @@ RuleBasedCollator::isUnsafe(UChar32 c) const {
     return data->isUnsafeBackward(c, settings->isNumeric());
 }
 
-void
+void U_CALLCONV
 RuleBasedCollator::computeMaxExpansions(const CollationTailoring *t, UErrorCode &errorCode) {
     t->maxExpansions = CollationElementIterator::computeMaxExpansions(t->data, errorCode);
 }
index 947f642d7a95a3618d023e098fce9cef88b9efc5..f5d2799f9f1a280f2621c8d73dbe389f3d8c7ce8 100644 (file)
@@ -904,7 +904,7 @@ Transliterator* TransliteratorIDParser::createBasicInstance(const UnicodeString&
 /**
  * Initialize static memory. Called through umtx_initOnce only.
  */
-void TransliteratorIDParser::init(UErrorCode &status) {
+void U_CALLCONV TransliteratorIDParser::init(UErrorCode &status) {
     U_ASSERT(SPECIAL_INVERSES == NULL);
     ucln_i18n_registerCleanup(UCLN_I18N_TRANSLITERATOR, utrans_transliterator_cleanup);
 
index a64aabe62f6714333b49a43388659bb07111e8f9..63cfdff61e7f92476be28032f3c6db0b41319d25 100644 (file)
@@ -351,7 +351,7 @@ class TransliteratorIDParser /* not : public UObject because all methods are sta
     /**
      * Initialize static memory.
      */
-    static void init(UErrorCode &status);
+    static void U_CALLCONV init(UErrorCode &status);
 
     friend class SingleID;
 };
index a15ae025502444b58bf14f1a0a7f55d1e10ce76a..8139208cba747cc64f5063ae6e18d95cdf85edeb 100644 (file)
@@ -30,7 +30,7 @@ static const char copyright[] = U_COPYRIGHT_STRING;
 
 static cleanupFunc *gCleanupFunctions[UCLN_I18N_COUNT];
 
-static UBool i18n_cleanup(void)
+static UBool U_CALLCONV i18n_cleanup(void)
 {
     int32_t libType = UCLN_I18N_START;
     (void)copyright;   /* Suppress unused variable warning with clang. */
index e72eb9dff2f3c5d2d0ef55edf34ae02482f226e5..7c9e8f6891120992032ebfec417c55171719e89a 100644 (file)
@@ -78,7 +78,7 @@ public:
     const CollationCacheEntry *createCacheEntry(UErrorCode &errorCode);
 
 private:
-    static void loadRootRules(UErrorCode &errorCode);
+    static void U_CALLCONV loadRootRules(UErrorCode &errorCode);
 
     // The following members are used by loadTailoring()
     // and the cache callback.
index 4a2a0d909db9ff6440a468af8cf754a344f31de0..b3774fd641701fabe2de25287f3a617ddc98ea2c 100644 (file)
@@ -80,7 +80,7 @@ ucol_res_cleanup() {
 
 U_CDECL_END
 
-void
+U_CAPI void U_CALLCONV
 CollationLoader::loadRootRules(UErrorCode &errorCode) {
     if(U_FAILURE(errorCode)) { return; }
     rootBundle = ures_open(U_ICUDATA_COLL, kRootLocaleName, &errorCode);
index 7bf513f662466cad61887496740688b95e584c04..fd617ce3cdcbfb2944ba2f64a320ca7a9bbc74ff 100644 (file)
@@ -554,7 +554,7 @@ private:
     UBool isAvailableFormatSet(const UnicodeString &key) const;
     void copyHashtable(Hashtable *other, UErrorCode &status);
     UBool isCanonicalItem(const UnicodeString& item) const;
-    static void loadAllowedHourFormatsData(UErrorCode &status);
+    static void U_CALLCONV loadAllowedHourFormatsData(UErrorCode &status);
     void getAllowedHourFormats(const Locale &locale, UErrorCode &status);
 
     struct AppendItemFormatsSink;
index 94610aae1b22dac423ecb6a2d40cca7ea8cc2d67..6bb6c746b107027895fbea016bb1aa7e0b60258f 100644 (file)
@@ -212,7 +212,7 @@ private:
      * anything meaningful.
      */
 
-    static void loadRegionData(UErrorCode &status);
+    static void U_CALLCONV loadRegionData(UErrorCode &status);
 
 };
 
index c5a3939e22b2d14153802cd8b530d347ff54f745..c48ea38c130a2f49bc6a80e3c7b1d61d7278c0f7 100644 (file)
@@ -856,7 +856,7 @@ private:
      */
     UBool isUnsafe(UChar32 c) const;
 
-    static void computeMaxExpansions(const CollationTailoring *t, UErrorCode &errorCode);
+    static void U_CALLCONV computeMaxExpansions(const CollationTailoring *t, UErrorCode &errorCode);
     UBool initMaxExpansions(UErrorCode &errorCode) const;
 
     void setFastLatinOptions(CollationSettings &ownedSettings) const;
index a7ce8ee2601fee3ecadfb9a3eb41ed51f9bf778f..a062d3ee24bd533798451a415fed5712f0335606 100644 (file)
@@ -538,7 +538,7 @@ uspoof_cleanupDefaultData(void) {
     return TRUE;
 }
 
-static void uspoof_loadDefaultData(UErrorCode& status) {
+static void U_CALLCONV uspoof_loadDefaultData(UErrorCode& status) {
     UDataMemory *udm = udata_openChoice(NULL, "cfu", "confusables",
                                         spoofDataIsAcceptable, 
                                         NULL,       // context, would receive dataVersion if supplied.
index bb71c8b05d16559fb6edd56730da2a82432b6575..21a0baf58db07c45495e30edfc02e7ec255399e5 100644 (file)
@@ -35,7 +35,7 @@ static const char copyright[] = U_COPYRIGHT_STRING;
 
 static cleanupFunc *gCleanupFunctions[UCLN_IO_COUNT];
 
-static UBool io_cleanup(void)
+static UBool U_CALLCONV io_cleanup(void)
 {
     int32_t libType = UCLN_IO_START;