mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[MSVCRT][CRT][UCRT] Disable intrinsic string functions on MSVC (#9157)
VS2022 version 17.2 and later (`_MSC_VER >= 1932`) added new intrinsic functions (`strncmp`, `strncpy`, `wcsncmp`, and `wcsncpy`). As we implement these ourselves, we have to avoid compiler error C2169. This problem surfaced with a recent GitHub Actions update: https://github.com/actions/runner-images/issues/14017 Use `#pragma function(...)` to disable new intrinsic functions.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#include <stddef.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#if defined(_MSC_VER) && defined(_M_ARM)
|
||||
#if defined(_MSC_VER) && (defined(_M_ARM) || _MSC_VER >= 1932) // VS2022 version 17.2 and later
|
||||
#pragma function(_tcsncmp)
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <stddef.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#if defined(_MSC_VER) && defined(_M_ARM)
|
||||
#if defined(_MSC_VER) && (defined(_M_ARM) || _MSC_VER >= 1932) // VS2022 version 17.2 and later
|
||||
#pragma function(_tcsncpy)
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _M_ARM
|
||||
#if defined(_MSC_VER) && (defined(_M_ARM) || _MSC_VER >= 1932) // VS2022 version 17.2 and later
|
||||
#pragma function(strncmp)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if defined _M_ARM
|
||||
#if defined(_MSC_VER) && (defined(_M_ARM) || _MSC_VER >= 1932) // VS2022 version 17.2 and later
|
||||
#pragma function(strncpy)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
|
||||
#ifdef _M_ARM
|
||||
#if defined(_MSC_VER) && (defined(_M_ARM) || _MSC_VER >= 1932) // VS2022 version 17.2 and later
|
||||
#pragma function(wcsncmp)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#pragma warning(disable:__WARNING_POSTCONDITION_NULLTERMINATION_VIOLATION) // 26036
|
||||
|
||||
|
||||
#ifdef _M_ARM
|
||||
#if defined(_MSC_VER) && (defined(_M_ARM) || _MSC_VER >= 1932) // VS2022 version 17.2 and later
|
||||
#pragma function(wcsncpy)
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user