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:
Ingo Weinhold
2005-11-12 23:27:14 +00:00
parent bcf95670a2
commit 758b1d0e05
167 changed files with 497 additions and 304 deletions
+3 -2
View File
@@ -77,12 +77,13 @@ public:
size_t inAttributeCount);
void * operator new(size_t size);
void * operator new(size_t size, const nothrow_t &) throw();
void * operator new(size_t size,
const std::nothrow_t &) throw();
void operator delete(void * ptr);
#if !__MWERKS__
// there's a bug in MWCC under R4.1 and earlier
void operator delete(void * ptr,
const nothrow_t &) throw();
const std::nothrow_t &) throw();
#endif
static status_t SetMemoryPoolSize(size_t in_poolSize);