diff options
author | Juha Reunanen <juha.reunanen@gmail.com> | 2014-01-22 00:51:18 +0400 |
---|---|---|
committer | Juha Reunanen <juha.reunanen@gmail.com> | 2014-01-22 00:51:18 +0400 |
commit | f9ffe165331d9811a0dbbff1a7572f838c12fdd4 (patch) | |
tree | 1320e915cea574b7fca1fee36fb41f1a28ed04ce /vowpalwabbit/csoaa.cc | |
parent | 465408de21a1b33fd9971b5915ce7c424b71f040 (diff) |
On Windows, sockets are not file descriptors. Therefore _read, _write, and _close should not be used for sockets. Replaced with recv, send, and closesocket.
Diffstat (limited to 'vowpalwabbit/csoaa.cc')
-rw-r--r-- | vowpalwabbit/csoaa.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/vowpalwabbit/csoaa.cc b/vowpalwabbit/csoaa.cc index 0e80b32f..88ca33d7 100644 --- a/vowpalwabbit/csoaa.cc +++ b/vowpalwabbit/csoaa.cc @@ -1191,11 +1191,7 @@ namespace LabelDict { for (size_t i=0; i<all.final_prediction_sink.size(); i++) { int f = all.final_prediction_sink[i]; ssize_t t; -#ifdef _WIN32 - t = _write(f, temp, 1); -#else - t = write(f, temp, 1); -#endif + t = io_buf::write_file_or_socket(f, temp, 1); if (t != 1) std::cerr << "write error" << std::endl; } |