mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
JIRA issue: CORE-20617 @learn-more found #9157 breaks the build as follows: > error C2220: the following warning is treated as an error > warning C4163: 'strncmp': not available as an intrinsic function > warning C4163: 'strncpy': not available as an intrinsic function _MSC_VER=1932 was not the version that the intrinsic functions (strncmp, strncpy, wcsncmp, wcsncpy) added. Using Compiler Explorer could detect the correct version: _MSC_VER=1950.
24 lines
361 B
C
24 lines
361 B
C
|
|
#include <stddef.h>
|
|
#include <tchar.h>
|
|
|
|
#if defined(_MSC_VER) && (defined(_M_ARM) || _MSC_VER >= 1950)
|
|
#pragma function(_tcsncmp)
|
|
#endif /* _MSC_VER */
|
|
|
|
int _tcsncmp(const _TCHAR * s1, const _TCHAR * s2, size_t n)
|
|
{
|
|
if(n == 0) return 0;
|
|
|
|
do
|
|
{
|
|
if(*s1 != *s2 ++) return *s1 - *-- s2;
|
|
if(*s1 ++ == 0) break;
|
|
}
|
|
while (-- n != 0);
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* EOF */
|