win32-vd_agent/common
Uri Lublin d752a5b6e0 Fix Visual Studio compiler warning (strncpy)
Visual Studio complains:
  vdagent\file_xfer.h(28) : warning C4996: 'strncpy': This function or variable may
  Consider using strncpy_s instead.
  To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
  See online help for details.

Replace strncpy with strcpy_s when building with Visual Studio.
Adjust parameter order and difference in meaning of length:
- length param is last in strncpy and second in strcpy_s
- many calls to strncpy are given length param n-1, as
  strncpy does not guarantee that destination ends with '\0'
- it's safer to set length param not larger than sizeof(d)
  (assuming d is an array not a pointer)

Trying to use strcpy_s for both Visual Studio and mingw
failed as strcpy_s is missing from the default msvcrt.dll
on WinXP (See OLDMSVCRT in common/vdcommon.h).
2014-12-30 17:37:26 +02:00
..
stdint.h mingw: don't redefine SIZE_MAX 2012-02-23 19:03:25 +01:00
vdcommon.cpp vdservice: extract supported_system_version() to vdcommon 2013-03-18 12:54:04 +02:00
vdcommon.h Fix Visual Studio compiler warning (strncpy) 2014-12-30 17:37:26 +02:00
vdlog.cpp vdlog: Get swprinft_s definition from vdcommon.h 2013-01-22 12:43:44 +01:00
vdlog.h Add OLDMSVCRT fallback for _ftime_s 2013-01-22 12:43:51 +01:00