Fixes that make Haiku build with gcc 4. Mainly out of the following
categories: * Missing includes (like <stdlib.h> and <string.h>). * Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so. * Local variables shadowing parameters. * Default parameters in function definitions (as opposed to function declarations). * All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported explicitly from the std:: namespace now. * "new (sometype)[...]" must read "new sometype[...]", even if sometype is something like "const char *". * __FUNCTION__ is no longer a string literal (but a string expression), i.e. 'printf(__FUNCTION__ ": ...\n")' is invalid code. * A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes" is an invalid expression. * "friend class SomeClass" only works when SomeClass is known before. Otherwise the an inner class with that name is considered as friend. gcc 4 is much pickier about scopes. * gcc 4 is generally stricter with respect to type conversions in C. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -10,6 +10,12 @@
|
||||
|
||||
#include <util/AutoLock.h>
|
||||
|
||||
// instantiations
|
||||
#include <KDiskDevice.h>
|
||||
#include <KDiskDeviceManager.h>
|
||||
#include <KDiskSystem.h>
|
||||
#include <KPartition.h>
|
||||
|
||||
namespace BPrivate {
|
||||
namespace DiskDevice {
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class List {
|
||||
}
|
||||
|
||||
private:
|
||||
friend class IteratorType;
|
||||
friend class DoublyLinked::Iterator<Item, LinkMember>;
|
||||
Link fLink;
|
||||
};
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <OS.h>
|
||||
#include <TypeConstants.h>
|
||||
|
||||
class BMessage;
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
class KMessageField;
|
||||
@@ -100,7 +102,7 @@ public:
|
||||
|
||||
private:
|
||||
friend class KMessageField;
|
||||
friend class BMessage; // not so nice, but makes things easier
|
||||
friend class ::BMessage; // not so nice, but makes things easier
|
||||
|
||||
struct Header {
|
||||
uint32 magic;
|
||||
|
||||
@@ -127,8 +127,11 @@ private:
|
||||
int32 _FindInsertionIndex(const Key &key, bool &exists) const;
|
||||
|
||||
private:
|
||||
friend class Entry;
|
||||
friend class ConstEntry;
|
||||
// friend class Entry;
|
||||
// friend class ConstEntry;
|
||||
friend class VectorMapEntry<KeyReference, Value, _Entry, Class>;
|
||||
friend class VectorMapEntry<KeyReference, const Value, const _Entry,
|
||||
const Class>;
|
||||
|
||||
ElementVector fElements;
|
||||
EntryStrategy fEntryStrategy;
|
||||
|
||||
Reference in New Issue
Block a user