From 9fdac8f80635de763b3f80dfbd962efe7537df4f Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 20 May 2017 09:52:07 +0200 Subject: [PATCH] filwip: patchset. --- .../filwip/patches/filwip-1.0.0.patchset | 231 ++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 haiku-apps/filwip/patches/filwip-1.0.0.patchset diff --git a/haiku-apps/filwip/patches/filwip-1.0.0.patchset b/haiku-apps/filwip/patches/filwip-1.0.0.patchset new file mode 100644 index 000000000..fe9e81927 --- /dev/null +++ b/haiku-apps/filwip/patches/filwip-1.0.0.patchset @@ -0,0 +1,231 @@ +From 1a0c9680541c3b386ea09f858a97b1cf185b8b21 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 18 May 2017 22:40:48 +0200 +Subject: gcc5 patch + + +diff --git a/Source/AboutWindow.cpp b/Source/AboutWindow.cpp +index f828be7..f11f8b2 100644 +--- a/Source/AboutWindow.cpp ++++ b/Source/AboutWindow.cpp +@@ -43,7 +43,7 @@ + /*============================================================================================================*/ + + MarqueeView::MarqueeView (BRect frame, const char *name, BRect textRect, +- uint32 resizeMask, uint32 flags = B_WILL_DRAW) ++ uint32 resizeMask, uint32 flags) + : BTextView (frame, name, textRect, resizeMask, flags) + { + curPos = Bounds().top; +@@ -278,8 +278,9 @@ AboutWindow::AboutWindow () + { + if ((strt = temp.FindFirst (mainHeadings[i].String())) != B_ERROR) + { ++ rgb_color mainHeadingColor = {0, 0, 200}; + textView->SetFontAndColor (strt, strt + strlen(mainHeadings[i].String()), +- be_plain_font, B_FONT_ALL, &(rgb_color){0, 0, 200}); ++ be_plain_font, B_FONT_ALL, &mainHeadingColor); + } + } + +diff --git a/Source/EraserLooper.cpp b/Source/EraserLooper.cpp +index c299387..4fedc01 100644 +--- a/Source/EraserLooper.cpp ++++ b/Source/EraserLooper.cpp +@@ -181,7 +181,8 @@ void EraserLooper::EraseList (bool guiMode) + B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_INFO_ALERT); + BTextView *vw = report->TextView(); + vw->SetStylable (true); +- vw->SetFontAndColor (0, 6, &font, B_FONT_ALL, &(rgb_color){0, 0, 198}); ++ rgb_color alertColor = {0, 0, 198}; ++ vw->SetFontAndColor (0, 6, &font, B_FONT_ALL, &alertColor); + + report->SetShortcut (0L, B_ESCAPE); + report->Go(NULL); +diff --git a/Source/FileLooper.cpp b/Source/FileLooper.cpp +index ef22b7a..2639a16 100644 +--- a/Source/FileLooper.cpp ++++ b/Source/FileLooper.cpp +@@ -278,7 +278,7 @@ FileLooper::FileLooper (EraserLooper *eraser, const char *processPath, const cha + BAlert *debugAlert = new BAlert ("OK", debugStr.String(), "OK"); + debugAlert->Go(); + +- cout << processPath << endl; cout.flush(); ++ std::cout << processPath << std::endl; std::cout.flush(); + } + } + +diff --git a/Source/InfoStrView.cpp b/Source/InfoStrView.cpp +index 3422bd6..9772153 100644 +--- a/Source/InfoStrView.cpp ++++ b/Source/InfoStrView.cpp +@@ -34,13 +34,14 @@ + #include + + #include ++#include + + #include "InfoStrView.h" + + /*============================================================================================================*/ + + InfoStrView::InfoStrView (BRect bounds, const char *name, const char *text, +- uint32 resizeFlags = B_FOLLOW_LEFT, uint32 flags = B_WILL_DRAW) ++ uint32 resizeFlags, uint32 flags) + : BStringView (bounds, name, text, resizeFlags, flags), + itemPath (NULL), + trackerSignature ("application/x-vnd.Be-TRAK") +diff --git a/Source/MainWindow.cpp b/Source/MainWindow.cpp +index 9071f49..f951676 100644 +--- a/Source/MainWindow.cpp ++++ b/Source/MainWindow.cpp +@@ -1796,7 +1796,8 @@ bool MainWindow::ConfirmCleanUp () const + + BFont font (be_plain_font); + font.SetFace (B_BOLD_FACE); +- vw->SetFontAndColor (0, 7, &font, B_FONT_ALL, &(rgb_color){198, 0, 0, 255}); ++ rgb_color alertColor = {198, 0, 0, 255}; ++ vw->SetFontAndColor (0, 7, &font, B_FONT_ALL, &alertColor); + + /* Popup a scary warning :) */ + buttonIndex = confirm->Go (); +diff --git a/Source/MainWindow.h b/Source/MainWindow.h +index 37b03d7..62b07a7 100644 +--- a/Source/MainWindow.h ++++ b/Source/MainWindow.h +@@ -35,6 +35,7 @@ + #include + + class BBox; ++class BFilePanel; + class BMenuField; + class BPopUpMenu; + class BStatusBar; +diff --git a/Source/NodeLimit.cpp b/Source/NodeLimit.cpp +index 06832d1..117178c 100644 +--- a/Source/NodeLimit.cpp ++++ b/Source/NodeLimit.cpp +@@ -16,6 +16,10 @@ + + #include "NodeLimit.h" + ++#include ++#include ++#include ++ + /* Set nodeCount to the current limit and bumpValue additional monitors for each 4096 limit */ + int nodeCount = 4096; + const int32 bumpValue = 512; +@@ -32,7 +36,14 @@ status_t NeedMoreNodeMonitors () + nodeCount += bumpValue; + codeLocker.Unlock(); + +- return _kset_mon_limit_ (nodeCount); ++ struct rlimit rl; ++ if (nodeCount < 1) ++ return EINVAL; ++ rl.rlim_cur = nodeCount; ++ rl.rlim_max = RLIM_SAVED_MAX; ++ if (setrlimit(RLIMIT_NOVMON, &rl) < 0) ++ return errno; ++ return B_OK; + } + + /*============================================================================================================*/ +diff --git a/Source/NodeLimit.h b/Source/NodeLimit.h +index f5c1fc6..3840d29 100644 +--- a/Source/NodeLimit.h ++++ b/Source/NodeLimit.h +@@ -27,16 +27,6 @@ + #include + #include + +-#ifndef _IMPEXP_ROOT +-#define _IMPEXP_ROOT +-#endif +- +-/* We need this internal call in order to break the node limit */ +-#ifdef __cplusplus +- extern "C" _IMPEXP_ROOT int _kset_mon_limit_ (int num); +-#else +- _IMPEXP_ROOT int _kset_mon_limit_ (int num); +-#endif + + /* Prototypes */ + status_t NeedMoreNodeMonitors (); +diff --git a/Source/PluginParser.h b/Source/PluginParser.h +index 995766f..19bd42c 100644 +--- a/Source/PluginParser.h ++++ b/Source/PluginParser.h +@@ -104,7 +104,7 @@ class PluginParser + /* Private variables */ + BEntry pluginEntry; + bool fileExists; +- fstream pluginStream; ++ std::fstream pluginStream; + BList itemList; + }; + +diff --git a/Source/PrefsListItem.cpp b/Source/PrefsListItem.cpp +index f62e6d3..8d84943 100644 +--- a/Source/PrefsListItem.cpp ++++ b/Source/PrefsListItem.cpp +@@ -34,6 +34,7 @@ + + #include + #include ++#include + + #include "PrefsListItem.h" + #include "Constants.h" +diff --git a/Source/PrefsView.cpp b/Source/PrefsView.cpp +index ca0f599..bf1faf0 100644 +--- a/Source/PrefsView.cpp ++++ b/Source/PrefsView.cpp +@@ -28,6 +28,8 @@ + #include "PrefsView.h" + #include "Constants.h" + ++#include ++ + /*============================================================================================================*/ + + PrefsView::PrefsView (BRect frame, const char *description) +diff --git a/Source/PrefsWindow.cpp b/Source/PrefsWindow.cpp +index cef3f29..8e03678 100644 +--- a/Source/PrefsWindow.cpp ++++ b/Source/PrefsWindow.cpp +@@ -521,10 +521,10 @@ void PrefsWindow::SaveViewLoopers () + prefs.SetBool ("lo_monitor", IsChecked (lo_monitorChk)); + + prefs.SetInt8 ("lo_priority", +- (int8)lo_priorityList.ItemAt(lo_priorityPopup->IndexOf(lo_priorityPopup->FindMarked()))); ++ (int8)(addr_t)lo_priorityList.ItemAt(lo_priorityPopup->IndexOf(lo_priorityPopup->FindMarked()))); + + prefs.SetInt16 ("lo_capacity", +- (int16)lo_capacityList.ItemAt(lo_capacityPopup->IndexOf(lo_capacityPopup->FindMarked()))); ++ (int16)(addr_t)lo_capacityList.ItemAt(lo_capacityPopup->IndexOf(lo_capacityPopup->FindMarked()))); + } + + /*============================================================================================================*/ +@@ -542,7 +542,7 @@ void PrefsWindow::LoadViewLoopers () + if (prefs.FindInt8 ("lo_priority", &p) == B_OK) + { + for (int32 x = 0; x < lo_priorityList.CountItems(); x++) +- if ((int8)lo_priorityList.ItemAt(x) == p) ++ if ((int8)(addr_t)lo_priorityList.ItemAt(x) == p) + { + (lo_priorityPopup->ItemAt(x))->SetMarked (true); + break; +@@ -558,7 +558,7 @@ void PrefsWindow::LoadViewLoopers () + if (prefs.FindInt16 ("lo_capacity", &c) == B_OK) + { + for (int32 x = 0; x < lo_capacityList.CountItems(); x++) +- if ((int16)lo_capacityList.ItemAtFast(x) == c) ++ if ((int16)(addr_t)lo_capacityList.ItemAtFast(x) == c) + { + (lo_capacityPopup->ItemAt(x))->SetMarked (true); + break; +-- +2.12.2 +