[haiku-commits] haiku: hrev46551 - headers/private/shared src/kits/storage/mime headers/build src/add-ons/kernel/file_systems/bfs src/kits/package

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 17 Dec 2013 20:00:26 +0100 (CET)

hrev46551 adds 5 changesets to branch 'master'
old head: 70b978fd9fc574e72a9f91f58beb36c521ec57c4
new head: 77ac2d8d8d7a7071392c0c70cba0e7a008ee0b29
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=77ac2d8+%5E70b978f

----------------------------------------------------------------------------

a7d796e: Only declare strl{cpy,cat} if they aren't defines.
  
  On some system (e.g. OS X Mavericks), those are defines to compiler
  built-ins, thus trying to declare them will fail.

724947e: HashSet.h: Replace whatever that was with proper C++

17fe3f8: BPlusTree.h: Remove invalid forward declaration.
  
  That forward declaration was actually a backward declaration, as
  system_dependencies.h already included Stack.

6a2d12c: PackageInfoParser.cpp: Add missing include for strtoll.

77ac2d8: SnifferRules.cpp: Make the arguments for operator< const.
  
  It is used on const versions of sniffer_rule and thus it needs to be
  declared with const.

                                     [ Jonathan Schleifer <js@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

5 files changed, 9 insertions(+), 6 deletions(-)
headers/build/BeOSBuildCompatibility.h          | 4 ++++
headers/private/shared/HashSet.h                | 6 +++---
src/add-ons/kernel/file_systems/bfs/BPlusTree.h | 2 --
src/kits/package/PackageInfoParser.cpp          | 1 +
src/kits/storage/mime/SnifferRules.cpp          | 2 +-

############################################################################

Commit:      a7d796e232a0a41377c57d435a8f639db0421ef1
URL:         http://cgit.haiku-os.org/haiku/commit/?id=a7d796e
Author:      Jonathan Schleifer <js@xxxxxxxxxxx>
Date:        Tue Dec 17 16:48:03 2013 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Tue Dec 17 18:58:51 2013 UTC

Only declare strl{cpy,cat} if they aren't defines.

On some system (e.g. OS X Mavericks), those are defines to compiler
built-ins, thus trying to declare them will fail.

----------------------------------------------------------------------------

diff --git a/headers/build/BeOSBuildCompatibility.h 
b/headers/build/BeOSBuildCompatibility.h
index 875897c..95c00d0 100644
--- a/headers/build/BeOSBuildCompatibility.h
+++ b/headers/build/BeOSBuildCompatibility.h
@@ -44,8 +44,12 @@ extern "C" {
 #endif
 
 // Is kernel-only under Linux.
+#ifndef strlcpy
 extern size_t   strlcpy(char* dest, const char* source, size_t length);
+#endif
+#ifndef strlcat
 extern size_t  strlcat(char* dest, const char* source, size_t length);
+#endif
 
 #if defined(HAIKU_HOST_PLATFORM_FREEBSD) || defined(HAIKU_HOST_PLATFORM_DARWIN)
 extern size_t  strnlen(const char* string, size_t length);

############################################################################

Commit:      724947ebca175a0f9078b93f9e3e0f1a58367807
URL:         http://cgit.haiku-os.org/haiku/commit/?id=724947e
Author:      Jonathan Schleifer <js@xxxxxxxxxxx>
Date:        Tue Dec 17 17:15:54 2013 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Tue Dec 17 18:58:52 2013 UTC

HashSet.h: Replace whatever that was with proper C++

----------------------------------------------------------------------------

diff --git a/headers/private/shared/HashSet.h b/headers/private/shared/HashSet.h
index ee7be71..9a102d1 100644
--- a/headers/private/shared/HashSet.h
+++ b/headers/private/shared/HashSet.h
@@ -179,7 +179,7 @@ protected:
 template<typename Key>
 class SynchronizedHashSet : public BLocker {
 public:
-       typedef struct HashSet<Key>::Iterator Iterator;
+       typedef typename HashSet<Key>::Iterator Iterator;
 
        SynchronizedHashSet() : BLocker("synchronized hash set")        {}
        ~SynchronizedHashSet()  { Lock(); }
@@ -313,7 +313,7 @@ HashSet<Key>::Size() const
 
 // GetIterator
 template<typename Key>
-struct HashSet<Key>::Iterator
+typename HashSet<Key>::Iterator
 HashSet<Key>::GetIterator()
 {
        return Iterator(this);
@@ -321,7 +321,7 @@ HashSet<Key>::GetIterator()
 
 // _FindElement
 template<typename Key>
-struct HashSet<Key>::Element *
+HashSetElement<Key> *
 HashSet<Key>::_FindElement(const Key& key) const
 {
        Element* element = fTable.FindFirst(key.GetHashCode());

############################################################################

Commit:      17fe3f8106245b7c379275cd2c443bc065ffc5e6
URL:         http://cgit.haiku-os.org/haiku/commit/?id=17fe3f8
Author:      Jonathan Schleifer <js@xxxxxxxxxxx>
Date:        Tue Dec 17 17:17:32 2013 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Tue Dec 17 18:58:54 2013 UTC

BPlusTree.h: Remove invalid forward declaration.

That forward declaration was actually a backward declaration, as
system_dependencies.h already included Stack.

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/file_systems/bfs/BPlusTree.h 
b/src/add-ons/kernel/file_systems/bfs/BPlusTree.h
index cfc4aac..95bc7bb 100644
--- a/src/add-ons/kernel/file_systems/bfs/BPlusTree.h
+++ b/src/add-ons/kernel/file_systems/bfs/BPlusTree.h
@@ -152,8 +152,6 @@ class TreeIterator;
 
 
 #if !_BOOT_MODE
-template<class T> class Stack;
-
 // needed for searching (utilizing a stack)
 struct node_and_key {
        off_t   nodeOffset;

############################################################################

Commit:      6a2d12cbee4e6a61fc51970bb9956407a0b9a2a3
URL:         http://cgit.haiku-os.org/haiku/commit/?id=6a2d12c
Author:      Jonathan Schleifer <js@xxxxxxxxxxx>
Date:        Tue Dec 17 17:20:20 2013 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Tue Dec 17 18:58:55 2013 UTC

PackageInfoParser.cpp: Add missing include for strtoll.

----------------------------------------------------------------------------

diff --git a/src/kits/package/PackageInfoParser.cpp 
b/src/kits/package/PackageInfoParser.cpp
index 15076e0..f684815 100644
--- a/src/kits/package/PackageInfoParser.cpp
+++ b/src/kits/package/PackageInfoParser.cpp
@@ -8,6 +8,7 @@
 
 #include <ctype.h>
 #include <stdint.h>
+#include <stdlib.h>
 
 #include <algorithm>
 #include <string>

############################################################################

Revision:    hrev46551
Commit:      77ac2d8d8d7a7071392c0c70cba0e7a008ee0b29
URL:         http://cgit.haiku-os.org/haiku/commit/?id=77ac2d8
Author:      Jonathan Schleifer <js@xxxxxxxxxxx>
Date:        Tue Dec 17 17:23:26 2013 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Tue Dec 17 18:58:57 2013 UTC

SnifferRules.cpp: Make the arguments for operator< const.

It is used on const versions of sniffer_rule and thus it needs to be
declared with const.

----------------------------------------------------------------------------

diff --git a/src/kits/storage/mime/SnifferRules.cpp 
b/src/kits/storage/mime/SnifferRules.cpp
index bee94c6..12efe32 100644
--- a/src/kits/storage/mime/SnifferRules.cpp
+++ b/src/kits/storage/mime/SnifferRules.cpp
@@ -87,7 +87,7 @@ SnifferRules::sniffer_rule::~sniffer_rule()
        rules for supertypes *after* sniffer rules for subtypes
        of said supertype when both rules have identical priorities).
 */
-bool operator<(SnifferRules::sniffer_rule &left, SnifferRules::sniffer_rule 
&right)
+bool operator<(const SnifferRules::sniffer_rule &left, const 
SnifferRules::sniffer_rule &right)
 {
        if (left.rule && right.rule) {
                double leftPriority = left.rule->Priority();


Other related posts:

  • » [haiku-commits] haiku: hrev46551 - headers/private/shared src/kits/storage/mime headers/build src/add-ons/kernel/file_systems/bfs src/kits/package - pulkomandy