From f66178e4413c1d1e21814983007580a45a03d6b1 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Fri, 13 Jun 2014 21:56:52 +0000
Subject: [PATCH] Use __MSVCRT__ to detect if the vsnprintf() implementation is
 by Microsoft(R)

---
 src/conio/ciolib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conio/ciolib.c b/src/conio/ciolib.c
index 9f134fdddd..772893d5ee 100644
--- a/src/conio/ciolib.c
+++ b/src/conio/ciolib.c
@@ -854,7 +854,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...)
 {
     va_list argptr;
 	int		ret;
-#ifdef _MSC_VER		/* Can't figure out a way to allocate a "big enough" buffer for Win32. */
+#if defined(_MSC_VER) || define(__MSVCRT__)	/* Can't figure out a way to allocate a "big enough" buffer for Win32. */
 	char	str[16384];
 #else
 	char	*str;
@@ -877,7 +877,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...)
     va_end(argptr);
 #else
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || define(__MSVCRT__)
 	ret=_vsnprintf(str,sizeof(str)-1,fmat,argptr);
 #else
 
@@ -895,7 +895,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...)
 	ret=vsprintf(str,fmat,argptr2);
 #endif
     va_end(argptr);
-#ifndef _MSC_VER
+#if defined(_MSC_VER) || define(__MSVCRT__)
     va_end(argptr2);
 #endif
 	if(ret>=0)
-- 
GitLab