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:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004, Jérôme Duval, [email protected].
|
||||
* Copyright 2004, J��e Duval, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <String.h>
|
||||
#include <TextView.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
const uint32 TIMEDALERT_UPDATE = 'taup';
|
||||
|
||||
@@ -32,8 +33,8 @@ computer's clock may be an hour off. Currently,\nyour computer thinks it is "
|
||||
#define STRING2 ".\n\nIs this the correct time?"
|
||||
|
||||
TimedAlert::TimedAlert(const char *title, const char *text, const char *button1,
|
||||
const char *button2 = NULL, const char *button3 = NULL,
|
||||
button_width width = B_WIDTH_AS_USUAL, alert_type type = B_INFO_ALERT)
|
||||
const char *button2, const char *button3,
|
||||
button_width width, alert_type type)
|
||||
: BAlert(title, text, button1, button2, button3, width, type),
|
||||
fRunner(NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user