From 8087969c5b702c14ff1a1044085374070df01a86 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sat, 1 Feb 2014 23:27:49 +0100 Subject: [PATCH] crypto/cryptlib.c: remove stdio dependency (update from master). --- crypto/cryptlib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 2903bac2a8..8d16a9e0c8 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -858,8 +858,12 @@ void OPENSSL_showfatal (const char *fmta,...) if ((h=GetStdHandle(STD_ERROR_HANDLE)) != NULL && GetFileType(h)!=FILE_TYPE_UNKNOWN) { /* must be console application */ + int len; + DWORD out; + va_start (ap,fmta); - vfprintf (stderr,fmta,ap); + len=_vsnprintf((char *)buf,sizeof(buf),fmta,ap); + WriteFile(h,buf,len<0?sizeof(buf):(DWORD)len,&out,NULL); va_end (ap); return; } -- 2.25.1