View | Details | Raw Unified | Return to bug 196652 | Differences between
and this patch

Collapse All | Expand All

(-)games/xmoto/files/patch-src-GameInit.cpp (+11 lines)
Line 0 Link Here
1
--- src/GameInit.cpp.orig	2015-01-10 18:22:36.000000000 +0100
2
+++ src/GameInit.cpp	2015-01-10 18:27:28.000000000 +0100
3
@@ -248,7 +248,7 @@ void GameApp::run_load(int nNumArgs, cha
4
   Logger::setActiv(XMSession::instance()->noLog() == false); /* apply log activ mode */
5
 
6
   LogInfo(std::string("X-Moto " + XMBuild::getVersionString(true)).c_str());
7
-  LogInfo("compiled at "__DATE__" "__TIME__);
8
+  LogInfo("compiled at " __DATE__ " " __TIME__);
9
   if(SwapEndian::bigendien) {
10
     LogInfo("Systeme is bigendien");
11
   } else {
(-)games/xmoto/files/patch-src-WWW.cpp (+47 lines)
Line 0 Link Here
1
--- src/WWW.cpp.orig	2015-01-10 18:11:22.000000000 +0100
2
+++ src/WWW.cpp	2015-01-10 18:21:32.000000000 +0100
3
@@ -206,7 +206,7 @@ void FSWeb::downloadFile(const std::stri
4
   std::string v_www_agent = WWW_AGENT;
5
 
6
   /* open the file */
7
-  if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == false) {
8
+  if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == NULL) {
9
     throw Exception("error : unable to open output file " 
10
         + v_local_file_tmp);
11
   }
12
@@ -320,7 +320,7 @@ void FSWeb::uploadReplay(const std::stri
13
   LogInfo(std::string("Uploading replay " + p_replayFilename).c_str());
14
 
15
   /* open the file */
16
-  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
17
+  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
18
     throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("UR"));
19
   }
20
       
21
@@ -478,7 +478,7 @@ void FSWeb::sendVote(const std::string& 
22
   LogInfo("Sending vote");
23
 
24
   /* open the file */
25
-  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
26
+  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
27
     throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SV"));
28
   }
29
       
30
@@ -562,7 +562,7 @@ void FSWeb::sendReport(const std::string
31
   LogInfo("Sending report");
32
 
33
   /* open the file */
34
-  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
35
+  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
36
     throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SR"));
37
   }
38
       
39
@@ -677,7 +677,7 @@ void FSWeb::uploadDbSync(const std::stri
40
   LogInfo(std::string("Uploading dbsync " + p_dbSyncFilename + " to " + p_url_to_transfert).c_str());
41
 
42
   /* open the file */
43
-  if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == false) {
44
+  if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == NULL) {
45
     throw Exception("error : unable to open output file " + p_answerFile);
46
   }
47
       
(-)games/xmoto/files/patch-src-include-xm__hashmap.h (-7 / +24 lines)
Lines 1-11 Link Here
1
--- src/include/xm_hashmap.h.orig	2011-10-12 00:18:17.000000000 +0400
1
--- src/include/xm_hashmap.h.orig	2015-01-12 23:04:54.000000000 +0100
2
+++ src/include/xm_hashmap.h	2013-09-13 22:30:46.334969348 +0400
2
+++ src/include/xm_hashmap.h	2015-01-12 23:07:53.000000000 +0100
3
@@ -14,7 +14,7 @@
3
@@ -13,13 +13,18 @@
4
 #include <hash_map>
4
 namespace HashNamespace=std;
5
 namespace HashNamespace=std;
5
 #endif
6
 #endif
6
 struct hashcmp_str {
7
-struct hashcmp_str {
7
-  bool operator()(const char* s1, const char* s2) {
8
-  bool operator()(const char* s1, const char* s2) {
8
+  bool operator()(const char* s1, const char* s2) const {
9
-    if(s1 == NULL || s2 == NULL) {
9
     if(s1 == NULL || s2 == NULL) {
10
-      return false;
10
       return false;
11
+
12
+#ifdef _LIBCPP_VERSION
13
+namespace __gnu_cxx {
14
+  template<> struct hash<std::string>
15
+    : public unary_function<std::string, size_t>
16
+  {
17
+    size_t operator()(const std::string& s) const
18
+    {
19
+      return hash<const char*>()(s.c_str());
11
     }
20
     }
21
-    return strcmp(s1, s2) == 0;
22
-  }
23
-};
24
+  };
25
+}
26
+#endif // _LIBCPP_VERSION
27
 
28
 #endif

Return to bug 196652