Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2015 01:41:04 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r377854 - head/games/xmoto/files
Message-ID:  <201501250141.t0P1f4Zf030748@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Sun Jan 25 01:41:04 2015
New Revision: 377854
URL: https://svnweb.freebsd.org/changeset/ports/377854
QAT: https://qat.redports.org/buildarchive/r377854/

Log:
  - Fix build with new libc++
  
  PR:		196652
  Submitted by:	dim

Added:
  head/games/xmoto/files/patch-src-GameInit.cpp   (contents, props changed)
  head/games/xmoto/files/patch-src-WWW.cpp   (contents, props changed)
Modified:
  head/games/xmoto/files/patch-src-include-xm__hashmap.h

Added: head/games/xmoto/files/patch-src-GameInit.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xmoto/files/patch-src-GameInit.cpp	Sun Jan 25 01:41:04 2015	(r377854)
@@ -0,0 +1,11 @@
+--- src/GameInit.cpp.orig	2015-01-10 18:22:36.000000000 +0100
++++ src/GameInit.cpp	2015-01-10 18:27:28.000000000 +0100
+@@ -248,7 +248,7 @@ void GameApp::run_load(int nNumArgs, cha
+   Logger::setActiv(XMSession::instance()->noLog() == false); /* apply log activ mode */
+ 
+   LogInfo(std::string("X-Moto " + XMBuild::getVersionString(true)).c_str());
+-  LogInfo("compiled at "__DATE__" "__TIME__);
++  LogInfo("compiled at " __DATE__ " " __TIME__);
+   if(SwapEndian::bigendien) {
+     LogInfo("Systeme is bigendien");
+   } else {

Added: head/games/xmoto/files/patch-src-WWW.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xmoto/files/patch-src-WWW.cpp	Sun Jan 25 01:41:04 2015	(r377854)
@@ -0,0 +1,47 @@
+--- src/WWW.cpp.orig	2015-01-10 18:11:22.000000000 +0100
++++ src/WWW.cpp	2015-01-10 18:21:32.000000000 +0100
+@@ -206,7 +206,7 @@ void FSWeb::downloadFile(const std::stri
+   std::string v_www_agent = WWW_AGENT;
+ 
+   /* open the file */
+-  if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == false) {
++  if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == NULL) {
+     throw Exception("error : unable to open output file " 
+         + v_local_file_tmp);
+   }
+@@ -320,7 +320,7 @@ void FSWeb::uploadReplay(const std::stri
+   LogInfo(std::string("Uploading replay " + p_replayFilename).c_str());
+ 
+   /* open the file */
+-  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
++  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
+     throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("UR"));
+   }
+       
+@@ -478,7 +478,7 @@ void FSWeb::sendVote(const std::string& 
+   LogInfo("Sending vote");
+ 
+   /* open the file */
+-  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
++  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
+     throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SV"));
+   }
+       
+@@ -562,7 +562,7 @@ void FSWeb::sendReport(const std::string
+   LogInfo("Sending report");
+ 
+   /* open the file */
+-  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
++  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
+     throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SR"));
+   }
+       
+@@ -677,7 +677,7 @@ void FSWeb::uploadDbSync(const std::stri
+   LogInfo(std::string("Uploading dbsync " + p_dbSyncFilename + " to " + p_url_to_transfert).c_str());
+ 
+   /* open the file */
+-  if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == false) {
++  if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == NULL) {
+     throw Exception("error : unable to open output file " + p_answerFile);
+   }
+       

Modified: head/games/xmoto/files/patch-src-include-xm__hashmap.h
==============================================================================
--- head/games/xmoto/files/patch-src-include-xm__hashmap.h	Sun Jan 25 01:32:35 2015	(r377853)
+++ head/games/xmoto/files/patch-src-include-xm__hashmap.h	Sun Jan 25 01:41:04 2015	(r377854)
@@ -1,11 +1,28 @@
---- src/include/xm_hashmap.h.orig	2011-10-12 00:18:17.000000000 +0400
-+++ src/include/xm_hashmap.h	2013-09-13 22:30:46.334969348 +0400
-@@ -14,7 +14,7 @@
+--- src/include/xm_hashmap.h.orig	2015-01-12 23:04:54.000000000 +0100
++++ src/include/xm_hashmap.h	2015-01-12 23:07:53.000000000 +0100
+@@ -13,13 +13,18 @@
+ #include <hash_map>
  namespace HashNamespace=std;
  #endif
- struct hashcmp_str {
+-struct hashcmp_str {
 -  bool operator()(const char* s1, const char* s2) {
-+  bool operator()(const char* s1, const char* s2) const {
-     if(s1 == NULL || s2 == NULL) {
-       return false;
+-    if(s1 == NULL || s2 == NULL) {
+-      return false;
++
++#ifdef _LIBCPP_VERSION
++namespace __gnu_cxx {
++  template<> struct hash<std::string>
++    : public unary_function<std::string, size_t>
++  {
++    size_t operator()(const std::string& s) const
++    {
++      return hash<const char*>()(s.c_str());
      }
+-    return strcmp(s1, s2) == 0;
+-  }
+-};
++  };
++}
++#endif // _LIBCPP_VERSION
+ 
+ #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501250141.t0P1f4Zf030748>