mail[Wesnoth-commits] r34141 - in /trunk: projectfiles/VC9/ src/server/ src/server/jwsmtp/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by kailoran on March 26, 2009 - 12:16:
Author: ilor
Date: Thu Mar 26 12:16:23 2009
New Revision: 34141

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34141&view=rev
Log:
make wesnothd compile and link on windows/msvc9, updated projectfile, change 
some msvc-specific #ifdef _WIN32 to #ifdef _MSC_VER

Modified:
    trunk/projectfiles/VC9/wesnothd.vcproj
    trunk/src/server/ban.cpp
    trunk/src/server/ban.hpp
    trunk/src/server/game.cpp
    trunk/src/server/jwsmtp/compat.h
    trunk/src/server/jwsmtp/mailer.cpp
    trunk/src/server/server.cpp

Modified: trunk/projectfiles/VC9/wesnothd.vcproj
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/projectfiles/VC9/wesnothd.vcproj?rev=34141&r1=34140&r2=34141&view=diff
==============================================================================
--- trunk/projectfiles/VC9/wesnothd.vcproj (original)
+++ trunk/projectfiles/VC9/wesnothd.vcproj Thu Mar 26 12:16:23 2009
@@ -118,7 +118,7 @@
                                EnableIntrinsicFunctions="true"
                                AdditionalIncludeDirectories="../../src"
                                
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP"
-                               RuntimeLibrary="0"
+                               RuntimeLibrary="2"
                                EnableFunctionLevelLinking="true"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
@@ -135,7 +135,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="libintl.lib SDL.lib 
SDL_image.lib SDL_ttf.lib SDL_mixer.lib SDL_net.lib fribidi.lib cairo.lib 
winmm.lib dxguid.lib ws2_32.lib zlib.lib libjpeg.lib libpng.lib libogg.lib 
libvorbisfile.lib libtiff.lib mikmod.lib native_midi.lib timidity.lib 
smpeg.lib SDLmain.lib pango-1.0.lib pangocairo-1.0.lib freetype.lib 
gobject-2.0.lib"
+                               AdditionalDependencies="libintl.lib SDL.lib 
SDL_net.lib winmm.lib dxguid.lib ws2_32.lib SDLmain.lib freetype.lib 
gobject-2.0.lib"
                                LinkIncremental="1"
                                GenerateDebugInformation="true"
                                SubSystem="2"
@@ -234,124 +234,28 @@
                                Name="Serialization"
                                >
                                <File
-                                       
RelativePath="..\..\src\serialization\binary_or_text.cpp"
-                                       >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
-                               </File>
-                               <File
                                        
RelativePath="..\..\src\serialization\binary_wml.cpp"
                                        >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
                                </File>
                                <File
                                        
RelativePath="..\..\src\serialization\parser.cpp"
                                        >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
                                </File>
                                <File
                                        
RelativePath="..\..\src\serialization\preprocessor.cpp"
                                        >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
-                               </File>
-                               <File
-                                       
RelativePath="..\..\src\serialization\string_utils.cpp"
-                                       >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       
RelativePath="..\..\src\serialization\preprocessor.hpp"
+                                       >
                                </File>
                                <File
                                        
RelativePath="..\..\src\serialization\tokenizer.cpp"
                                        >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release|Win32"
-                                               >
-                                               <Tool
-                                                       
Name="VCCLCompilerTool"
-                                                       
ObjectFile="$(IntDir)\Serialization\"
-                                               />
-                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       
RelativePath="..\..\src\serialization\tokenizer.hpp"
+                                       >
                                </File>
                        </Filter>
                        <Filter
@@ -484,6 +388,10 @@
                                                        
ObjectFile="$(IntDir)\Server\"
                                                />
                                        </FileConfiguration>
+                               </File>
+                               <File
+                                       
RelativePath="..\..\src\server\sample_user_handler.cpp"
+                                       >
                                </File>
                                <File
                                        
RelativePath="..\..\src\server\server.cpp"
@@ -687,6 +595,10 @@
                                Name="Serialization"
                                >
                                <File
+                                       
RelativePath="..\..\src\serialization\binary_or_text.cpp"
+                                       >
+                               </File>
+                               <File
                                        
RelativePath="..\..\src\serialization\binary_or_text.hpp"
                                        >
                                </File>
@@ -699,7 +611,7 @@
                                        >
                                </File>
                                <File
-                                       
RelativePath="..\..\src\serialization\preprocessor.hpp"
+                                       
RelativePath="..\..\src\serialization\string_utils.cpp"
                                        >
                                </File>
                                <File

Modified: trunk/src/server/ban.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/ban.cpp?rev=34141&r1=34140&r2=34141&view=diff
==============================================================================
--- trunk/src/server/ban.cpp (original)
+++ trunk/src/server/ban.cpp Thu Mar 26 12:16:23 2009
@@ -276,7 +276,7 @@
                try {
                        ip_mask pair = parse_ip(ip);
                        return (ip_ & mask_) == (pair.first & mask_);
-               } catch (banned::error& e) {
+               } catch (banned::error&) {
                        return false;
                }
        }

Modified: trunk/src/server/ban.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/ban.hpp?rev=34141&r1=34140&r2=34141&view=diff
==============================================================================
--- trunk/src/server/ban.hpp (original)
+++ trunk/src/server/ban.hpp Thu Mar 26 12:16:23 2009
@@ -39,7 +39,7 @@
                bool operator()(const banned_ptr& a, const banned_ptr& b) 
const;
        };
 
-       class subnet_compare_setter;
+       struct subnet_compare_setter;
        struct banned_compare_subnet {
                bool operator()(const banned_ptr& a, const banned_ptr& b) 
const;
                private:
@@ -48,7 +48,7 @@
                bool less_with_subnet(const banned_ptr& a, const banned_ptr& 
b) const;
                typedef bool (banned_compare_subnet::*compare_fn)(const 
banned_ptr& a, const banned_ptr& b) const;
                static compare_fn active_;
-               friend class subnet_compare_setter;
+               friend struct subnet_compare_setter;
        };
 
        struct subnet_compare_setter {

Modified: trunk/src/server/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/game.cpp?rev=34141&r1=34140&r2=34141&view=diff
==============================================================================
--- trunk/src/server/game.cpp (original)
+++ trunk/src/server/game.cpp Thu Mar 26 12:16:23 2009
@@ -19,6 +19,12 @@
 #include "../map.hpp" // gamemap::MAX_PLAYERS
 
 #include "game.hpp"
+
+#ifndef __func__
+ #ifdef __FUNCTION__
+  #define __func__ __FUNCTION__
+ #endif
+#endif
 
 
 #define ERR_GAME LOG_STREAM(err, mp_server)

Modified: trunk/src/server/jwsmtp/compat.h
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/jwsmtp/compat.h?rev=34141&r1=34140&r2=34141&view=diff
==============================================================================
--- trunk/src/server/jwsmtp/compat.h (original)
+++ trunk/src/server/jwsmtp/compat.h Thu Mar 26 12:16:23 2009
@@ -26,9 +26,11 @@
 #define __COMPAT_H__
 
 #ifdef _WIN32
-#pragma warning( disable : 4786 )
+# ifdef _MSC_VER
+#  pragma warning( disable : 4786 )
 // tell the linker which libraries to find functions in
-#pragma comment(lib, "ws2_32.lib")
+#  pragma comment(lib, "ws2_32.lib")
+# endif
 #include <winsock2.h>
 #else // assume some unix variant
 #include <sys/socket.h>

Modified: trunk/src/server/jwsmtp/mailer.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/jwsmtp/mailer.cpp?rev=34141&r1=34140&r2=34141&view=diff
==============================================================================
--- trunk/src/server/jwsmtp/mailer.cpp (original)
+++ trunk/src/server/jwsmtp/mailer.cpp Thu Mar 26 12:16:23 2009
@@ -21,7 +21,7 @@
 //   http://johnwiggins.net
 //   smtplib@xxxxxxxxxxxxxxx
 //
-#ifdef _WIN32
+#ifdef _MSC_VER
 // std::vector<std::string> This gives this warning in VC..
 // bloody annoying, there is a way round it according to MS.
 // The debugger basically cannot browse anything with a name

Modified: trunk/src/server/server.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/server.cpp?rev=34141&r1=34140&r2=34141&view=diff
==============================================================================
--- trunk/src/server/server.cpp (original)
+++ trunk/src/server/server.cpp Thu Mar 26 12:16:23 2009
@@ -512,8 +512,13 @@
 
 void server::load_config() {
 #ifndef FIFODIR
-# warning "No FIFODIR set"
-# define FIFODIR "/var/run/wesnothd"
+# ifdef _MSC_VER
+#  pragma message ("No FIFODIR set")
+#  define FIFODIR "d:/"
+# else
+#  warning "No FIFODIR set"
+#  define FIFODIR "/var/run/wesnothd"
+# endif
 #endif
        const std::string fifo_path = (cfg_["fifo_path"].empty() ? 
std::string(FIFODIR) + "/socket" : std::string(cfg_["fifo_path"]));
        input_.reset();




Related Messages


Powered by MHonArc, Updated Thu Mar 26 12:20:43 2009