mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 07:47:32 +09:00
Issue #1971 - Part 2: Update ICU source to 63.2.
This commit is contained in:
parent
8df84683be
commit
1e69214382
3160 changed files with 275815 additions and 234203 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/******************************************************************************
|
||||
* Copyright (C) 2000-2016, International Business Machines
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
#include "putilimp.h"
|
||||
|
||||
#if U_HAVE_POPEN
|
||||
#if (U_PF_MINGW <= U_PLATFORM || U_PLATFORM <= U_PF_CYGWIN) && defined(__STRICT_ANSI__)
|
||||
#if (U_PF_MINGW <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(__STRICT_ANSI__)
|
||||
/* popen/pclose aren't defined in strict ANSI on Cygwin and MinGW */
|
||||
#undef __STRICT_ANSI__
|
||||
#endif
|
||||
|
|
@ -121,7 +121,9 @@ enum {
|
|||
LIBNAME,
|
||||
QUIET,
|
||||
WITHOUT_ASSEMBLY,
|
||||
PDS_BUILD
|
||||
PDS_BUILD,
|
||||
UWP_BUILD,
|
||||
UWP_ARM_BUILD
|
||||
};
|
||||
|
||||
/* This sets the modes that are available */
|
||||
|
|
@ -163,7 +165,9 @@ static UOption options[]={
|
|||
/*18*/ UOPTION_DEF( "libname", 'L', UOPT_REQUIRES_ARG),
|
||||
/*19*/ UOPTION_DEF( "quiet", 'q', UOPT_NO_ARG),
|
||||
/*20*/ UOPTION_DEF( "without-assembly", 'w', UOPT_NO_ARG),
|
||||
/*21*/ UOPTION_DEF( "zos-pds-build", 'z', UOPT_NO_ARG)
|
||||
/*21*/ UOPTION_DEF("zos-pds-build", 'z', UOPT_NO_ARG),
|
||||
/*22*/ UOPTION_DEF("windows-uwp-build", 'u', UOPT_NO_ARG),
|
||||
/*23*/ UOPTION_DEF("windows-uwp-arm-build", 'a', UOPT_NO_ARG)
|
||||
};
|
||||
|
||||
/* This enum and the following char array should be kept in sync. */
|
||||
|
|
@ -250,9 +254,11 @@ const char options_help[][320]={
|
|||
"Specify a version when packaging in dll or static mode",
|
||||
"Add package to all file names if not present",
|
||||
"Library name to build (if different than package name)",
|
||||
"Quite mode. (e.g. Do not output a readme file for static libraries)",
|
||||
"Quiet mode. (e.g. Do not output a readme file for static libraries)",
|
||||
"Build the data without assembly code",
|
||||
"Build PDS dataset (zOS build only)"
|
||||
"Build PDS dataset (zOS build only)",
|
||||
"Build for Universal Windows Platform (Windows build only)",
|
||||
"Set DLL machine type for UWP to target windows ARM (Windows UWP build only)"
|
||||
};
|
||||
|
||||
const char *progname = "PKGDATA";
|
||||
|
|
@ -505,7 +511,7 @@ main(int argc, char* argv[]) {
|
|||
static int runCommand(const char* command, UBool specialHandling) {
|
||||
char *cmd = NULL;
|
||||
char cmdBuffer[SMALL_BUFFER_MAX_SIZE];
|
||||
int32_t len = strlen(command);
|
||||
int32_t len = static_cast<int32_t>(strlen(command));
|
||||
|
||||
if (len == 0) {
|
||||
return 0;
|
||||
|
|
@ -898,7 +904,8 @@ static void createFileNames(UPKGOptions *o, const char mode, const char *version
|
|||
if (IN_DLL_MODE(mode)) {
|
||||
sprintf(libFileNames[LIB_FILE], "%s", libName);
|
||||
} else {
|
||||
sprintf(libFileNames[LIB_FILE], "%s%s",
|
||||
sprintf(libFileNames[LIB_FILE], "%s%s%s",
|
||||
(strstr(libName, "icudt") ? "lib" : ""),
|
||||
pkgDataFlags[LIBPREFIX],
|
||||
libName);
|
||||
}
|
||||
|
|
@ -1014,7 +1021,7 @@ static int32_t pkg_createSymLinks(const char *targetDir, UBool specialHandling)
|
|||
char name2[SMALL_BUFFER_MAX_SIZE]; /* file name to symlink */
|
||||
const char* FILE_EXTENSION_SEP = uprv_strlen(pkgDataFlags[SO_EXT]) == 0 ? "" : ".";
|
||||
|
||||
#if !defined(USING_CYGWIN) && U_PLATFORM != U_PF_MINGW
|
||||
#if U_PLATFORM != U_PF_CYGWIN
|
||||
/* No symbolic link to make. */
|
||||
if (uprv_strlen(libFileNames[LIB_FILE_VERSION]) == 0 || uprv_strlen(libFileNames[LIB_FILE_VERSION_MAJOR]) == 0 ||
|
||||
uprv_strcmp(libFileNames[LIB_FILE_VERSION], libFileNames[LIB_FILE_VERSION_MAJOR]) == 0) {
|
||||
|
|
@ -1219,7 +1226,7 @@ static int32_t pkg_installFileMode(const char *installDir, const char *srcDir, c
|
|||
if (f != NULL) {
|
||||
for(;;) {
|
||||
if (T_FileStream_readLine(f, buffer, SMALL_BUFFER_MAX_SIZE) != NULL) {
|
||||
bufferLength = uprv_strlen(buffer);
|
||||
bufferLength = static_cast<int32_t>(uprv_strlen(buffer));
|
||||
/* Remove new line character. */
|
||||
if (bufferLength > 0) {
|
||||
buffer[bufferLength-1] = 0;
|
||||
|
|
@ -1751,7 +1758,14 @@ static int32_t pkg_createWithoutAssemblyCode(UPKGOptions *o, const char *targetD
|
|||
|
||||
#ifdef WINDOWS_WITH_MSVC
|
||||
#define LINK_CMD "link.exe /nologo /release /out:"
|
||||
#define LINK_FLAGS "/DLL /NOENTRY /MANIFEST:NO /base:0x4ad00000 /implib:"
|
||||
#define LINK_FLAGS "/DLL /NOENTRY /MANIFEST:NO /implib:"
|
||||
#ifdef _WIN64
|
||||
#define LINK_EXTRA_UWP_FLAGS "/NXCOMPAT /DYNAMICBASE /APPCONTAINER "
|
||||
#else
|
||||
#define LINK_EXTRA_UWP_FLAGS "/NXCOMPAT /SAFESEH /DYNAMICBASE /APPCONTAINER /MACHINE:X86"
|
||||
#endif
|
||||
#define LINK_EXTRA_UWP_FLAGS_ARM "/NXCOMPAT /DYNAMICBASE /APPCONTAINER /MACHINE:ARM"
|
||||
#define LINK_EXTRA_NO_UWP_FLAGS "/base:0x4ad00000 "
|
||||
#define LIB_CMD "LIB.exe /nologo /out:"
|
||||
#define LIB_FILE "icudt.lib"
|
||||
#define LIB_EXT UDATA_LIB_SUFFIX
|
||||
|
|
@ -1831,14 +1845,33 @@ static int32_t pkg_createWindowsDLL(const char mode, const char *gencFilePath, U
|
|||
return 0;
|
||||
}
|
||||
|
||||
sprintf(cmd, "%s\"%s\" %s\"%s\" \"%s\" %s",
|
||||
LINK_CMD,
|
||||
dllFilePath,
|
||||
LINK_FLAGS,
|
||||
libFilePath,
|
||||
gencFilePath,
|
||||
resFilePath
|
||||
);
|
||||
char *extraFlags = "";
|
||||
#ifdef WINDOWS_WITH_MSVC
|
||||
if (options[UWP_BUILD].doesOccur)
|
||||
{
|
||||
if (options[UWP_ARM_BUILD].doesOccur)
|
||||
{
|
||||
extraFlags = LINK_EXTRA_UWP_FLAGS_ARM;
|
||||
}
|
||||
else
|
||||
{
|
||||
extraFlags = LINK_EXTRA_UWP_FLAGS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
extraFlags = LINK_EXTRA_NO_UWP_FLAGS;
|
||||
}
|
||||
#endif
|
||||
sprintf(cmd, "%s\"%s\" %s %s\"%s\" \"%s\" %s",
|
||||
LINK_CMD,
|
||||
dllFilePath,
|
||||
extraFlags,
|
||||
LINK_FLAGS,
|
||||
libFilePath,
|
||||
gencFilePath,
|
||||
resFilePath
|
||||
);
|
||||
}
|
||||
|
||||
result = runCommand(cmd, TRUE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue