ICU-22203 Windows: enable C-code generation with overridden entry point

This commit is contained in:
L. E. Segovia 2022-11-16 19:16:08 -03:00 committed by Markus Scherer
parent e7aad77f31
commit ba8e4087ca
4 changed files with 9 additions and 0 deletions

View file

@ -178,6 +178,7 @@ main(int argc, char* argv[]) {
switch (writeCode) {
case CALL_WRITECCODE:
writeCCode(filename, options[kOptDestDir].value,
options[kOptEntryPoint].doesOccur ? options[kOptEntryPoint].value : NULL,
options[kOptName].doesOccur ? options[kOptName].value : NULL,
options[kOptFilename].doesOccur ? options[kOptFilename].value : NULL,
NULL,

View file

@ -1725,6 +1725,7 @@ static int32_t pkg_createWithoutAssemblyCode(UPKGOptions *o, const char *targetD
writeCCode(
file,
o->tmpDir,
NULL,
dataName[0] != 0 ? dataName : o->shortName,
newName[0] != 0 ? newName : NULL,
gencmnFile,

View file

@ -389,6 +389,7 @@ U_CAPI void U_EXPORT2
writeCCode(
const char *filename,
const char *destdir,
const char *optEntryPoint,
const char *optName,
const char *optFilename,
char *outFilePath,
@ -444,6 +445,11 @@ writeCCode(
exit(U_FILE_ACCESS_ERROR);
}
if(optEntryPoint != NULL) {
uprv_strcpy(entry, optEntryPoint);
uprv_strcat(entry, "_dat");
}
/* turn dashes or dots in the entry name into underscores */
length=uprv_strlen(entry);
for(i=0; i<length; ++i) {

View file

@ -78,6 +78,7 @@ U_CAPI void U_EXPORT2
writeCCode(
const char *filename,
const char *destdir,
const char *optEntryPoint,
const char *optName,
const char *optFilename,
char *outFilePath,