mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
beam: upstream patch.
This commit is contained in:
@@ -1,497 +0,0 @@
|
||||
From cc660d2ee6bfb607d8fc1e3d1ee09f2f948903af Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 29 Jun 2019 17:27:28 +0200
|
||||
Subject: x86_64 patch
|
||||
|
||||
|
||||
diff --git a/build-jam/MainBuildRules b/build-jam/MainBuildRules
|
||||
index 06b09ad..d93b0a3 100644
|
||||
--- a/build-jam/MainBuildRules
|
||||
+++ b/build-jam/MainBuildRules
|
||||
@@ -293,6 +293,7 @@ if $(OSPLAT) = X86 {
|
||||
if $(IS_GCC_4_PLATFORM) {
|
||||
# gcc 4 Haiku
|
||||
STDC++LIB = stdc++ ;
|
||||
+ C++FLAGS = -std=c++98 ;
|
||||
} else {
|
||||
# BeOS or BeOS compatible Haiku
|
||||
if $(OSPLAT) = X86 {
|
||||
diff --git a/src-beam/BeamApp.cpp b/src-beam/BeamApp.cpp
|
||||
index 87fee62..1832bd7 100644
|
||||
--- a/src-beam/BeamApp.cpp
|
||||
+++ b/src-beam/BeamApp.cpp
|
||||
@@ -119,7 +119,7 @@ static int32 MarkMailsAs( void* data)
|
||||
BmString newStatus = msg->FindString( BeamApplication::MSG_STATUS);
|
||||
BmMailRefVect* refVect = NULL;
|
||||
msg->FindPointer( BeamApplication::MSG_MAILREF_VECT, (void**)&refVect);
|
||||
- int32 msgCount = 0;
|
||||
+ size_t msgCount = 0;
|
||||
if (refVect)
|
||||
msgCount = refVect->size();
|
||||
if (msgCount>1) {
|
||||
@@ -201,7 +201,7 @@ static int32 MoveMails( void* data)
|
||||
static int jobNum = 1;
|
||||
BmMailRefVect* refVect = NULL;
|
||||
msg->FindPointer( BeamApplication::MSG_MAILREF_VECT, (void**)&refVect);
|
||||
- int32 countFound = 0;
|
||||
+ size_t countFound = 0;
|
||||
if (refVect)
|
||||
countFound = refVect->size();
|
||||
if (countFound > 0) {
|
||||
@@ -239,7 +239,7 @@ static int32 MoveMails( void* data)
|
||||
refs[index++] = mailRef->EntryRef();
|
||||
}
|
||||
tmpMsg.AddPointer( BmMailMover::MSG_REFS, (void*)refs);
|
||||
- tmpMsg.AddInt32( BmMailMover::MSG_REF_COUNT, countFound);
|
||||
+ tmpMsg.AddInt32( BmMailMover::MSG_REF_COUNT, (int32)countFound);
|
||||
// message takes ownership of refs-array!
|
||||
TheJobStatusWin->PostMessage( &tmpMsg);
|
||||
// now tell sending ref-view that we are finished:
|
||||
@@ -264,7 +264,7 @@ static int32 TrashMails( void* data)
|
||||
return B_OK;
|
||||
BmMailRefVect* refVect = NULL;
|
||||
msg->FindPointer( BeamApplication::MSG_MAILREF_VECT, (void**)&refVect);
|
||||
- uint32 countFound = 0;
|
||||
+ size_t countFound = 0;
|
||||
if (refVect)
|
||||
countFound = refVect->size();
|
||||
if (countFound>0) {
|
||||
@@ -355,7 +355,7 @@ static int32 EditMailsAsNew( void* data)
|
||||
return B_OK;
|
||||
BmMailRefVect* refVect = NULL;
|
||||
msg->FindPointer( BeamApplication::MSG_MAILREF_VECT, (void**)&refVect);
|
||||
- int32 msgCount = 0;
|
||||
+ size_t msgCount = 0;
|
||||
if (refVect)
|
||||
msgCount = refVect->size();
|
||||
if (msgCount) {
|
||||
@@ -382,7 +382,7 @@ static int32 RedirectMails( void* data)
|
||||
return B_OK;
|
||||
BmMailRefVect* refVect = NULL;
|
||||
msg->FindPointer( BeamApplication::MSG_MAILREF_VECT, (void**)&refVect);
|
||||
- int32 msgCount = 0;
|
||||
+ size_t msgCount = 0;
|
||||
if (refVect)
|
||||
msgCount = refVect->size();
|
||||
if (msgCount) {
|
||||
@@ -411,7 +411,7 @@ static int32 ForwardMails( void* data) {
|
||||
int32 buttonPressed = 1;
|
||||
BmMailRefVect* refVect = NULL;
|
||||
msg->FindPointer( BeamApplication::MSG_MAILREF_VECT, (void**)&refVect);
|
||||
- int32 msgCount = 0;
|
||||
+ size_t msgCount = 0;
|
||||
if (refVect)
|
||||
msgCount = refVect->size();
|
||||
if (msgCount>1) {
|
||||
@@ -469,7 +469,7 @@ static int32 ReplyToMails( void* data) {
|
||||
int32 buttonPressed = 0;
|
||||
BmMailRefVect* refVect = NULL;
|
||||
msg->FindPointer( BeamApplication::MSG_MAILREF_VECT, (void**)&refVect);
|
||||
- int32 msgCount = 0;
|
||||
+ size_t msgCount = 0;
|
||||
if (refVect)
|
||||
msgCount = refVect->size();
|
||||
if (msgCount>1) {
|
||||
@@ -533,7 +533,7 @@ int32 PrintMails( void* data) {
|
||||
|
||||
BmMailRefVect* refVect = NULL;
|
||||
msg->FindPointer( BeamApplication::MSG_MAILREF_VECT, (void**)&refVect);
|
||||
- uint32 msgCount = 0;
|
||||
+ size_t msgCount = 0;
|
||||
if (refVect)
|
||||
msgCount = refVect->size();
|
||||
if (msgCount) {
|
||||
diff --git a/src-beam/BmGuiRoster.cpp b/src-beam/BmGuiRoster.cpp
|
||||
index 24c48c0..2703362 100644
|
||||
--- a/src-beam/BmGuiRoster.cpp
|
||||
+++ b/src-beam/BmGuiRoster.cpp
|
||||
@@ -426,8 +426,8 @@ void BmGuiRoster::AddCharsetMenu( BMenu* menu, BHandler* target, int32 msgType)
|
||||
vector<BmString> charsets;
|
||||
BmString sets = ThePrefs->GetString( "StandardCharsets");
|
||||
split( BmPrefs::nListSeparator, sets, charsets);
|
||||
- int32 numStdSets = charsets.size();
|
||||
- for( int i=0; i<numStdSets; ++i) {
|
||||
+ size_t numStdSets = charsets.size();
|
||||
+ for( uint i=0; i<numStdSets; ++i) {
|
||||
charset = charsets[i];
|
||||
charset.ToLower();
|
||||
BMessage* msg = new BMessage( msgType);
|
||||
diff --git a/src-beam/BmListController.cpp b/src-beam/BmListController.cpp
|
||||
index 8a12ae7..e67e3e8 100644
|
||||
--- a/src-beam/BmListController.cpp
|
||||
+++ b/src-beam/BmListController.cpp
|
||||
@@ -293,7 +293,8 @@ bool BmViewItemManager::ApplyFilter(BmViewItemFilter* filter,
|
||||
"BmViewItemManager::ApplyFilter(): Unable to get lock"
|
||||
);
|
||||
|
||||
- BList visibleItems(mViewModelMap.size());
|
||||
+ size_t mapSize = mViewModelMap.size();
|
||||
+ BList visibleItems((int32)min_c(INT32_MAX, mapSize));
|
||||
for(iter = mViewModelMap.begin(); iter != mViewModelMap.end(); ++iter) {
|
||||
if (!iter->second->ShouldBeHidden())
|
||||
visibleItems.AddItem(iter->second);
|
||||
@@ -802,7 +803,7 @@ void BmListViewController::AddAllModelItems() {
|
||||
);
|
||||
BList* tempList = NULL;
|
||||
if (!Hierarchical())
|
||||
- tempList = new BList( model->size());
|
||||
+ tempList = new BList((int32)min_c(INT32_MAX, model->size()));
|
||||
SetDisconnectScrollView( true);
|
||||
SetInsertAtSortedPos( false);
|
||||
BmModelItemMap::const_iterator iter;
|
||||
diff --git a/src-beam/BmMailAddrCompleter.cpp b/src-beam/BmMailAddrCompleter.cpp
|
||||
index 4ba6e1a..1740a08 100644
|
||||
--- a/src-beam/BmMailAddrCompleter.cpp
|
||||
+++ b/src-beam/BmMailAddrCompleter.cpp
|
||||
@@ -181,7 +181,7 @@ void BmMailAddressCompleter::MailAddrPatternSelector
|
||||
;
|
||||
if (*endPos) {
|
||||
// found complete quoted-string.
|
||||
- int32 numChars = 1+endPos-pos;
|
||||
+ size_t numChars = 1+endPos-pos;
|
||||
pos += numChars;
|
||||
} else {
|
||||
// it seems that there is no ending quote, we assume the
|
||||
@@ -193,7 +193,7 @@ void BmMailAddressCompleter::MailAddrPatternSelector
|
||||
// the separator char:
|
||||
for( endPos=pos; *endPos && *endPos!='"' && *endPos!=','; ++endPos)
|
||||
;
|
||||
- int32 numChars = endPos-pos;
|
||||
+ size_t numChars = endPos-pos;
|
||||
pos += numChars;
|
||||
if (*endPos == ',') {
|
||||
pattLen = endPos-text.String()-pattStart;
|
||||
diff --git a/src-beam/BmMailEditWin.cpp b/src-beam/BmMailEditWin.cpp
|
||||
index 1a0cb99..ef0b950 100644
|
||||
--- a/src-beam/BmMailEditWin.cpp
|
||||
+++ b/src-beam/BmMailEditWin.cpp
|
||||
@@ -363,7 +363,7 @@ void BmMailEditWin::CreateGUI() {
|
||||
BmToolbarButton::CalcMaxSize( width, height, "Send", true);
|
||||
BmToolbarButton::CalcMaxSize( width, height, "Save");
|
||||
BmToolbarButton::CalcMaxSize( width, height, "New");
|
||||
- BmToolbarButton::CalcMaxSize( width, height, "Attach"B_UTF8_ELLIPSIS);
|
||||
+ BmToolbarButton::CalcMaxSize( width, height, "Attach" B_UTF8_ELLIPSIS);
|
||||
|
||||
BBitmap* rightArrow = TheResources->IconByName("Expander_Right")->bitmap;
|
||||
BBitmap* downArrow = TheResources->IconByName("Expander_Down")->bitmap;
|
||||
@@ -398,7 +398,7 @@ void BmMailEditWin::CreateGUI() {
|
||||
),
|
||||
mAttachButton
|
||||
= new BmToolbarButton(
|
||||
- "Attach"B_UTF8_ELLIPSIS,
|
||||
+ "Attach" B_UTF8_ELLIPSIS,
|
||||
width, height,
|
||||
new BMessage(BMM_ATTACH), this,
|
||||
"Attach a file to this mail",
|
||||
diff --git a/src-beam/BmPrefsRecvMailView.cpp b/src-beam/BmPrefsRecvMailView.cpp
|
||||
index b25b618..f2cb3ae 100644
|
||||
--- a/src-beam/BmPrefsRecvMailView.cpp
|
||||
+++ b/src-beam/BmPrefsRecvMailView.cpp
|
||||
@@ -302,7 +302,7 @@ BmPrefsRecvMailView::BmPrefsRecvMailView()
|
||||
= new BmTextControl("Client Certificate:"),
|
||||
mSelectClientCertButton
|
||||
= new BetterButton(
|
||||
- "Select"B_UTF8_ELLIPSIS,
|
||||
+ "Select" B_UTF8_ELLIPSIS,
|
||||
new BMessage(BM_CLIENT_CERT_SELECTED),
|
||||
this
|
||||
),
|
||||
diff --git a/src-beam/BmPrefsSendMailView.cpp b/src-beam/BmPrefsSendMailView.cpp
|
||||
index ea6a085..2d0ca07 100644
|
||||
--- a/src-beam/BmPrefsSendMailView.cpp
|
||||
+++ b/src-beam/BmPrefsSendMailView.cpp
|
||||
@@ -277,7 +277,7 @@ BmPrefsSendMailView::BmPrefsSendMailView()
|
||||
= new BmTextControl("Client Certificate:"),
|
||||
mSelectClientCertButton
|
||||
= new BetterButton(
|
||||
- "Select"B_UTF8_ELLIPSIS,
|
||||
+ "Select" B_UTF8_ELLIPSIS,
|
||||
new BMessage(BM_CLIENT_CERT_SELECTED),
|
||||
this
|
||||
),
|
||||
diff --git a/src-bmBase/BmMultiLocker.cpp b/src-bmBase/BmMultiLocker.cpp
|
||||
index fad17de..380f246 100644
|
||||
--- a/src-bmBase/BmMultiLocker.cpp
|
||||
+++ b/src-bmBase/BmMultiLocker.cpp
|
||||
@@ -35,7 +35,7 @@ Spinlock::Spinlock(int32& guardVar)
|
||||
|
||||
Spinlock::~Spinlock()
|
||||
{
|
||||
- atomic_and(&mGuardVar, ~1UL);
|
||||
+ atomic_and(&mGuardVar, 0xffffffff);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src-bmBase/BmString.cpp b/src-bmBase/BmString.cpp
|
||||
index 19308fe..876a013 100644
|
||||
--- a/src-bmBase/BmString.cpp
|
||||
+++ b/src-bmBase/BmString.cpp
|
||||
@@ -1942,6 +1942,7 @@ BmString::operator<<(char c)
|
||||
}
|
||||
|
||||
|
||||
+#ifndef __x86_64__
|
||||
BmString&
|
||||
BmString::operator<<(int i)
|
||||
{
|
||||
@@ -1960,6 +1961,7 @@ BmString::operator<<(unsigned int i)
|
||||
|
||||
return *this << num;
|
||||
}
|
||||
+#endif
|
||||
|
||||
|
||||
BmString&
|
||||
diff --git a/src-bmBase/BmString.h b/src-bmBase/BmString.h
|
||||
index 0c6ec3b..d41c85c 100644
|
||||
--- a/src-bmBase/BmString.h
|
||||
+++ b/src-bmBase/BmString.h
|
||||
@@ -268,8 +268,10 @@ public:
|
||||
BmString &operator<<(const char *);
|
||||
BmString &operator<<(const BmString &);
|
||||
BmString &operator<<(char);
|
||||
+#ifndef __x86_64__
|
||||
BmString &operator<<(int);
|
||||
BmString &operator<<(unsigned int);
|
||||
+#endif
|
||||
BmString &operator<<(uint32);
|
||||
BmString &operator<<(int32);
|
||||
BmString &operator<<(uint64);
|
||||
diff --git a/src-bmDaemon/BmImapNestedStringList.h b/src-bmDaemon/BmImapNestedStringList.h
|
||||
index 8581126..9f40d6a 100644
|
||||
--- a/src-bmDaemon/BmImapNestedStringList.h
|
||||
+++ b/src-bmDaemon/BmImapNestedStringList.h
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
const BmString& Text() const { return mText; }
|
||||
|
||||
inline bool IsLeaf() const { return mChildren.empty(); }
|
||||
- inline uint32 Size() const { return mChildren.size(); }
|
||||
+ inline size_t Size() const { return mChildren.size(); }
|
||||
|
||||
const BmImapNestedStringList& operator[] (uint32 index) const;
|
||||
|
||||
diff --git a/src-bmDaemon/src-netendpoint-addons/BmOpenSslNetEndpoint.cpp b/src-bmDaemon/src-netendpoint-addons/BmOpenSslNetEndpoint.cpp
|
||||
index c50635b..6e3495b 100644
|
||||
--- a/src-bmDaemon/src-netendpoint-addons/BmOpenSslNetEndpoint.cpp
|
||||
+++ b/src-bmDaemon/src-netendpoint-addons/BmOpenSslNetEndpoint.cpp
|
||||
@@ -555,7 +555,7 @@ status_t BmOpenSslNetEndpoint
|
||||
} else
|
||||
stop = true;
|
||||
}
|
||||
- if (pkcs12);
|
||||
+ if (pkcs12)
|
||||
PKCS12_free(pkcs12);
|
||||
if (p12bio)
|
||||
BIO_free(p12bio);
|
||||
diff --git a/src-bmGuiBase/BubbleHelper.cpp b/src-bmGuiBase/BubbleHelper.cpp
|
||||
index 99257e2..83706a7 100644
|
||||
--- a/src-bmGuiBase/BubbleHelper.cpp
|
||||
+++ b/src-bmGuiBase/BubbleHelper.cpp
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "BubbleHelper.h"
|
||||
#include "Colors.h"
|
||||
|
||||
-long BubbleHelper::runcount=0;
|
||||
+int32 BubbleHelper::runcount=0;
|
||||
BubbleHelper* TheBubbleHelper = NULL;
|
||||
|
||||
void BubbleHelper::CreateInstance()
|
||||
@@ -163,7 +163,7 @@ const BCursor* BubbleHelper::GetCursor(BView *view)
|
||||
return cursor;
|
||||
}
|
||||
|
||||
-long BubbleHelper::_helper(void *arg)
|
||||
+int32 BubbleHelper::_helper(void *arg)
|
||||
{
|
||||
((BubbleHelper*)arg)->Helper();
|
||||
return 0;
|
||||
@@ -202,7 +202,7 @@ void BubbleHelper::Helper()
|
||||
while(be_app_messenger.IsValid())
|
||||
{
|
||||
BPoint where;
|
||||
- ulong buttons;
|
||||
+ uint32 buttons;
|
||||
if(enabled)
|
||||
{
|
||||
if(textwin->Lock())
|
||||
diff --git a/src-bmGuiBase/BubbleHelper.h b/src-bmGuiBase/BubbleHelper.h
|
||||
index 45bbdb8..7a731c4 100644
|
||||
--- a/src-bmGuiBase/BubbleHelper.h
|
||||
+++ b/src-bmGuiBase/BubbleHelper.h
|
||||
@@ -62,7 +62,7 @@ class IMPEXPBMGUIBASE BubbleHelper
|
||||
void Helper();
|
||||
const char *GetHelp(BView *view);
|
||||
const BCursor *GetCursor(BView *view);
|
||||
- static long _helper(void *arg);
|
||||
+ static int32 _helper(void *arg);
|
||||
BView *FindView(BPoint where);
|
||||
bool enabled;
|
||||
|
||||
@@ -76,7 +76,7 @@ class IMPEXPBMGUIBASE BubbleHelper
|
||||
|
||||
BubbleHelper(); // hide default constructor
|
||||
|
||||
- static long runcount;
|
||||
+ static int32 runcount;
|
||||
public:
|
||||
};
|
||||
|
||||
diff --git a/src-bmGuiBase/ColumnListView.cpp b/src-bmGuiBase/ColumnListView.cpp
|
||||
index 636e6f8..3879f77 100644
|
||||
--- a/src-bmGuiBase/ColumnListView.cpp
|
||||
+++ b/src-bmGuiBase/ColumnListView.cpp
|
||||
@@ -1080,7 +1080,7 @@ int32 ColumnListView::DetermineSortedPosHierarchical( CLVListItem* item, uint32
|
||||
if (!numItems)
|
||||
return startIndex;
|
||||
if (!fCompare || !SortDepth)
|
||||
- return ((int32)ThisLevelItems.LastItem())+1;
|
||||
+ return ((int32)(addr_t)ThisLevelItems.LastItem())+1;
|
||||
int32 currPos = numItems/2;
|
||||
int32 lb = 0;
|
||||
int32 ub = numItems-1;
|
||||
@@ -1089,7 +1089,7 @@ int32 ColumnListView::DetermineSortedPosHierarchical( CLVListItem* item, uint32
|
||||
for(int32 SortIteration = 0; SortIteration < SortDepth && CompareResult == 0; SortIteration++)
|
||||
{
|
||||
CLVColumn* Column = (CLVColumn*)fSortKeyList.ItemAt(SortIteration);
|
||||
- CompareResult = fCompare(item,(CLVListItem*)FullListItemAt((int32)ThisLevelItems.ItemAt(currPos)),fColumnList.IndexOf(Column),Column->Flags());
|
||||
+ CompareResult = fCompare(item,(CLVListItem*)FullListItemAt((int32)(addr_t)ThisLevelItems.ItemAt(currPos)),fColumnList.IndexOf(Column),Column->Flags());
|
||||
if(Column->fSortMode == Descending)
|
||||
CompareResult = 0-CompareResult;
|
||||
}
|
||||
@@ -1102,7 +1102,7 @@ int32 ColumnListView::DetermineSortedPosHierarchical( CLVListItem* item, uint32
|
||||
}
|
||||
}
|
||||
if (currPos == numItems) {
|
||||
- int32 idx = 1+(int32)ThisLevelItems.ItemAt( numItems-1);
|
||||
+ int32 idx = 1+(int32)(addr_t)ThisLevelItems.ItemAt( numItems-1);
|
||||
CLVListItem* item = (CLVListItem*)fFullItemList.ItemAt(idx);
|
||||
while( item && item->OutlineLevel() > ThisLevel) {
|
||||
item = (CLVListItem*)fFullItemList.ItemAt(++idx);
|
||||
@@ -1110,7 +1110,7 @@ int32 ColumnListView::DetermineSortedPosHierarchical( CLVListItem* item, uint32
|
||||
return idx;
|
||||
}
|
||||
else
|
||||
- return (int32)ThisLevelItems.ItemAt( currPos);
|
||||
+ return (int32)(addr_t)ThisLevelItems.ItemAt( currPos);
|
||||
}
|
||||
|
||||
|
||||
@@ -1444,7 +1444,7 @@ bool ColumnListView::RemoveItems(int32 fullListIndex, int32 count)
|
||||
bool result;
|
||||
if(fHierarchical)
|
||||
{
|
||||
- uint32 LastSuperItemLevel = ULONG_MAX;
|
||||
+ uint32 LastSuperItemLevel = UINT32_MAX;
|
||||
int32 Counter;
|
||||
int32 DisplayItemsToRemove = 0;
|
||||
int32 FirstDisplayItemToRemove = -1;
|
||||
diff --git a/src-bmMailKit/BmMailFolder.h b/src-bmMailKit/BmMailFolder.h
|
||||
index 2692e34..d9cb102 100644
|
||||
--- a/src-bmMailKit/BmMailFolder.h
|
||||
+++ b/src-bmMailKit/BmMailFolder.h
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
{ return &mEntryRef; }
|
||||
inline const node_ref& NodeRef() const
|
||||
{ return mNodeRef; }
|
||||
- inline const int32 SpecialMailCount() const
|
||||
+ inline const size_t SpecialMailCount() const
|
||||
{ return mSpecialMailRefSet.size(); }
|
||||
inline const int32 SpecialMailCountForSubfolders() const
|
||||
{ return mSpecialMailCountForSubfolders; }
|
||||
diff --git a/src-bmMailKit/BmMailHeader.h b/src-bmMailKit/BmMailHeader.h
|
||||
index c1dfa6d..33497f7 100644
|
||||
--- a/src-bmMailKit/BmMailHeader.h
|
||||
+++ b/src-bmMailKit/BmMailHeader.h
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
// getters:
|
||||
inline bool InitOK() const { return mInitOK; }
|
||||
inline bool IsGroup() const { return mIsGroup; }
|
||||
- inline int32 AddrCount() const { return mAddrList.size(); }
|
||||
+ inline size_t AddrCount() const { return mAddrList.size(); }
|
||||
inline const BmString& GroupName() const
|
||||
{ return mGroupName; }
|
||||
inline BmAddress FirstAddress() const
|
||||
diff --git a/src-bmMailKit/BmStorageUtil.cpp b/src-bmMailKit/BmStorageUtil.cpp
|
||||
index 08ded7b..0789518 100644
|
||||
--- a/src-bmMailKit/BmStorageUtil.cpp
|
||||
+++ b/src-bmMailKit/BmStorageUtil.cpp
|
||||
@@ -307,7 +307,7 @@ bool BmReadStringAttr( const BNode* node, const char* attrName,
|
||||
attr_info attrInfo;
|
||||
BmString tmpStr;
|
||||
if (node->GetAttrInfo( attrName, &attrInfo) == B_OK) {
|
||||
- long long size = std::max( (long long)0, attrInfo.size-1);
|
||||
+ off_t size = std::max( (off_t)0, attrInfo.size-1);
|
||||
char* buf = tmpStr.LockBuffer( int32(size));
|
||||
node->ReadAttr( attrName, B_STRING_TYPE, 0, buf, size_t(size));
|
||||
tmpStr.UnlockBuffer( int32(size));
|
||||
diff --git a/src-filter-addons/src-spam/BmSpamFilter.cpp b/src-filter-addons/src-spam/BmSpamFilter.cpp
|
||||
index cefc0a7..be16d00 100644
|
||||
--- a/src-filter-addons/src-spam/BmSpamFilter.cpp
|
||||
+++ b/src-filter-addons/src-spam/BmSpamFilter.cpp
|
||||
@@ -1055,9 +1055,9 @@ const unsigned long BmSpamFilter::OsbfClassifier
|
||||
const unsigned long BmSpamFilter::OsbfClassifier
|
||||
::MinPmaxPminRatio = 9;
|
||||
|
||||
-const uint32 BmSpamFilter::OsbfClassifier::FeatureBucket
|
||||
+const uint32 BmSpamFilter::OsbfClassifier
|
||||
::ValueMask = 0x0000FFFFLU;
|
||||
-const uint32 BmSpamFilter::OsbfClassifier::FeatureBucket
|
||||
+const uint32 BmSpamFilter::OsbfClassifier
|
||||
::LockedMask = 0x80000000LU;
|
||||
|
||||
const BMessage* BmSpamFilter::OsbfClassifier::mJobSpecs = NULL;
|
||||
diff --git a/src-filter-addons/src-spam/BmSpamFilter.h b/src-filter-addons/src-spam/BmSpamFilter.h
|
||||
index 413cfe0..409705f 100644
|
||||
--- a/src-filter-addons/src-spam/BmSpamFilter.h
|
||||
+++ b/src-filter-addons/src-spam/BmSpamFilter.h
|
||||
@@ -78,14 +78,14 @@ class BmSpamFilter : public BmFilterAddon {
|
||||
bool HashCompare( uint32 h, uint32 k) const
|
||||
{ return hash==h && key==k; }
|
||||
private:
|
||||
- static const uint32 ValueMask;
|
||||
- static const uint32 LockedMask;
|
||||
-
|
||||
uint32 hash;
|
||||
uint32 key;
|
||||
uint32 value;
|
||||
|
||||
} FeatureBucket;
|
||||
+ static const uint32 ValueMask;
|
||||
+ static const uint32 LockedMask;
|
||||
+
|
||||
|
||||
typedef struct
|
||||
{
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 59c83ddde2745bec319d742e5d80350cc2147983 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sun, 30 Jun 2019 00:01:13 +0200
|
||||
Subject: check the messenger is correct
|
||||
|
||||
|
||||
diff --git a/src-bmMailKit/BmDataModel.cpp b/src-bmMailKit/BmDataModel.cpp
|
||||
index 0950b87..c1e1ab7 100644
|
||||
--- a/src-bmMailKit/BmDataModel.cpp
|
||||
+++ b/src-bmMailKit/BmDataModel.cpp
|
||||
@@ -161,7 +161,14 @@ void BmDataModel::TellControllers( BMessage* msg, bool waitForAck) {
|
||||
ModelNameNC()
|
||||
<< ":TellControllers(): Controller found with NULL-handler!"
|
||||
);
|
||||
- BMessenger msgr( controller);
|
||||
+ BMessenger msgr( controller, NULL, &err);
|
||||
+ if (err != B_OK)
|
||||
+ BM_THROW_RUNTIME(
|
||||
+ ModelNameNC()
|
||||
+ << ":TellControllers(): BMessenger() failed for handler "
|
||||
+ << controller->Name() << "!\n\n Result: "
|
||||
+ << strerror(err)
|
||||
+ );
|
||||
BM_LOG2( BM_LogModelController,
|
||||
BmString("Talking to handler ") << (*iter)->ControllerName());
|
||||
if ((err=msgr.SendMessage( msg)) != B_OK)
|
||||
--
|
||||
2.21.0
|
||||
|
||||
Reference in New Issue
Block a user