diff --git a/icu4c/source/common/uchar.c b/icu4c/source/common/uchar.c index e5d03eb65e9..73f388175bd 100644 --- a/icu4c/source/common/uchar.c +++ b/icu4c/source/common/uchar.c @@ -65,7 +65,7 @@ getFoldingPropsOffset(uint32_t data) { } } -static UBool +static UBool U_CALLCONV isAcceptable(void *context, const char *type, const char *name, const UDataInfo *pInfo) { diff --git a/icu4c/source/common/ucnv_bld.c b/icu4c/source/common/ucnv_bld.c index 741df2d579d..5aea806c850 100644 --- a/icu4c/source/common/ucnv_bld.c +++ b/icu4c/source/common/ucnv_bld.c @@ -142,7 +142,7 @@ U_CAPI UBool U_EXPORT2 ucnv_cleanup(void) { return (SHARED_DATA_HASHTABLE == NULL); } -static UBool +static UBool U_CALLCONV isCnvAcceptable(void *context, const char *type, const char *name, const UDataInfo *pInfo) { diff --git a/icu4c/source/common/ucnv_io.c b/icu4c/source/common/ucnv_io.c index 2c525677449..40a0c72291c 100644 --- a/icu4c/source/common/ucnv_io.c +++ b/icu4c/source/common/ucnv_io.c @@ -179,7 +179,7 @@ static const char *defaultConverterName = NULL; #define GET_STRING(idx) (const char *)(stringTable + (idx)) #define NUM_RESERVED_TAGS 2 -static UBool +static UBool U_CALLCONV isAcceptable(void *context, const char *type, const char *name, const UDataInfo *pInfo) { diff --git a/icu4c/source/common/unames.c b/icu4c/source/common/unames.c index 4026e434162..a60e174fdf4 100644 --- a/icu4c/source/common/unames.c +++ b/icu4c/source/common/unames.c @@ -68,7 +68,7 @@ static UCharNames *uCharNames=NULL; static UBool isDataLoaded(UErrorCode *pErrorCode); -static UBool +static UBool U_CALLCONV isAcceptable(void *context, const char *type, const char *name, const UDataInfo *pInfo); @@ -465,7 +465,7 @@ isDataLoaded(UErrorCode *pErrorCode) { return TRUE; } -static UBool +static UBool U_CALLCONV isAcceptable(void *context, const char *type, const char *name, const UDataInfo *pInfo) { diff --git a/icu4c/source/common/unicode/ustring.h b/icu4c/source/common/unicode/ustring.h index 89b2ae17891..22ee41a9b85 100644 --- a/icu4c/source/common/unicode/ustring.h +++ b/icu4c/source/common/unicode/ustring.h @@ -751,7 +751,7 @@ u_unescape(const char *src, * @stable */ U_CDECL_BEGIN -typedef UChar (*UNESCAPE_CHAR_AT)(int32_t offset, void *context); +typedef UChar (U_CALLCONV *UNESCAPE_CHAR_AT)(int32_t offset, void *context); U_CDECL_END /** diff --git a/icu4c/source/common/uresdata.c b/icu4c/source/common/uresdata.c index b2624dfa51a..71600d55694 100644 --- a/icu4c/source/common/uresdata.c +++ b/icu4c/source/common/uresdata.c @@ -178,7 +178,7 @@ _res_findTableIndex(const Resource *pRoot, const Resource res, const char *key) /* helper for res_load() ---------------------------------------------------- */ -static UBool +static UBool U_CALLCONV isAcceptable(void *context, const char *type, const char *name, const UDataInfo *pInfo) { diff --git a/icu4c/source/common/ustring.c b/icu4c/source/common/ustring.c index ba8e048050a..373b99c8e7d 100644 --- a/icu4c/source/common/ustring.c +++ b/icu4c/source/common/ustring.c @@ -1091,7 +1091,8 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt, } /* u_unescapeAt() callback to return a UChar from a char* */ -static UChar _charPtr_charAt(int32_t offset, void *context) { +static UChar U_CALLCONV +_charPtr_charAt(int32_t offset, void *context) { UChar c16; /* It would be more efficient to access the invariant tables * directly but there is no API for that. */ diff --git a/icu4c/source/extra/ustdio/loccache.c b/icu4c/source/extra/ustdio/loccache.c index 3686a7c89f7..bf4b9ed74c4 100644 --- a/icu4c/source/extra/ustdio/loccache.c +++ b/icu4c/source/extra/ustdio/loccache.c @@ -26,7 +26,7 @@ /* The global cache */ UHashtable *gLocaleCache = NULL; -static U_EXPORT2 void U_CALLCONV +static void U_CALLCONV hash_freeBundle(void* obj) { u_locbund_delete((ULocaleBundle *)obj); diff --git a/icu4c/source/extra/ustdio/ustdio.c b/icu4c/source/extra/ustdio/ustdio.c index 6d5b05fbb66..861e1cb6950 100644 --- a/icu4c/source/extra/ustdio/ustdio.c +++ b/icu4c/source/extra/ustdio/ustdio.c @@ -536,7 +536,8 @@ u_fgetc(UFILE *f) } /* u_unescapeAt() callback to return a UChar from a UFILE */ -static UChar _charAt(int32_t offset, void *context) { +static UChar U_CALLCONV +_charAt(int32_t offset, void *context) { return ((UFILE*) context)->fUCPos[offset]; } diff --git a/icu4c/source/i18n/ucol_tok.cpp b/icu4c/source/i18n/ucol_tok.cpp index 2be8faf7ff9..aa6380d3ecf 100644 --- a/icu4c/source/i18n/ucol_tok.cpp +++ b/icu4c/source/i18n/ucol_tok.cpp @@ -506,7 +506,7 @@ void ucol_uprv_tok_initData() { } } -const UChar * +U_CAPI const UChar * U_EXPORT2 ucol_tok_getNextArgument(const UChar *start, const UChar *end, UColAttribute *attrib, UColAttributeValue *value, UErrorCode *status) { diff --git a/icu4c/source/test/cintltst/cucdtst.c b/icu4c/source/test/cintltst/cucdtst.c index e5ace45ad04..8f0a213d176 100644 --- a/icu4c/source/test/cintltst/cucdtst.c +++ b/icu4c/source/test/cintltst/cucdtst.c @@ -554,7 +554,7 @@ static void TestIdentifier() * Then it should check that the areas contain all the same properties except where overridden. * For this, it would have had to set a flag for which code points were listed explicitly. */ -static void +static void U_CALLCONV unicodeDataLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) diff --git a/icu4c/source/test/cintltst/nucnvtst.c b/icu4c/source/test/cintltst/nucnvtst.c index b2181794852..707dabf0be1 100644 --- a/icu4c/source/test/cintltst/nucnvtst.c +++ b/icu4c/source/test/cintltst/nucnvtst.c @@ -3102,7 +3102,7 @@ static void TestConv(const uint16_t in[],int len, const char* conv, const char* free(cBuf); free(offsets); } -static UChar +static UChar U_CALLCONV _charAt(int32_t offset, void *context) { return ((char*)context)[offset]; } diff --git a/icu4c/source/test/cintltst/udatatst.c b/icu4c/source/test/cintltst/udatatst.c index a6ad92e48c5..339e065958a 100644 --- a/icu4c/source/test/cintltst/udatatst.c +++ b/icu4c/source/test/cintltst/udatatst.c @@ -355,7 +355,7 @@ cleanupAndReturn: } -static UBool +static UBool U_CALLCONV isAcceptable1(void *context, const char *type, const char *name, const UDataInfo *pInfo) { @@ -387,7 +387,7 @@ isAcceptable1(void *context, } } -static UBool +static UBool U_CALLCONV isAcceptable2(void *context, const char *type, const char *name, const UDataInfo *pInfo){ @@ -411,7 +411,7 @@ isAcceptable2(void *context, } -static UBool +static UBool U_CALLCONV isAcceptable3(void *context, const char *type, const char *name, const UDataInfo *pInfo){ @@ -483,7 +483,7 @@ static void TestUDataOpenChoiceDemo1() { } } -static UBool +static UBool U_CALLCONV isAcceptable(void *context, const char *type, const char *name, const UDataInfo *pInfo){ diff --git a/icu4c/source/test/collperf/collperf.cpp b/icu4c/source/test/collperf/collperf.cpp index 0851fcd6b39..7cc3783113b 100644 --- a/icu4c/source/test/collperf/collperf.cpp +++ b/icu4c/source/test/collperf/collperf.cpp @@ -483,7 +483,7 @@ void doBinarySearch() if (opt_strcmp || opt_strcmpCPO) { unsigned long startTime = timeGetTime(); - typedef int32_t (*PF)(const UChar *, const UChar *); + typedef int32_t (U_EXPORT2 *PF)(const UChar *, const UChar *); PF pf = u_strcmp; if (opt_strcmpCPO) {pf = u_strcmpCodePointOrder;} if (opt_strcmp && opt_win) {pf = (PF)wcscmp;} // Damn the difference between int32_t and int diff --git a/icu4c/source/tools/gennames/gennames.c b/icu4c/source/tools/gennames/gennames.c index fdf81850154..e6714447fe3 100644 --- a/icu4c/source/tools/gennames/gennames.c +++ b/icu4c/source/tools/gennames/gennames.c @@ -354,7 +354,7 @@ init() { /* parsing ------------------------------------------------------------------ */ -static void +static void U_CALLCONV lineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { diff --git a/icu4c/source/tools/gennorm/gennorm.c b/icu4c/source/tools/gennorm/gennorm.c index f147bd506c9..c187ce73eea 100644 --- a/icu4c/source/tools/gennorm/gennorm.c +++ b/icu4c/source/tools/gennorm/gennorm.c @@ -183,7 +183,7 @@ main(int argc, char* argv[]) { /* parser for DerivedNormalizationProperties.txt ---------------------------- */ -static void +static void U_CALLCONV derivedNormalizationPropertiesLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -281,7 +281,7 @@ parseDerivedNormalizationProperties(const char *filename, UErrorCode *pErrorCode /* parser for UnicodeData.txt ----------------------------------------------- */ -static void +static void U_CALLCONV unicodeDataLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { diff --git a/icu4c/source/tools/genprops/genprops.c b/icu4c/source/tools/genprops/genprops.c index 7c6cdee708a..1322b8f3690 100644 --- a/icu4c/source/tools/genprops/genprops.c +++ b/icu4c/source/tools/genprops/genprops.c @@ -239,7 +239,7 @@ getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s) { static uint32_t mirrorMappings[MAX_MIRROR_COUNT][2]; static int32_t mirrorCount=0; -static void +static void U_CALLCONV mirrorLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -295,7 +295,7 @@ parseBidiMirroring(const char *filename, UErrorCode *pErrorCode) { static SpecialCasing specialCasings[MAX_SPECIAL_CASING_COUNT]; static int32_t specialCasingCount=0; -static void +static void U_CALLCONV specialCasingLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -390,7 +390,7 @@ parseSpecialCasing(const char *filename, UErrorCode *pErrorCode) { static CaseFolding caseFoldings[MAX_CASE_FOLDING_COUNT]; static int32_t caseFoldingCount=0; -static void +static void U_CALLCONV caseFoldingLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -546,7 +546,7 @@ static struct { static int32_t unicodeAreaIndex=0, mirrorIndex=0, specialCasingIndex=0, caseFoldingIndex=0; -static void +static void U_CALLCONV unicodeDataLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { diff --git a/icu4c/source/tools/genprops/props2.c b/icu4c/source/tools/genprops/props2.c index 8c318bea09d..d30ee70c6b5 100644 --- a/icu4c/source/tools/genprops/props2.c +++ b/icu4c/source/tools/genprops/props2.c @@ -52,37 +52,37 @@ parseArabicShaping(char *filename, char *basename, const char *suffix, UErrorCode *pErrorCode); -static void +static void U_CALLCONV ageLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode); -static void +static void U_CALLCONV scriptsLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode); -static void +static void U_CALLCONV blocksLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode); -static void +static void U_CALLCONV propListLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode); -static void +static void U_CALLCONV derivedPropListLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode); -static void +static void U_CALLCONV eaWidthLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode); -static void +static void U_CALLCONV lineBreakLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode); @@ -191,7 +191,7 @@ parseTwoFieldFile(char *filename, char *basename, /* DerivedAge.txt ----------------------------------------------------------- */ -static void +static void U_CALLCONV ageLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -235,7 +235,7 @@ ageLineFn(void *context, /* Scripts.txt -------------------------------------------------------------- */ -static void +static void U_CALLCONV scriptsLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -394,7 +394,7 @@ blockNames[UBLOCK_COUNT]={ "Supplementary Private Use Area-B" /* 110 */ }; -static void +static void U_CALLCONV blocksLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -471,7 +471,7 @@ propListNames[]={ "Logical_Order_Exception" }; -static void +static void U_CALLCONV propListLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -509,7 +509,7 @@ derivedPropListNames[]={ "XID_Continue" }; -static void +static void U_CALLCONV derivedPropListLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -547,7 +547,7 @@ eaNames[U_EA_COUNT]={ "W" /* Wide, default for plane 2 */ }; -static void +static void U_CALLCONV eaWidthLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -619,7 +619,7 @@ lbNames[U_LB_COUNT]={ "ZW" }; -static void +static void U_CALLCONV lineBreakLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { @@ -715,7 +715,7 @@ jgNames[U_JG_COUNT]={ "ZAIN" }; -static void +static void U_CALLCONV arabicShapingLineFn(void *context, char *fields[][2], int32_t fieldCount, UErrorCode *pErrorCode) { diff --git a/icu4c/source/tools/toolutil/ucbuf.c b/icu4c/source/tools/toolutil/ucbuf.c index de410bd06b7..511f4dc163c 100644 --- a/icu4c/source/tools/toolutil/ucbuf.c +++ b/icu4c/source/tools/toolutil/ucbuf.c @@ -259,7 +259,7 @@ ucbuf_getc(UCHARBUF* buf,UErrorCode* err){ /* u_unescapeAt() callback to return a UChar*/ -static UChar +static UChar U_CALLCONV _charAt(int32_t offset, void *context) { return ((UCHARBUF*) context)->currentPos[offset]; }