diff options
author | Andy Polyakov <appro@openssl.org> | 2014-02-01 23:27:49 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-02-01 23:27:49 +0100 |
commit | 8087969c5b702c14ff1a1044085374070df01a86 (patch) | |
tree | 14ec23e69c9b3c1c49e6a7e5c3320fae4071b9de /crypto/cryptlib.c | |
parent | cb437c66d1c3aea03bc5b96b221201ce7532f915 (diff) |
crypto/cryptlib.c: remove stdio dependency (update from master).
Diffstat (limited to 'crypto/cryptlib.c')
-rw-r--r-- | crypto/cryptlib.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |