Skip to content
Permalink
Browse files

添加 legacy_stdio_definitions.lib 支持。

  • Loading branch information...
mingkuang-Chuyu committed Jul 11, 2019
1 parent c1c5f2b commit f5c722fc85af3c00b36bb8adc362b90dcc26851d
@@ -195,9 +195,9 @@ If VC-LTL is referenced correctly, it will be output at the time of generation:


## 5. Known Issues
* 由于WinXP本身Bug,printf相关函数输入缓冲区最大字符数为0x3FFFFFFF(包含)。当你需要兼容XP时,请务必确认缓冲区输入长度小于0x3FFFFFFF,或者直接使用 `_CRT_STDIO_SIZE_MAX` 宏。_s 版本不存在此问题。
* 由于WinXP本身Bug,printf相关函数无法正常支持`%ll`。当你需要兼容XP时,请优先考虑使用`%I64`代替。_s 版本也存在此问题。
* 由于msvcrt本身限制,`setlocale/_create_locale`相关函数不支持UCRT的locale name,使用时必须按VC 2008规范使用,比如 `setlocale(0, ".936");` 这样调用,而不是传入 `setlocale(0, "zh-CN");`。
* 由于WinXP本身Bug,printf相关函数输入缓冲区最大字符数为0x3FFFFFFF(包含)。当你需要兼容XP时,请务必确认缓冲区输入长度小于0x3FFFFFFF,或者直接使用 `_CRT_STDIO_SIZE_MAX` 宏。(4.0.2.5 Advanced模式已经修正此问题)
* 由于WinXP本身Bug,printf相关函数无法正常支持`%ll`。当你需要兼容XP时,请优先考虑使用`%I64`代替。(4.0.2.5 Advanced模式已经修正此问题)
* 由于msvcrt本身限制,`setlocale/_create_locale`相关函数不支持UCRT的locale name,使用时必须按VC 2008规范使用,比如 `setlocale(0, "chs");` 这样调用,而不是传入 `setlocale(0, "zh-CN");`
* 由于FH4异常(`/d2FH4` VS2019新增功能)实现过程中使用了TLS,因此在兼容“Windows XP(2003) x64”时请务必确保不要在DllMain中使用FH4 catch,否则将导致dll直接加载失败。


@@ -451,9 +451,9 @@ If VC-LTL is referenced correctly, it will be output at the time of generation:
* Improve, the `_ATL_XP_TARGETING` and `_USING_V110_SDK71_` macros in Vista mode are adjusted from error to warning.
### 4.0.2.5 - Improved Support (July 8, 2019 16:00)
### 4.0.2.5 - Improved Support (July 11, 2019 15:00)
* Improve compatibility with Lenovo one-click audio and video (This Issue also exists in Microsoft's UCRT).
* Improve compatibility with Windows 7 RTM and older systems (This Issue also exists in Microsoft's UCRT).
* [Improve 53](https://github.com/Chuyu-Team/VC-LTL/issues/53), disable reference elimination for the STL library and avoid LLVM link failure (Thanks to hotxp, BigBrother).
* New Fea, add `_CRT_STDIO_ISO_WIDE_SPECIFIERS` macro support (Thanks to BigBrother).
* New Fea, add `_CRT_STDIO_ISO_WIDE_SPECIFIERS` macro and `legacy_stdio_definitions.lib` support (Thanks to BigBrother).
* New Fea, add `_initialize_invalid_parameter_handler`, `_initialize_denormal_control` and `_get_startup_thread_locale_mode (Vista mode only)` support。
@@ -184,9 +184,9 @@ nmake /f Test.mak


## 5. 已知问题
* 由于WinXP本身Bug,printf相关函数输入缓冲区最大字符数为0x3FFFFFFF(包含)。当你需要兼容XP时,请务必确认缓冲区输入长度小于0x3FFFFFFF,或者直接使用 `_CRT_STDIO_SIZE_MAX` 宏。_s 版本不存在此问题。
* 由于WinXP本身Bug,printf相关函数无法正常支持`%ll`。当你需要兼容XP时,请优先考虑使用`%I64`代替。_s 版本也存在此问题。
* 由于msvcrt本身限制,`setlocale/_create_locale`相关函数不支持UCRT的locale name,使用时必须按VC 2008规范使用,比如 `setlocale(0, ".936");` 这样调用,而不是传入 `setlocale(0, "zh-CN");`。
* 由于WinXP本身Bug,printf相关函数输入缓冲区最大字符数为0x3FFFFFFF(包含)。当你需要兼容XP时,请务必确认缓冲区输入长度小于0x3FFFFFFF,或者直接使用 `_CRT_STDIO_SIZE_MAX` 宏。(4.0.2.5 Advanced模式已经修正此问题)
* 由于WinXP本身Bug,printf相关函数无法正常支持`%ll`。当你需要兼容XP时,请优先考虑使用`%I64`代替。(4.0.2.5 Advanced模式已经修正此问题)
* 由于msvcrt本身限制,`setlocale/_create_locale`相关函数不支持UCRT的locale name,使用时必须按VC 2008规范使用,比如 `setlocale(0, "chs");` 这样调用,而不是传入 `setlocale(0, "zh-CN");`
* 由于FH4异常(`/d2FH4` VS2019新增功能)实现过程中使用了TLS,因此在兼容“Windows XP(2003) x64”时请务必确保不要在DllMain中使用FH4 catch,否则将导致dll直接加载失败。

## 附:已知使用VC-LTL的官方项目
@@ -439,9 +439,9 @@ nmake /f Test.mak
* 改进体验,Vista模式将`_ATL_XP_TARGETING`以及`_USING_V110_SDK71_`宏从错误降级到警告。
### 4.0.2.5 - 改进支持(2019-07-08 16:00)
### 4.0.2.5 - 改进支持(2019-07-11 15:00)
* 改进体验,改进与联想一键影音的兼容性,由于联想一键影音错会乱Hook,导致LoadLibraryExW行为异常。这样将导致VC-LTL等在没有安装KB2533623的系统上无法正常使用问题(微软原版也同样存在此问题)。
* 改进体验,改进Windows 7 RTM以及以下系统的兼容性,由于这些老版本系统由于在LoadLibraryExW期间不会恢复重定向,因此当目标线程关闭重定向时可能导致VC-LTL无法正常工作(微软原版也同样存在此问题)。
* [改进体验 53](https://github.com/Chuyu-Team/VC-LTL/issues/53),关闭对STL库的引用消除,规避LLVM链接失败问题(感谢 hotxp、BigBrother)。
* 新增Fea,添加 `_CRT_STDIO_ISO_WIDE_SPECIFIERS` 宏支持(感谢 大胸)。
* 新增Fea,添加 `_CRT_STDIO_ISO_WIDE_SPECIFIERS` 宏以及 `legacy_stdio_definitions.lib` 支持(感谢 大胸)。
* 新增Fea,添加`_initialize_invalid_parameter_handler`、`_initialize_denormal_control`、`_get_startup_thread_locale_mode(仅Vista模式)`支持。
@@ -47,7 +47,7 @@ _LTL_PushWarning(1004,"从VC-LTL 4.0 开始MD模式将链接到VC-LTL自身的DL
#endif // !_UCRT_LTL_Include


#if !defined(_NO_CRT_STDIO_INLINE) && !defined(_CRT_STDIO_ISO_WIDE_SPECIFIERS)
#if !defined(_NO_CRT_STDIO_INLINE)
//关闭常用的pintf系列函数的内联操作,充分利用msvcrt现有函数进一步减少体积。
#define _NO_CRT_STDIO_INLINE 1
#endif
@@ -148,3 +148,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
@@ -144,3 +144,4 @@ GENERATE_LINKER_OPTION(MT, "libucrt_shared.lib")

GENERATE_LINKER_OPTION(SD, "vc.lib")
GENERATE_LINKER_OPTION(SD, "msvcrt_Platform.lib")
GENERATE_LINKER_OPTION(SD, "legacy_stdio_definitions.lib")
BIN +0 Bytes (100%) src/Shared-Resource.h
Binary file not shown.
@@ -18,7 +18,7 @@ call:Build Static_WinXP_Spectre "x86 x64"

::生成动态UCRT库
call:Build Redist "x86 x64 ARM ARM64" "ucrt\ucrt.vcxproj"
call:Build Dynamic "x86 x64 ARM ARM64" "ucrt\ucrt.vcxproj"
::call:Build Dynamic "x86 x64 ARM ARM64" "ucrt\ucrt.vcxproj"



@@ -1253,18 +1253,22 @@ Global
{E43CF120-7599-4BD4-99B5-D5A2160CD391}.Static|x64.Build.0 = Static|x64
{E43CF120-7599-4BD4-99B5-D5A2160CD391}.Static|x86.ActiveCfg = Static|Win32
{E43CF120-7599-4BD4-99B5-D5A2160CD391}.Static|x86.Build.0 = Static|Win32
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|ARM.ActiveCfg = Dynamic|ARM
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|ARM64.ActiveCfg = Dynamic|ARM64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|x64.ActiveCfg = Dynamic|x64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|x86.ActiveCfg = Dynamic|Win32
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|ARM.ActiveCfg = Dynamic|ARM
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|ARM.Build.0 = Dynamic|ARM
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|ARM64.ActiveCfg = Dynamic|ARM64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|ARM64.Build.0 = Dynamic|ARM64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|x64.ActiveCfg = Dynamic|x64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|x64.Build.0 = Dynamic|x64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|x86.ActiveCfg = Dynamic|Win32
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|x86.Build.0 = Dynamic|Win32
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|ARM.ActiveCfg = Static_WinXP|ARM
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|ARM.Build.0 = Static_WinXP|ARM
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|ARM64.ActiveCfg = Static_WinXP|ARM64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|ARM64.Build.0 = Static_WinXP|ARM64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|x64.ActiveCfg = Static_WinXP|x64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|x64.Build.0 = Static_WinXP|x64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|x86.ActiveCfg = Static_WinXP|Win32
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic_Spectre|x86.Build.0 = Static_WinXP|Win32
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|ARM.ActiveCfg = Static_WinXP|ARM
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|ARM.Build.0 = Static_WinXP|ARM
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|ARM64.ActiveCfg = Redist|ARM64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|ARM64.Build.0 = Redist|ARM64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|x64.ActiveCfg = Static_WinXP|x64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|x64.Build.0 = Static_WinXP|x64
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|x86.ActiveCfg = Static_WinXP|Win32
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Dynamic|x86.Build.0 = Static_WinXP|Win32
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Redist|ARM.ActiveCfg = Redist|ARM
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Redist|ARM.Build.0 = Redist|ARM
{EA6AF334-BF41-4265-A355-C5667B6F4554}.Redist|ARM64.ActiveCfg = Redist|ARM64
@@ -2764,12 +2768,9 @@ Global
{0B7ED4FB-C2CA-42F6-B735-6E3EBC928D00}.Static|x64.Build.0 = Static|x64
{0B7ED4FB-C2CA-42F6-B735-6E3EBC928D00}.Static|x86.ActiveCfg = Static|Win32
{0B7ED4FB-C2CA-42F6-B735-6E3EBC928D00}.Static|x86.Build.0 = Static|Win32
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|ARM.ActiveCfg = Static_WinXP_Spectre|ARM
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|ARM.Build.0 = Static_WinXP_Spectre|ARM
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|ARM64.ActiveCfg = Static_WinXP_Spectre|ARM64
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|ARM64.Build.0 = Static_WinXP_Spectre|ARM64
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|x64.ActiveCfg = Static_WinXP_Spectre|x64
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|x64.Build.0 = Static_WinXP_Spectre|x64
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|ARM.ActiveCfg = Redist|ARM
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|ARM64.ActiveCfg = Redist|ARM64
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|x64.ActiveCfg = Redist|x64
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic_Spectre|x86.ActiveCfg = Redist|Win32
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic|ARM.ActiveCfg = Redist|ARM
{C2E724E5-33F3-4A97-916D-B1A5840034F5}.Dynamic|ARM64.ActiveCfg = Redist|ARM64

0 comments on commit f5c722f

Please sign in to comment.
You can’t perform that action at this time.