diff --git a/src/conio/ciolib.c b/src/conio/ciolib.c index 9f134fdddd344469c4371403c07661e82b7d7f02..772893d5eeee253adfeb67da03d237eca7ead56a 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)