mirror of
https://git.proxmox.com/git/libgit2
synced 2025-07-09 21:21:29 +00:00
Secure CRT is only available from Visual Studio 2005+
This commit is contained in:
parent
491ad0de59
commit
72090514b1
@ -19,7 +19,7 @@
|
|||||||
# define EAFNOSUPPORT (INT_MAX-1)
|
# define EAFNOSUPPORT (INT_MAX-1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && _MSC_VER >= 1500
|
||||||
# define p_ftruncate(fd, sz) _chsize_s(fd, sz)
|
# define p_ftruncate(fd, sz) _chsize_s(fd, sz)
|
||||||
#else /* MinGW */
|
#else /* MinGW */
|
||||||
# define p_ftruncate(fd, sz) _chsize(fd, sz)
|
# define p_ftruncate(fd, sz) _chsize(fd, sz)
|
||||||
|
@ -543,7 +543,7 @@ char *p_realpath(const char *orig_path, char *buffer)
|
|||||||
|
|
||||||
int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr)
|
int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && _MSC_VER >= 1500
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (count == 0 ||
|
if (count == 0 ||
|
||||||
@ -570,7 +570,7 @@ int p_snprintf(char *buffer, size_t count, const char *format, ...)
|
|||||||
|
|
||||||
int p_mkstemp(char *tmp_path)
|
int p_mkstemp(char *tmp_path)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && _MSC_VER >= 1500
|
||||||
if (_mktemp_s(tmp_path, strlen(tmp_path) + 1) != 0)
|
if (_mktemp_s(tmp_path, strlen(tmp_path) + 1) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user