From deb238df7dff7248066c3db058a318a1da8a95d7 Mon Sep 17 00:00:00 2001 From: "Alexander G.M. Smith" Date: Sun, 1 Jan 2006 23:59:24 +0000 Subject: [PATCH] Tried to get MDR to compile under Zeta RC3 but to no avail, with lots of brick wall collisions. Along the way I found a few defines that no longer exist in Haiku - changed B_BEOS_VERSION_DANO to use Haiku versions (anyone rebuilding under Dano might want to undo it). By the way, the BeOS version number define system might be worth using, since it's a numerical compare rather than #if defined(V1) || defined (V2) || defined (V3) and so on. What sort of errors? Besides needing libzeta.so for some things, the networking compatibility compile doesn't work (libbind and all that). Some examples among many: In file included from /boot/home/Haiku/src/kits/mail/numailkit.cpp:14: /boot/develop/headers/be/support/Autolock.h:3: using directive `BAutolock' introduced ambiguous type `BAutolock' In file included from /boot/home/Haiku/src/kits/network/compat/libnet/netdebug.c:6: /boot/home/Haiku/headers/private/net/netdebug.h:32: syntax error before `void' git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15775 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/mail/NodeMessage.h | 2 +- src/apps/bemail/BmapButton.cpp | 4 ++-- src/kits/mail/MailAttachment.cpp | 2 +- src/kits/mail/MailComponent.cpp | 8 ++++---- src/kits/mail/NodeMessage.cpp | 2 +- src/servers/mail/NavMenu.h | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/headers/private/mail/NodeMessage.h b/headers/private/mail/NodeMessage.h index 50a4011a9a..302d5cf00a 100644 --- a/headers/private/mail/NodeMessage.h +++ b/headers/private/mail/NodeMessage.h @@ -23,7 +23,7 @@ #include #include -#ifdef B_BEOS_VERSION_DANO +#if defined(HAIKU_TARGET_PLATFORM_DANO) || defined(HAIKU_TARGET_PLATFORM_HAIKU) #define _IMPEXP_MAIL #endif diff --git a/src/apps/bemail/BmapButton.cpp b/src/apps/bemail/BmapButton.cpp index 33bb505006..f01962227a 100644 --- a/src/apps/bemail/BmapButton.cpp +++ b/src/apps/bemail/BmapButton.cpp @@ -44,7 +44,7 @@ All rights reserved. #include -#ifndef B_BEOS_VERSION_DANO +#if defined(HAIKU_TARGET_PLATFORM_BEOS) || defined(HAIKU_TARGET_PLATFORM_BONE) static rgb_color mix_color(rgb_color color1, rgb_color color2, float portion) { @@ -61,7 +61,7 @@ disable_color(rgb_color color, rgb_color background) { return mix_color(color, background, .5); } -#endif // #ifndef B_BEOS_VERSION_DANO +#endif // #if older versions of BeOS, like R5. BList BmapButton::fBitmapCache; BLocker BmapButton::fBmCacheLock; diff --git a/src/kits/mail/MailAttachment.cpp b/src/kits/mail/MailAttachment.cpp index e02b071279..e428a75e8c 100644 --- a/src/kits/mail/MailAttachment.cpp +++ b/src/kits/mail/MailAttachment.cpp @@ -619,7 +619,7 @@ status_t BAttributedMailAttachment::SetToRFC822(BPositionIO *data, size_t length status_t BAttributedMailAttachment::RenderToRFC822(BPositionIO *render_to) { BMallocIO *io = new BMallocIO; -#if B_BEOS_VERSION_DANO +#if defined(HAIKU_TARGET_PLATFORM_DANO) || defined(HAIKU_TARGET_PLATFORM_HAIKU) const #endif char *name; diff --git a/src/kits/mail/MailComponent.cpp b/src/kits/mail/MailComponent.cpp index 4363b8d343..a7d62ffb21 100644 --- a/src/kits/mail/MailComponent.cpp +++ b/src/kits/mail/MailComponent.cpp @@ -141,7 +141,7 @@ void BMailComponent::SetHeaderField(const char *key, BMessage *structure, bool r const char *name, *sub_val; type_code type; for (int32 i = 0; structure->GetInfo(B_STRING_TYPE,i, - #ifndef B_BEOS_VERSION_DANO + #if defined(HAIKU_TARGET_PLATFORM_BEOS) || defined(HAIKU_TARGET_PLATFORM_BONE) (char**) #endif &name,&type) == B_OK; i++) @@ -236,7 +236,7 @@ status_t BMailComponent::RemoveHeader(const char *key) { } const char *BMailComponent::HeaderAt(int32 index) { -#if B_BEOS_VERSION_DANO +#if !(defined(HAIKU_TARGET_PLATFORM_BEOS) || defined(HAIKU_TARGET_PLATFORM_BONE)) const #endif char *name = NULL; @@ -276,8 +276,8 @@ BMailComponent::RenderToRFC822(BPositionIO *render_to) { headers.FindInt8 (kHeaderEncodingString, &encoding); for (int32 index = 0; headers.GetInfo(B_STRING_TYPE,index, -#ifndef B_BEOS_VERSION_DANO - (char**) +#if defined(HAIKU_TARGET_PLATFORM_BEOS) || defined(HAIKU_TARGET_PLATFORM_BONE) + (const char**) #endif &key,&stupidity_personified,&count) == B_OK; index++) { for (int32 g = 0; g < count; g++) { diff --git a/src/kits/mail/NodeMessage.cpp b/src/kits/mail/NodeMessage.cpp index c95bb1e0ba..25446441ad 100644 --- a/src/kits/mail/NodeMessage.cpp +++ b/src/kits/mail/NodeMessage.cpp @@ -19,7 +19,7 @@ */ _EXPORT BNode& operator<<(BNode& n, const BMessage& m) { - #ifdef B_BEOS_VERSION_DANO + #if !(defined(HAIKU_TARGET_PLATFORM_BEOS) || defined(HAIKU_TARGET_PLATFORM_BONE)) const #endif char *name; diff --git a/src/servers/mail/NavMenu.h b/src/servers/mail/NavMenu.h index d9aeb2f4d8..8ba3ca2006 100644 --- a/src/servers/mail/NavMenu.h +++ b/src/servers/mail/NavMenu.h @@ -142,7 +142,7 @@ protected: // Spring Loaded Folder convenience routines // used in both Tracker and Deskbar -#if B_BEOS_VERSION_DANO +#if !(defined(HAIKU_TARGET_PLATFORM_BEOS) || defined(HAIKU_TARGET_PLATFORM_BONE)) #define _IMPEXP_TRACKER #endif _IMPEXP_TRACKER bool SpringLoadedFolderCompareMessages(const BMessage *incoming, @@ -153,7 +153,7 @@ _IMPEXP_TRACKER void SpringLoadedFolderAddUniqueTypeToList(entry_ref *ref, BObjectList *typeslist); _IMPEXP_TRACKER void SpringLoadedFolderCacheDragData(const BMessage *incoming, BMessage **, BObjectList **typeslist); -#if B_BEOS_VERSION_DANO +#if !(defined(HAIKU_TARGET_PLATFORM_BEOS) || defined(HAIKU_TARGET_PLATFORM_BONE)) #undef _IMPEXP_TRACKER #endif