diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-03-24 00:07:20 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-03-24 00:37:30 +0900 |
| commit | 1188e4f1a2272a86091ea7a45ad4c11aac7c032e (patch) | |
| tree | 25c6f4ecff9604a265a1c21625478189bb565d1a /src/WinConsoleFile.cc | |
| parent | 96ffc3dfd4bacf337367072a023d290065ab9c0f (diff) | |
Fix mingw32 build with gcc 4.8.2
Now mingw-w64 C++ compiler defines __USE_MINGW_ANSI_STDIO to 1, we
have to follow it as well. We hope that mingw version of stdio
function behaves like Linux ones. We have not tested them thoroughly
yet. pthread for windows defines its own HAVE_STRUCT_TIMESPEC macro.
To avoid warning, we rename our version of it as
HAVE_A2_STRUCT_TIMESPEC.
Diffstat (limited to 'src/WinConsoleFile.cc')
| -rw-r--r-- | src/WinConsoleFile.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/WinConsoleFile.cc b/src/WinConsoleFile.cc index 6ef59d25..9ef08302 100644 --- a/src/WinConsoleFile.cc +++ b/src/WinConsoleFile.cc @@ -128,7 +128,7 @@ size_t WinConsoleFile::write(const char* str) int WinConsoleFile::vprintf(const char* format, va_list va) { - ssize_t r = _vscprintf(format, va); + ssize_t r = vsnprintf(NULL, 0, format, va); if (r <= 0) { return 0; } |
