diff -r 32ef969adeed -r a18aaf460648 sources/main.cpp --- a/sources/main.cpp Fri May 15 21:43:21 2015 +0300 +++ b/sources/main.cpp Tue May 26 11:41:58 2015 +0300 @@ -28,9 +28,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "main.h" + +#ifndef _WIN32 +# include +#else +# include +#endif + #include -#include -#include "main.h" #include "network/rconsession.h" #include "huffman.h" #include "interface.h" @@ -40,6 +46,19 @@ FUNCTION main (int argc, char* argv[]) -> int { +#ifdef _WIN32 + FreeConsole(); + + WSADATA wsaData; + int result = WSAStartup (MAKEWORD (2, 2), &wsaData); + + if (result != 0) + { + fprintf (stderr, "WSAStartup failed: %d\n", result); + return 1; + } +#endif + HUFFMAN_Construct(); if (argc != 1 and argc != 3)