Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Michael Sterrett (mr_bones_)" <mr_bones_@g.o>
Subject: gentoo-x86 commit in games-puzzle/krystaldrop/files: krystaldrop-0.7.2-gcc43.patch
Date: Thu, 31 Jul 2008 04:21:56 +0000
mr_bones_    08/07/31 04:21:56

  Added:                krystaldrop-0.7.2-gcc43.patch
  Log:
  patch for building with gcc-4.3 submitted by Jabari R. Roberts via bug #233447
  (Portage version: 2.1.4.4)

Revision  Changes    Path
1.1                  games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc43.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc43.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc43.patch?rev=1.1&content-type=text/plain

Index: krystaldrop-0.7.2-gcc43.patch
===================================================================
--- krystaldrop/Sources/KDpp/Resources/ArchiveReader.h.old	2008-07-30 22:05:18.000000000 -0500
+++ krystaldrop/Sources/KDpp/Resources/ArchiveReader.h	2008-07-30 22:27:20.000000000 -0500
@@ -2,7 +2,26 @@
 #define ArchiveReader_H
 
 #include <map>
-#include <string>
+#include <cstring>
+#include <locale>
+
+/* 
+ * structs needed for std::transform() 
+ * See: http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/howto.html#7 
+ */ 
+struct ToUpper { 
+	ToUpper(std::locale const& l) : loc(l) {;} 
+	char operator() (char c) const  { return std::toupper(c,loc); } 
+private: 
+	std::locale const& loc; 
+}; 
+	 
+struct ToLower { 
+	ToLower(std::locale const& l) : loc(l) {;} 
+	char operator() (char c) const  { return std::tolower(c,loc); } 
+private: 
+	std::locale const& loc; 
+}; 
 
 /** \c KD_ArchiveReader is a generic abstract class which reads a specific kind of archive
     (`.zip' for instance)
--- krystaldrop/Sources/KDpp/Resources/ArchiveManager.cpp.old	2008-07-30 20:53:19.000000000 -0500
+++ krystaldrop/Sources/KDpp/Resources/ArchiveManager.cpp	2008-07-30 22:35:54.000000000 -0500
@@ -1,10 +1,11 @@
-#include <assert.h>
+#include <cassert>
+#include <algorithm>
 
 #include "ArchiveManager.h"
 #include "../Tools/Logfile.h"
 
 #ifndef _WIN32
-#include <ctype.h>
+#include <cctype>
 #endif
 
 std::map<std::string,KD_ArchiveReader*> KD_ArchiveManager::opened_archives;
@@ -25,7 +26,6 @@
   opened_archives.clear();
 }
 
-
 void KD_ArchiveManager::RegisterArchiveFormat (std::string suffix, T_ArchiveReaderFactory reader_factory)
 {
   NormalizeSuffix (suffix);
@@ -36,9 +36,10 @@
 
 
 void KD_ArchiveManager::NormalizeSuffix (std::string& suffix)
-{
+{  
+  ToLower __tolower(std::locale::classic());
   // stores the suffix lower-case
-  transform (suffix.begin(), suffix.end(), suffix.begin(), tolower);
+  transform (suffix.begin(), suffix.end(), suffix.begin(), __tolower);
 
    // add the dot character `.' if it is missing
   if (suffix[0]!= '.') suffix= '.'+ suffix;
--- krystaldrop/Sources/KDpp/Tools/FilePath.cpp.old	2008-07-30 20:55:13.000000000 -0500
+++ krystaldrop/Sources/KDpp/Tools/FilePath.cpp	2008-07-30 22:37:05.000000000 -0500
@@ -1,12 +1,12 @@
 #include "FilePath.h"
 
-#include <stdio.h>
+#include <cstdio>
+#include <algorithm>
 
 #ifndef _WIN32
-#include <ctype.h>
+#include <cctype>
 #endif
 
-
 KD_FilePath::KD_FilePath() : fileName("") , filePath(""), archiveName(""), archiveSuffix("")
 {
 }
@@ -165,8 +165,9 @@
 	// (*not* the first one found scanning from left to right)
 
 	// the search is case-insensitive -> lower-casificator in action
+	ToLower __tolower(std::locale::classic());
 	string copy_directory = directory;
-	transform (copy_directory.begin(), copy_directory.end(), copy_directory.begin(), tolower);
+	transform (copy_directory.begin(), copy_directory.end(), copy_directory.begin(), __tolower);
 
 	map<string,T_ArchiveReaderFactory>::iterator suffix_iter=
 		KD_ArchiveManager::known_suffixes.begin();
@@ -271,6 +272,7 @@
 
 string KD_FilePath::GetFileExtension() const
 {
+	ToLower __tolower(std::locale::classic());
 	size_t pos = fileName.rfind('.');
 	if (pos == fileName.npos)
 		return "";
@@ -280,7 +282,7 @@
 	for (unsigned int i=0; i<ext.size(); i++)
 		ext[i] = tolower(ext[i]);
 */
-	transform (ext.begin(), ext.end(), ext.begin(), tolower);
+	transform (ext.begin(), ext.end(), ext.begin(), __tolower);
 	return ext;
 }
 





Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in sys-auth/pambase: pambase-20080730.ebuild ChangeLog
Next by thread:
portage r11291 - main/trunk/cnf
Previous by date:
gentoo-x86 commit in sys-auth/pambase: pambase-20080730.ebuild ChangeLog
Next by date:
gentoo-x86 commit in games-puzzle/krystaldrop: krystaldrop-0.7.2.ebuild ChangeLog


Updated May 10, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.