From 7bf1a250d2b4304c4fb3d4a3abc89515bbd2b966 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Tue, 21 Apr 2015 22:08:04 -0400 Subject: [PATCH] fix some windows compiler errors --- include/win.h | 2 ++ src/inetfile/chttpget.cpp | 2 +- src/network/chat_api.cpp | 2 +- src/platform/win.cpp | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/win.h b/include/win.h index d406c14..7c47746 100644 --- a/include/win.h +++ b/include/win.h @@ -13,4 +13,6 @@ #define access _access #define stat _stat +typedef unsigned long in_addr_t; + #endif // WIN_H diff --git a/src/inetfile/chttpget.cpp b/src/inetfile/chttpget.cpp index 90af9eb..a0605b8 100644 --- a/src/inetfile/chttpget.cpp +++ b/src/inetfile/chttpget.cpp @@ -206,7 +206,7 @@ void ChttpGet::GetFile(char *URL,char *localfile) m_Aborted = true; return; } - unsigned int arg; + unsigned long arg; arg = 1; diff --git a/src/network/chat_api.cpp b/src/network/chat_api.cpp index 7a4aa70..fbad66c 100644 --- a/src/network/chat_api.cpp +++ b/src/network/chat_api.cpp @@ -102,7 +102,7 @@ int ConnectToChatServer(char *serveraddr,char *nickname,char *trackerid) short chat_port; char chat_server[50]; char *p; - unsigned int argp = 1; + unsigned long argp = 1; char signon_str[100]; //if(Socket_connected && ) return -2; diff --git a/src/platform/win.cpp b/src/platform/win.cpp index 528b7d1..41aebc9 100644 --- a/src/platform/win.cpp +++ b/src/platform/win.cpp @@ -9,6 +9,7 @@ #ifndef PLAT_UNIX #define WIN32_LEAN_AND_MEAN +#include #include #include "SDL.h" @@ -26,7 +27,7 @@ int platform_open_url(const char *url) SDL_strlcat(s_url, url, SDL_arraysize(s_url)); } - int rval = (int) ShellExecute(NULL, "open", s_url, NULL, NULL, SW_SHOW); + int rval = (int) ShellExecute(NULL, (LPCTSTR)"open", (LPCTSTR)s_url, NULL, NULL, SW_SHOW); if (rval < 32) { switch (rval) { -- 2.39.2