From 9a8ef5895955c74d5d8c4445ca9debcd231112d1 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 30 Nov 2005 23:41:40 +0000 Subject: [PATCH] Build fixes for gcc 4 by Ilzu Siiteri. Small changes by myself. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15256 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/bemail/ComboBox.cpp | 2 +- src/apps/bemail/Content.h | 2 +- src/apps/bemail/Header.cpp | 4 +++- src/apps/bemail/Jamfile | 2 +- src/apps/bemail/QueryMenu.h | 4 +++- src/apps/cdplayer/CDDBSupport.h | 2 ++ src/apps/cdplayer/CDPlayer.h | 2 +- src/apps/cdplayer/TwoStateDrawButton.h | 2 +- src/apps/codycam/FtpClient.h | 2 ++ src/apps/codycam/Jamfile | 2 +- src/apps/poorman/Jamfile | 2 +- src/kits/mail/NodeMessage.cpp | 4 +++- src/kits/mail/RemoteStorageProtocol.cpp | 2 ++ src/preferences/dun/DetailsView.cpp | 4 ++++ src/preferences/dun/Jamfile | 2 +- src/preferences/dun/LocationView.cpp | 5 +++++ src/preferences/dun/ModemWindow.cpp | 3 +++ src/preferences/mail/Account.h | 2 +- src/preferences/mail/ConfigViews.h | 2 +- src/preferences/network/funcs.cpp | 9 +++++---- src/servers/mail/Jamfile | 2 +- src/servers/mail/main.cpp | 2 ++ 22 files changed, 45 insertions(+), 18 deletions(-) diff --git a/src/apps/bemail/ComboBox.cpp b/src/apps/bemail/ComboBox.cpp index 0c5603de6d..d06c7a28a1 100644 --- a/src/apps/bemail/ComboBox.cpp +++ b/src/apps/bemail/ComboBox.cpp @@ -1833,7 +1833,7 @@ void BComboBox::MakeFocus(bool state) // #pragma mark - -BDefaultChoiceList::BDefaultChoiceList(BComboBox *owner = NULL) +BDefaultChoiceList::BDefaultChoiceList(BComboBox *owner) { fOwner = owner; fList = new StringObjectList(); diff --git a/src/apps/bemail/Content.h b/src/apps/bemail/Content.h index eb426a9285..ee9f88a32e 100644 --- a/src/apps/bemail/Content.h +++ b/src/apps/bemail/Content.h @@ -196,7 +196,7 @@ class TTextView : public BTextView void ContentChanged(void); class Reader; - friend TTextView::Reader; + friend class TTextView::Reader; char *fYankBuffer; int32 fLastPosition; diff --git a/src/apps/bemail/Header.cpp b/src/apps/bemail/Header.cpp index 38e4d5439e..e8223eea86 100644 --- a/src/apps/bemail/Header.cpp +++ b/src/apps/bemail/Header.cpp @@ -62,6 +62,7 @@ All rights reserved. #include using namespace BPrivate; +using std::map; #include "Mail.h" #include "Header.h" @@ -131,7 +132,8 @@ THeaderView::THeaderView ( fResending(resending), fBccMenu(NULL), fCcMenu(NULL), - fToMenu(NULL) + fToMenu(NULL), + fEmailList(NULL) { BMenuField *field; BMessage *msg; diff --git a/src/apps/bemail/Jamfile b/src/apps/bemail/Jamfile index a8c5b96977..2ede5b10c4 100644 --- a/src/apps/bemail/Jamfile +++ b/src/apps/bemail/Jamfile @@ -29,7 +29,7 @@ Application BeMail : Words.cpp KUndoBuffer.cpp ; -LinkAgainst BeMail : be tracker stdc++.r4 libmail.so libtextencoding.so ; +LinkAgainst BeMail : be tracker $(TARGET_LIBSTDC++) libmail.so libtextencoding.so ; Package haiku-maildaemon-cvs : BeMail : diff --git a/src/apps/bemail/QueryMenu.h b/src/apps/bemail/QueryMenu.h index dca838036f..dc7bf067c2 100644 --- a/src/apps/bemail/QueryMenu.h +++ b/src/apps/bemail/QueryMenu.h @@ -45,10 +45,12 @@ class BQuery; class BVolume; class QHandler; +using std::vector; + typedef vector query_t; class QueryMenu : public BPopUpMenu { - friend QHandler; + friend class QHandler; public: QueryMenu(const char *title, bool popUp=false, diff --git a/src/apps/cdplayer/CDDBSupport.h b/src/apps/cdplayer/CDDBSupport.h index ebe689ede9..d8d8774547 100644 --- a/src/apps/cdplayer/CDDBSupport.h +++ b/src/apps/cdplayer/CDDBSupport.h @@ -9,6 +9,8 @@ #include #include "CDAudioDevice.h" +using std::vector; + class CDDBData { public: diff --git a/src/apps/cdplayer/CDPlayer.h b/src/apps/cdplayer/CDPlayer.h index 8e7867e445..5f6286f69b 100644 --- a/src/apps/cdplayer/CDPlayer.h +++ b/src/apps/cdplayer/CDPlayer.h @@ -92,4 +92,4 @@ public: }; -#endif \ No newline at end of file +#endif diff --git a/src/apps/cdplayer/TwoStateDrawButton.h b/src/apps/cdplayer/TwoStateDrawButton.h index 09af0eaf40..bae4a20c2b 100644 --- a/src/apps/cdplayer/TwoStateDrawButton.h +++ b/src/apps/cdplayer/TwoStateDrawButton.h @@ -41,4 +41,4 @@ private: bool fButtonState; }; -#endif \ No newline at end of file +#endif diff --git a/src/apps/codycam/FtpClient.h b/src/apps/codycam/FtpClient.h index 1a0103bf9a..7a874fae11 100644 --- a/src/apps/codycam/FtpClient.h +++ b/src/apps/codycam/FtpClient.h @@ -3,6 +3,8 @@ #include #include +using std::string; + class FtpClient { public: diff --git a/src/apps/codycam/Jamfile b/src/apps/codycam/Jamfile index 6521740733..945e757e73 100644 --- a/src/apps/codycam/Jamfile +++ b/src/apps/codycam/Jamfile @@ -10,4 +10,4 @@ Application CodyCam : VideoConsumer.cpp ; -LinkAgainst CodyCam : be media translation netapi stdc++.r4 ; +LinkAgainst CodyCam : be media translation netapi $(TARGET_LIBSTDC++) ; diff --git a/src/apps/poorman/Jamfile b/src/apps/poorman/Jamfile index bef1a30c94..217022e5b4 100644 --- a/src/apps/poorman/Jamfile +++ b/src/apps/poorman/Jamfile @@ -13,7 +13,7 @@ Application PoorMan : PoorMan.cpp PoorManPreferencesWindow.cpp PoorManApplication.cpp constants.cpp - : be tracker stdc++.r4 + : be tracker $(TARGET_LIBSTDC++) ; diff --git a/src/kits/mail/NodeMessage.cpp b/src/kits/mail/NodeMessage.cpp index 45018461fb..0b94bad6e0 100644 --- a/src/kits/mail/NodeMessage.cpp +++ b/src/kits/mail/NodeMessage.cpp @@ -1,7 +1,9 @@ #include "NodeMessage.h" #include #include -#include +#include + +using std::vector; /* These functions gives a nice BMessage interface to node attributes, by letting you transfer attributes to and from BMessages. It makes diff --git a/src/kits/mail/RemoteStorageProtocol.cpp b/src/kits/mail/RemoteStorageProtocol.cpp index 63cf19422f..0b64e1479e 100644 --- a/src/kits/mail/RemoteStorageProtocol.cpp +++ b/src/kits/mail/RemoteStorageProtocol.cpp @@ -14,6 +14,8 @@ class _EXPORT BRemoteMailStorageProtocol; #include #include +using std::map; + namespace { void GetSubFolders(BDirectory *of, BStringList *folders, const char *prepend = ""); diff --git a/src/preferences/dun/DetailsView.cpp b/src/preferences/dun/DetailsView.cpp index 74cadb2d54..3832927497 100644 --- a/src/preferences/dun/DetailsView.cpp +++ b/src/preferences/dun/DetailsView.cpp @@ -8,8 +8,12 @@ Author: Misza (misza@ihug.com.au) */ + #include "DetailsView.h" +using std::cout; +using std::endl; + DetailsView::DetailsView() : BView(BRect(40,31,290,157),"detailsview",B_FOLLOW_NONE,B_WILL_DRAW) { diff --git a/src/preferences/dun/Jamfile b/src/preferences/dun/Jamfile index 8d5f786ac1..1b3deb2637 100644 --- a/src/preferences/dun/Jamfile +++ b/src/preferences/dun/Jamfile @@ -13,4 +13,4 @@ Preference DialUpNetworking : DUNWindow.cpp NewConnectionWindow.cpp ; -LinkAgainst DialUpNetworking : be tracker stdc++.r4 ; \ No newline at end of file +LinkAgainst DialUpNetworking : be tracker $(TARGET_LIBSTDC++) ; \ No newline at end of file diff --git a/src/preferences/dun/LocationView.cpp b/src/preferences/dun/LocationView.cpp index ebaf0efa87..8286400bd6 100644 --- a/src/preferences/dun/LocationView.cpp +++ b/src/preferences/dun/LocationView.cpp @@ -9,8 +9,13 @@ Authors: Misza (misza@ihug.com.au) */ + #include "LocationView.h" +using std::cout; +using std::endl; + + // LocationView -- View inside DUNWindow LocationView::LocationView() : BView(BRect(55,31,285,87),"locationview",B_FOLLOW_NONE,B_WILL_DRAW) { diff --git a/src/preferences/dun/ModemWindow.cpp b/src/preferences/dun/ModemWindow.cpp index 8e1e37e7e3..45f54bbec5 100644 --- a/src/preferences/dun/ModemWindow.cpp +++ b/src/preferences/dun/ModemWindow.cpp @@ -8,8 +8,11 @@ Author: Sikosis (beos@gravity24hr.com) */ +#include + #include "ModemWindow.h" + // CenterWindowOnScreen -- Centers the BWindow to the Current Screen static void CenterWindowOnScreen(BWindow* w) { diff --git a/src/preferences/mail/Account.h b/src/preferences/mail/Account.h index e4772f7c95..9f5a2a8a0d 100644 --- a/src/preferences/mail/Account.h +++ b/src/preferences/mail/Account.h @@ -77,7 +77,7 @@ class Account void Delete(int32 type = IN_AND_OUTBOUND_TYPE); private: - friend Accounts; + friend class Accounts; void AddToListView(); private: void CreateInbound(); diff --git a/src/preferences/mail/ConfigViews.h b/src/preferences/mail/ConfigViews.h index bd35400b39..1f3edb75f3 100644 --- a/src/preferences/mail/ConfigViews.h +++ b/src/preferences/mail/ConfigViews.h @@ -54,7 +54,7 @@ class FilterConfigView : public BBox virtual void AttachedToWindow(); protected: - friend FiltersConfigView; + friend class FiltersConfigView; void Load(BMessage *msg,entry_ref *ref); void Remove(bool deleteMessage = true); diff --git a/src/preferences/network/funcs.cpp b/src/preferences/network/funcs.cpp index 85b228a068..5ea27a7392 100644 --- a/src/preferences/network/funcs.cpp +++ b/src/preferences/network/funcs.cpp @@ -11,7 +11,7 @@ #define B_GREY 216,216,216 -void BackupWin::Flatten_bak(const char *bak_name = NULL) +void BackupWin::Flatten_bak(const char *bak_name) { /*To understand what follows, u'd better open the /boot/home/config/settings/network textfile */ @@ -155,7 +155,7 @@ void NetworkWindow::Get_Configs_List() } } -void NetworkWindow::GetEverything(const char *bakname = NULL) +void NetworkWindow::GetEverything(const char *bakname) { //The configuration is saved in the /boot/home/config/settings/network //text file so the config is static. Maybe we could switch to dynamic by @@ -163,8 +163,9 @@ void NetworkWindow::GetEverything(const char *bakname = NULL) if (bakname == NULL && BEntry("/boot/home/config/settings/network").Exists() == false){ - BAlert *alert = new BAlert("Network Alert","Your network config file doesn't exists.\n - It should be located at/boot/home/config/settings/network " + BAlert *alert = new BAlert("Network Alert", + "Your network config file doesn't exists.\n" + "It should be located at/boot/home/config/settings/network " ,"Oups...",NULL,NULL,B_WIDTH_FROM_WIDEST,B_INFO_ALERT); alert->Go(); } diff --git a/src/servers/mail/Jamfile b/src/servers/mail/Jamfile index 5b4f77a11d..ab497e24c2 100644 --- a/src/servers/mail/Jamfile +++ b/src/servers/mail/Jamfile @@ -19,7 +19,7 @@ Server mail_daemon : main.cpp ; -LinkAgainst mail_daemon : be libmail.so tracker stdc++.r4 $(NETWORK_LIBS) ; +LinkAgainst mail_daemon : be libmail.so tracker $(TARGET_LIBSTDC++) $(NETWORK_LIBS) ; Package haiku-maildaemon-cvs : mail_daemon : diff --git a/src/servers/mail/main.cpp b/src/servers/mail/main.cpp index bbff032908..62c859928e 100644 --- a/src/servers/mail/main.cpp +++ b/src/servers/mail/main.cpp @@ -51,6 +51,8 @@ } bsppp_status_t; #include #endif + +using std::map; typedef struct glorbal { size_t bytes;