From a5cf0160da91bc9b2a2e22119317724f2531f4c1 Mon Sep 17 00:00:00 2001 From: Vinzenz 'evilissimo' Feenstra Date: Sun, 16 Aug 2009 14:47:50 +0200 Subject: [PATCH] * Fixed warnings --- net/client/proxy/socks4.hpp | 8 +++++--- premake4.lua | 4 ++-- test/main.cpp | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/net/client/proxy/socks4.hpp b/net/client/proxy/socks4.hpp index a2b7703..32b91d6 100755 --- a/net/client/proxy/socks4.hpp +++ b/net/client/proxy/socks4.hpp @@ -26,9 +26,11 @@ #ifndef GUARD_NET_CLIENT_PROXY_SOCKS4_HPP_INCLUDED #define GUARD_NET_CLIENT_PROXY_SOCKS4_HPP_INCLUDED -#ifndef NOMINMAX -# define NOMINMAX -#endif //NOMINMAX +#if defined(WIN32) || defined(WIN64) +# ifndef NOMINMAX +# define NOMINMAX +# endif // NOMINMAX +#endif #include #include diff --git a/premake4.lua b/premake4.lua index 7b9b5ce..5928408 100755 --- a/premake4.lua +++ b/premake4.lua @@ -34,7 +34,7 @@ solution "libnetpp" links { "boost_system", "ssl" } configuration "windows" - defines { "WIN32", "BOOST_ALL_NO_LIB", "BOOST_ASIO_ENABLE_CANCELIO" } + defines { "WIN32", "BOOST_ALL_NO_LIB", "BOOST_ASIO_ENABLE_CANCELIO", "NOMINMAX", "_CRT_SECURE_NO_WARNINGS", "_SCL_SECURE_NO_WARNINGS", "_WIN32_WINNT=0x500" } configuration { "Debug", "windows"} links { "libboost_system-vc90-mt-gd-1_39", "ssleay32MDd", "libeay32MDd" } @@ -65,7 +65,7 @@ solution "libnetpp" links { "boost_system", "ssl" } configuration "windows" - defines { "WIN32", "BOOST_ALL_NO_LIB", "BOOST_ASIO_ENABLE_CANCELIO" } + defines { "WIN32", "BOOST_ALL_NO_LIB", "BOOST_ASIO_ENABLE_CANCELIO", "NOMINMAX", "_CRT_SECURE_NO_WARNINGS", "_SCL_SECURE_NO_WARNINGS", "_WIN32_WINNT=0x500" } configuration { "Debug", "windows"} links { "libboost_system-vc90-mt-gd-1_39", "ssleay32MDd", "libeay32MDd" } diff --git a/test/main.cpp b/test/main.cpp index 06fd3ef..0cd6367 100755 --- a/test/main.cpp +++ b/test/main.cpp @@ -146,9 +146,9 @@ int main(int argc, char const **argv) c.set_proxy(socks5_proxy_ptr); c.async_connect("www.google.cz","80", boost::bind(say, boost::ref(c.socket()), _1, "Plain")); - boost::system::error_code ec; - boost::array buffer; - size_t count = 0; +// boost::system::error_code ec; +// boost::array buffer; +// size_t count = 0; #if 0 if(c.connect("www.google.cz", "80", ec)) { -- 2.11.4.GIT