Updated mail libmail.so compile and IMAP add-on to use the new build system

and work under both R5 and Haiku (didn't test Bone/Dano but they should work
too).  Still have SMTP, POP3 and a few other things to fix up, but ran out
of time again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14625 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander G.M. Smith
2005-11-02 03:46:50 +00:00
parent ef5fcc0637
commit 7f9c73dbd5
3 changed files with 15 additions and 17 deletions
@@ -4,9 +4,9 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
if $(TARGET_PLATFORM) != haiku { if $(TARGET_PLATFORM) != haiku {
UsePublicHeaders mail ; UsePublicHeaders mail ;
UsePublicHeaders [ FDirName add-ons mail_daemon ] ;
} }
UsePublicHeaders [ FDirName add-ons mail_daemon ] ;
UsePrivateHeaders mail ; UsePrivateHeaders mail ;
SubDirHdrs [ FDirName $(HAIKU_TOP) headers os add-ons mail_daemon ] ; SubDirHdrs [ FDirName $(HAIKU_TOP) headers os add-ons mail_daemon ] ;
@@ -16,12 +16,6 @@ if $(USESSL) {
SubDirHdrs [ FDirName / boot home config include ] ; SubDirHdrs [ FDirName / boot home config include ] ;
} }
if $(BONE_COMPATIBLE) {
SubDirC++Flags -DBONE ;
} else {
SubDirC++Flags -DBUILDING_R5_LIBNET ;
}
Addon IMAP : mail_daemon inbound_protocols : Addon IMAP : mail_daemon inbound_protocols :
imap_client.cpp imap_client.cpp
imap_config.cpp imap_config.cpp
@@ -20,9 +20,11 @@
#include <ctype.h> #include <ctype.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/select.h> #ifndef HAIKU_TARGET_PLATFORM_BEOS // These headers don't exist in BeOS R5.
#include <arpa/inet.h>
#include <sys/select.h>
#endif
#ifdef USESSL #ifdef USESSL
#include <openssl/ssl.h> #include <openssl/ssl.h>
@@ -160,7 +162,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
return; return;
} }
#ifdef BONE #ifndef HAIKU_TARGET_PLATFORM_BEOS
net = socket(AF_INET, SOCK_STREAM, 0); net = socket(AF_INET, SOCK_STREAM, 0);
#else #else
net = socket(AF_INET, 2, 0); net = socket(AF_INET, 2, 0);
@@ -173,7 +175,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
saAddr.sin_addr.s_addr = hostIP; saAddr.sin_addr.s_addr = hostIP;
int result = connect(net, (struct sockaddr *) &saAddr, sizeof(saAddr)); int result = connect(net, (struct sockaddr *) &saAddr, sizeof(saAddr));
if (result < 0) { if (result < 0) {
#ifdef BONE #ifndef HAIKU_TARGET_PLATFORM_BEOS
close(net); close(net);
#else #else
closesocket(net); closesocket(net);
@@ -222,7 +224,7 @@ IMAP4Client::IMAP4Client(BMessage *settings, BMailChainRunner *run) : BRemoteMai
error << ". (SSL Connection Error)"; error << ". (SSL Connection Error)";
runner->ShowError(error.String()); runner->ShowError(error.String());
SSL_CTX_free(ctx); SSL_CTX_free(ctx);
#ifdef BONE #ifndef HAIKU_TARGET_PLATFORM_BEOS
close(net); close(net);
#else #else
closesocket(net); closesocket(net);
@@ -293,7 +295,7 @@ IMAP4Client::~IMAP4Client() {
} }
#endif #endif
#ifdef BONE #ifndef HAIKU_TARGET_PLATFORM_BEOS
close(net); close(net);
#else #else
closesocket(net); closesocket(net);
@@ -966,7 +968,7 @@ IMAP4Client::ReceiveLine(BString &out)
SSL_CTX_free(ctx); SSL_CTX_free(ctx);
} }
#endif #endif
#ifdef BONE #ifndef HAIKU_TARGET_PLATFORM_BEOS
close(net); close(net);
#else #else
closesocket(net); closesocket(net);
@@ -1050,7 +1052,7 @@ int IMAP4Client::GetResponse(BString &tag, NestedString *parsed_response, bool r
SSL_CTX_free(ctx); SSL_CTX_free(ctx);
} }
#endif #endif
#ifdef BONE #ifndef HAIKU_TARGET_PLATFORM_BEOS
close(net); close(net);
#else #else
closesocket(net); closesocket(net);
+4 -2
View File
@@ -2,9 +2,11 @@ SubDir HAIKU_TOP src kits mail ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
if $(TARGET_PLATFORM) != haiku {
UsePublicHeaders mail ;
}
UsePrivateHeaders mail ; UsePrivateHeaders mail ;
UsePublicHeaders [ FDirName add-ons mail_daemon ] ;
SubDirHdrs [ FDirName $(HAIKU_TOP) headers os add-ons mail_daemon ] ;
if $(CHECK_MALLOC) { if $(CHECK_MALLOC) {
SubDirC++Flags -D_NO_INLINE_ASM -fcheck-memory-usage ; SubDirC++Flags -D_NO_INLINE_ASM -fcheck-memory-usage ;