File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ extern "C" {
1616#include <stdarg.h>
1717#include <stdio.h>
1818#include <string.h>
19+ #include <errno.h>
1920
2021#if defined(_MSC_VER )
2122#define NUM_FORMAT "%I64d"
@@ -89,9 +90,9 @@ extern "C" {
8990
9091#else
9192
92- #if !defined(__APPLE__ ) && !defined(__APPLE_CC__ )
93+ #if !defined(__APPLE__ ) && !defined(__APPLE_CC__ ) && !defined( _MSC_VER ) && !defined( __MINGW32__ ) && !defined( __CYGWIN__ ) && !defined( __WATCOMC__ )
9394typedef int errno_t ;
94- #endif /* !defined(__APPLE__) && !defined(__APPLE_CC__) */
95+ #endif /* !defined(__APPLE__) && !defined(__APPLE_CC__) && !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__WATCOMC__) */
9596
9697#if defined(__linux__ ) || defined(linux ) || defined(__linux ) || defined(ANY_BSD )
9798#define strerror_s strerror_r
Original file line number Diff line number Diff line change @@ -347,8 +347,13 @@ TEST x_mock_failures(void) {
347347 g_mock_vsnprintf_fail_call = 0 ;
348348
349349 s = malloc (10 );
350- if (s )
350+ if (s ) {
351+ #if defined(_MSC_VER )
352+ strcpy_s (s , 10 , "123" );
353+ #else
351354 strcpy (s , "123" );
355+ #endif
356+ }
352357 g_mock_realloc_fail = 1 ;
353358 ASSERT_EQ (-1 , c89stringutils_jasprintf (& s , "test" ));
354359 ASSERT_EQ (-1 , jasprintf (& s , "test" ));
You can’t perform that action at this time.
0 commit comments