- updated win32 vc++ files to compile with new ftp server / client

This commit is contained in:
Mark Vejvoda 2010-12-29 16:28:46 +00:00
parent d7520dc40b
commit 89a6ae3fe4
6 changed files with 60 additions and 10 deletions

View File

@ -40,7 +40,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;&quot;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude&quot;;../../source/win32_deps/lpng141;&quot;../../source/win32_deps/jpeg-8a&quot;;&quot;../../source/win32_deps/SDL-1.2.x/include&quot;;../../source/shared_lib/include/platform/sdl;&quot;../../source/win32_deps/openal-soft-1.12.854/include&quot;;../../source/shared_lib/include/sound/openal;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/streflop/libm_flt32_source;../../source/shared_lib/include/platform/common;&quot;../../source/win32_deps/curl-7.20.1/include&quot;;../../source/shared_lib/include/map;../../source/shared_lib/include/platform/miniupnpc;../../source/win32_deps/libircclient/include" AdditionalIncludeDirectories="../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;&quot;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude&quot;;../../source/win32_deps/lpng141;&quot;../../source/win32_deps/jpeg-8a&quot;;&quot;../../source/win32_deps/SDL-1.2.x/include&quot;;../../source/shared_lib/include/platform/sdl;&quot;../../source/win32_deps/openal-soft-1.12.854/include&quot;;../../source/shared_lib/include/sound/openal;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/streflop/libm_flt32_source;../../source/shared_lib/include/platform/common;&quot;../../source/win32_deps/curl-7.20.1/include&quot;;../../source/shared_lib/include/map;../../source/shared_lib/include/platform/miniupnpc;../../source/shared_lib/include/libircclient/include;../../source/shared_lib/include/feathery_ftp"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB"
StringPooling="true" StringPooling="true"
MinimalRebuild="true" MinimalRebuild="true"
@ -120,7 +120,7 @@
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
WholeProgramOptimization="false" WholeProgramOptimization="false"
AdditionalIncludeDirectories="../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;&quot;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude&quot;;../../source/win32_deps/lpng141;&quot;../../source/win32_deps/jpeg-8a&quot;;&quot;../../source/win32_deps/SDL-1.2.x/include&quot;;../../source/shared_lib/include/platform/sdl;&quot;../../source/win32_deps/openal-soft-1.12.854/include&quot;;../../source/shared_lib/include/sound/openal;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/streflop/libm_flt32_source;../../source/shared_lib/include/platform/common;&quot;../../source/win32_deps/curl-7.20.1/include&quot;;../../source/shared_lib/include/map;../../source/shared_lib/include/platform/miniupnpc;../../source/win32_deps/libircclient/include" AdditionalIncludeDirectories="../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;&quot;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude&quot;;../../source/win32_deps/lpng141;&quot;../../source/win32_deps/jpeg-8a&quot;;&quot;../../source/win32_deps/SDL-1.2.x/include&quot;;../../source/shared_lib/include/platform/sdl;&quot;../../source/win32_deps/openal-soft-1.12.854/include&quot;;../../source/shared_lib/include/sound/openal;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/streflop/libm_flt32_source;../../source/shared_lib/include/platform/common;&quot;../../source/win32_deps/curl-7.20.1/include&quot;;../../source/shared_lib/include/map;../../source/shared_lib/include/platform/miniupnpc;../../source/shared_lib/include/libircclient/include;../../source/shared_lib/include/feathery_ftp;$(NOINHERIT)"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB"
StringPooling="true" StringPooling="true"
ExceptionHandling="2" ExceptionHandling="2"
@ -248,6 +248,42 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
> >
<File
RelativePath="..\..\source\shared_lib\sources\feathery_ftp\ftpAccount.c"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\feathery_ftp\ftpCmds.c"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\feathery_ftp\ftpLib.c"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\feathery_ftp\ftpMessages.c"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\feathery_ftp\ftpRuntime.c"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\feathery_ftp\ftpServer.c"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\feathery_ftp\ftpSession.c"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\feathery_ftp\ftpTargetPosix.c"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\feathery_ftp\ftpTargetWin32.c"
>
</File>
<File <File
RelativePath="..\..\source\shared_lib\sources\platform\sdl\gl_wrap.cpp" RelativePath="..\..\source\shared_lib\sources\platform\sdl\gl_wrap.cpp"
> >
@ -256,6 +292,10 @@
RelativePath="..\..\source\win32_deps\src\glprocs.c" RelativePath="..\..\source\win32_deps\src\glprocs.c"
> >
</File> </File>
<File
RelativePath="..\..\source\shared_lib\sources\libircclient\src\libircclient.c"
>
</File>
<File <File
RelativePath="..\..\source\shared_lib\sources\map\map_preview.cpp" RelativePath="..\..\source\shared_lib\sources\map\map_preview.cpp"
> >
@ -499,6 +539,14 @@
RelativePath="..\..\source\shared_lib\sources\platform\miniupnpc\igd_desc_parse.c" RelativePath="..\..\source\shared_lib\sources\platform\miniupnpc\igd_desc_parse.c"
> >
</File> </File>
<File
RelativePath="..\..\source\shared_lib\sources\platform\posix\miniftpclient.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\platform\posix\miniftpserver.cpp"
>
</File>
<File <File
RelativePath="..\..\source\shared_lib\sources\platform\miniupnpc\minisoap.c" RelativePath="..\..\source\shared_lib\sources\platform\miniupnpc\minisoap.c"
> >

View File

@ -367,7 +367,7 @@ void UnitUpdater::updateAttack(Unit *unit) {
else { else {
//compute target pos //compute target pos
Vec2i pos; Vec2i pos;
Command *nextCommand; //Command *nextCommand;
if(command->getUnit()!=NULL) { if(command->getUnit()!=NULL) {
pos= command->getUnit()->getCenteredPos(); pos= command->getUnit()->getCenteredPos();
} }

View File

@ -263,6 +263,7 @@ LOCAL int ftpCmdAbor(int sessionId, const char* args, int len)
#define MLSD 8 #define MLSD 8
LOCAL int sendListing(socket_t dataSocket, int sessionId, const char* path, int format) LOCAL int sendListing(socket_t dataSocket, int sessionId, const char* path, int format)
{ {
int haveAnySuccessfulFiles = 0;
void *dir; void *dir;
const char monName[12][4] = { const char monName[12][4] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jan", "Feb", "Mar", "Apr", "May", "Jun",
@ -285,10 +286,10 @@ LOCAL int sendListing(socket_t dataSocket, int sessionId, const char* path, int
printf("about to read dir contents [%s]\n", path); printf("about to read dir contents [%s]\n", path);
#endif #endif
int haveAnySuccessfulFiles = 0; haveAnySuccessfulFiles = 0;
while((dirEntry = ftpReadDir(dir)) != NULL) while((dirEntry = ftpReadDir(dir)) != NULL)
{ {
char * realPath = ftpGetRealPath(sessionId, dirEntry, FALSE); const char * realPath = ftpGetRealPath(sessionId, dirEntry, FALSE);
int statResult = ftpStat(realPath, &fileInfo); int statResult = ftpStat(realPath, &fileInfo);
#if DBG_LOG #if DBG_LOG
printf("ftpGetRealPath() returned [%s] stat() = %d\n", realPath, statResult); printf("ftpGetRealPath() returned [%s] stat() = %d\n", realPath, statResult);
@ -488,12 +489,13 @@ LOCAL int ftpCmdRetr(int sessionId, const char* args, int len)
const char* realPath = ftpGetRealPath(sessionId, args, TRUE); const char* realPath = ftpGetRealPath(sessionId, args, TRUE);
socket_t s; socket_t s;
void *fp; void *fp;
int statResult = 0;
#if DBG_LOG #if DBG_LOG
printf("ftpCmdRetr args [%s] realPath [%s]\n", args, realPath); printf("ftpCmdRetr args [%s] realPath [%s]\n", args, realPath);
#endif #endif
int statResult = ftpStat(realPath, &fileInfo); statResult = ftpStat(realPath, &fileInfo);
#if DBG_LOG #if DBG_LOG
printf("stat() = %d fileInfo.type = %d\n", statResult,fileInfo.type); printf("stat() = %d fileInfo.type = %d\n", statResult,fileInfo.type);
#endif #endif

View File

@ -322,6 +322,7 @@ socket_t ftpCreateServerSocket(void)
SOCKET theServer; SOCKET theServer;
struct sockaddr_in serverinfo; struct sockaddr_in serverinfo;
unsigned len; unsigned len;
int val = 1;
theServer = socket(AF_INET, SOCK_STREAM, 0); theServer = socket(AF_INET, SOCK_STREAM, 0);
if(theServer < 0) if(theServer < 0)
@ -331,8 +332,7 @@ socket_t ftpCreateServerSocket(void)
serverinfo.sin_addr.s_addr = INADDR_ANY; serverinfo.sin_addr.s_addr = INADDR_ANY;
serverinfo.sin_port = htons(21); serverinfo.sin_port = htons(21);
len = sizeof(serverinfo); len = sizeof(serverinfo);
int val = 1;
#ifndef WIN32 #ifndef WIN32
setsockopt(theServer, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); setsockopt(theServer, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
#else #else

View File

@ -283,7 +283,7 @@ void LogFileThread::saveToDisk(bool forceSaveAll,bool logListAlreadyLocked) {
// logCount = min(logCount,(std::size_t)2000000); // logCount = min(logCount,(std::size_t)2000000);
//} //}
for(int i = 0; i < logCount; ++i) { for(unsigned int i = 0; i < logCount; ++i) {
LogFileEntry &entry = tempLogList[i]; LogFileEntry &entry = tempLogList[i];
SystemFlags::logDebugEntry(entry.type, entry.entry, entry.entryDateTime); SystemFlags::logDebugEntry(entry.type, entry.entry, entry.entryDateTime);
} }

View File

@ -397,7 +397,7 @@ std::vector<string> IRCThread::GetIRCConnectedNickList(string target, bool waitF
bool IRCThread::isConnected() { bool IRCThread::isConnected() {
bool ret = false; bool ret = false;
if(ircSession != NULL) { if(ircSession != NULL) {
ret = irc_is_connected(ircSession); ret = (irc_is_connected(ircSession) != 0);
} }
return ret; return ret;