IMAP: fixed GCC4 build.

This commit is contained in:
Axel Dörfler
2015-01-08 15:36:47 +01:00
parent f873c092c7
commit 4fe2002b47
3 changed files with 14 additions and 4 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013, Axel Dörfler, [email protected].
* Copyright 2012-2015, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef IMAP_FOLDER_H
@@ -15,6 +15,7 @@
#include <String.h>
class BFile;
class IMAPProtocol;
@@ -94,8 +95,13 @@ private:
size_t& length);
private:
#if __GNUC__ >= 4
typedef __gnu_cxx::hash_map<uint32, uint32> UIDToFlagsMap;
typedef __gnu_cxx::hash_map<uint32, entry_ref> UIDToRefMap;
#else
typedef std::hash_map<uint32, uint32> UIDToFlagsMap;
typedef std::hash_map<uint32, entry_ref> UIDToRefMap;
#endif
IMAPProtocol& fProtocol;
const entry_ref fRef;
@@ -1,5 +1,5 @@
/*
* Copyright 2013, Axel Dörfler, [email protected].
* Copyright 2013-2015, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef IMAP_MAILBOX_H
@@ -53,7 +53,11 @@ protected:
uint32 flags;
uint32 size;
};
#if __GNUC__ >= 4
typedef __gnu_cxx::hash_map<uint32, MessageFlagsAndSize> MessageEntryMap;
#else
typedef std::hash_map<uint32, MessageFlagsAndSize> MessageEntryMap;
#endif
IMAP::Protocol& fProtocol;
BString fMailboxName;
@@ -1,5 +1,5 @@
/*
* Copyright 2013, Axel Dörfler, [email protected].
* Copyright 2013-2015, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*/
@@ -127,7 +127,7 @@ IMAPProtocol::MessageStored(IMAPFolder& folder, entry_ref& ref, BFile& stream,
uint32 fetchFlags, BMessage& attributes)
{
if ((fetchFlags & (IMAP::kFetchHeader | IMAP::kFetchBody))
== IMAP::kFetchHeader | IMAP::kFetchBody) {
== (IMAP::kFetchHeader | IMAP::kFetchBody)) {
ProcessMessageFetched(ref, stream, attributes);
} else if ((fetchFlags & IMAP::kFetchHeader) != 0) {
ProcessHeaderFetched(ref, stream, attributes);