mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 03:43:36 +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:
@@ -38,6 +38,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma function(_strset,memchr,memcmp,memcpy,memset,strcat,strcmp,strcpy,strlen)
|
||||
#ifdef __REACTOS__
|
||||
#if defined(_M_ARM) || _MSC_VER >= 1932 // VS2022 version 17.2 and later
|
||||
#pragma function(strncmp,strncpy)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
@@ -35,6 +35,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma function(_wcsset,wcscat,wcscmp,wcscpy,wcslen)
|
||||
#ifdef __REACTOS__
|
||||
#if defined(_M_ARM) || _MSC_VER >= 1932 // VS2022 version 17.2 and later
|
||||
#pragma function(wcsncmp,wcsncpy)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -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