Browse Source

gcc fixes

Vadim Glazunov 17 years ago
parent
commit
387f8230cf
5 changed files with 6 additions and 5 deletions
  1. 1 1
      CCallback.h
  2. 1 1
      CConsoleHandler.h
  3. 1 1
      CMT.cpp
  4. 2 1
      lib/Connection.cpp
  5. 1 1
      server/CVCMIServer.cpp

+ 1 - 1
CCallback.h

@@ -168,7 +168,7 @@ public:
 #ifndef __GNUC__
 	friend int _tmain(int argc, _TCHAR* argv[]);
 #else
-	friend int main(int argc, _TCHAR* argv[]);
+	friend int main(int argc, char** argv);
 #endif
 };
 #endif //CCALLBACK_H

+ 1 - 1
CConsoleHandler.h

@@ -12,7 +12,7 @@ public:
 #ifndef __GNUC__
 	friend int _tmain(int argc, _TCHAR* argv[]);
 #else
-	friend int main(int argc, _TCHAR* argv[]);
+	friend int main(int argc, char **argv);
 #endif
 };
 

+ 1 - 1
CMT.cpp

@@ -48,7 +48,7 @@ TTF_Font * TNRB16, *TNR, *GEOR13, *GEORXX, *GEORM, *GEOR16;
 #ifndef __GNUC__
 int _tmain(int argc, _TCHAR* argv[])
 #else
-int main(int argc, _TCHAR* argv[])
+int main(int argc, char** argv)
 #endif
 { 
 	int port;

+ 2 - 1
lib/Connection.cpp

@@ -39,6 +39,7 @@ void CConnection::init()
 CConnection::CConnection(std::string host, std::string port, std::string Name, std::ostream & Out)
 :io_service(new asio::io_service), name(Name), out(Out)//, send(this), rec(this)
 {
+	int i;
 	boost::system::error_code error = asio::error::host_not_found;
 	socket = new tcp::socket(*io_service);
     tcp::resolver resolver(*io_service);
@@ -56,7 +57,7 @@ CConnection::CConnection(std::string host, std::string port, std::string Name, s
 		std::cout<< "Critical problem: No endpoints found!" << std::endl;
 		goto connerror1;
 	}
-	int i=0;
+	i=0;
 	while(pom != end)
 	{
 		std::cout << "\t" << i << ": " << (boost::asio::ip::tcp::endpoint&)*pom << std::endl;

+ 1 - 1
server/CVCMIServer.cpp

@@ -126,7 +126,7 @@ void CVCMIServer::start()
 #ifndef __GNUC__
 int _tmain(int argc, _TCHAR* argv[])
 #else
-int main(int argc, _TCHAR* argv[])
+int main(int argc, char** argv)
 #endif
 {
 	if(argc > 1)