Author: tqh Date: 2010-07-17 12:33:24 +0200 (Sat, 17 Jul 2010) New Revision: 37550 Changeset: http://dev.haiku-os.org/changeset/37550 Ticket: http://dev.haiku-os.org/ticket/5892 Modified: haiku/trunk/headers/posix/fenv.h haiku/trunk/headers/private/kernel/util/MultiHashTable.h haiku/trunk/headers/private/shared/HashMap.h haiku/trunk/src/preferences/cpufrequency/PreferencesWindow.h Log: Patch by kaliber to fix some compiling errors with clang. Removed the #include <iostream> part, but otherwise not modified. See http://clang.llvm.org/compatibility.html#c++ why it is needed. Note that HashMap.h Key and Value are typenames as well. Afaict this is correctly done, builds and runs on gcc4. This fixes #5892. Modified: haiku/trunk/headers/posix/fenv.h =================================================================== --- haiku/trunk/headers/posix/fenv.h 2010-07-17 02:04:32 UTC (rev 37549) +++ haiku/trunk/headers/posix/fenv.h 2010-07-17 10:33:24 UTC (rev 37550) @@ -1,7 +1,7 @@ #ifndef _FENV_H #define _FENV_H -#if defined(_X86_) +#if defined(__INTEL__) # include <arch/x86/fenv.h> #elif defined(_x86_64_) # include <arch/x86_64/fenv.h> Modified: haiku/trunk/headers/private/kernel/util/MultiHashTable.h =================================================================== --- haiku/trunk/headers/private/kernel/util/MultiHashTable.h 2010-07-17 02:04:32 UTC (rev 37549) +++ haiku/trunk/headers/private/kernel/util/MultiHashTable.h 2010-07-17 10:33:24 UTC (rev 37550) @@ -143,10 +143,10 @@ previous = HashTable::_Link(previous)); if (previous) { - _Link(value) = _Link(previous); - _Link(previous) = value; + HashTable::_Link(value) = HashTable::_Link(previous); + HashTable::_Link(previous) = value; } else { - _Link(value) = table[index]; + HashTable::_Link(value) = table[index]; table[index] = value; } } @@ -165,7 +165,7 @@ for (size_t i = 0; i < HashTable::fTableSize; i++) { ValueType *bucket = HashTable::fTable[i]; while (bucket) { - ValueType *next = _Link(bucket); + ValueType *next = HashTable::_Link(bucket); _Insert(newTable, newSize, bucket); bucket = next; } Modified: haiku/trunk/headers/private/shared/HashMap.h =================================================================== --- haiku/trunk/headers/private/shared/HashMap.h 2010-07-17 02:04:32 UTC (rev 37549) +++ haiku/trunk/headers/private/shared/HashMap.h 2010-07-17 10:33:24 UTC (rev 37550) @@ -458,7 +458,7 @@ // _FindElement template<typename Key, typename Value> -struct HashMap<Key, Value>::Element * +typename HashMap<Key, Value>::Element * HashMap<Key, Value>::_FindElement(const Key& key) const { Element* element = fTable.FindFirst(key.GetHashCode()); Modified: haiku/trunk/src/preferences/cpufrequency/PreferencesWindow.h =================================================================== --- haiku/trunk/src/preferences/cpufrequency/PreferencesWindow.h 2010-07-17 02:04:32 UTC (rev 37549) +++ haiku/trunk/src/preferences/cpufrequency/PreferencesWindow.h 2010-07-17 10:33:24 UTC (rev 37550) @@ -366,7 +366,7 @@ template<typename Preferences> PreferencesWindow<Preferences>::~PreferencesWindow() { - SetWindowPosition(Frame().LeftTop()); + PreferencesStorage<Preferences>::SetWindowPosition(Frame().LeftTop()); }