diff options
Diffstat (limited to 'common/vdcommon.h')
-rw-r--r-- | common/vdcommon.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/common/vdcommon.h b/common/vdcommon.h index af270db..01bbbc8 100644 --- a/common/vdcommon.h +++ b/common/vdcommon.h @@ -69,6 +69,27 @@ typedef CRITICAL_SECTION mutex_t; #endif /* OLDMSVCRT */ #ifdef _MSC_VER // compiling with Visual Studio +#define HAVE_STRCAT_S 1 +#define HAVE_STRCPY_S 1 +#endif + +#ifdef HAVE_STRCAT_S +#define vdagent_strcat_s +#else +errno_t vdagent_strcat_s(char *strDestination, + size_t numberOfElements, + const char *strSource) +#endif + +#ifdef HAVE_STRCPY_S +#define vdagent_strcpy_s +#else +errno_t vdagent_strcpy_s(char *strDestination, + size_t numberOfElements, + const char *strSource) +#endif + +#ifdef _MSC_VER // compiling with Visual Studio #define snprintf sprintf_s #define strncpy(d,s,n) strcpy_s(s, __min(n+1, sizeof(d)), s) #define strcat(d,s) strcat_s(d, sizeof(d), s) |