X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9409aa35b8437e564b20aa5e3578c91eb996611e..5cf1cb1006d6b5762d96c07ee3892883607460c7:/contrib/src/net/smapi.cpp diff --git a/contrib/src/net/smapi.cpp b/contrib/src/net/smapi.cpp index 059129c515..d5db18bf06 100644 --- a/contrib/src/net/smapi.cpp +++ b/contrib/src/net/smapi.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "smapi.h" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -20,6 +16,8 @@ #pragma hdrstop #endif +#ifdef __WXMSW__ + #ifndef WX_PRECOMP #include "wx/wx.h" #endif @@ -27,7 +25,15 @@ #include "wx/string.h" #include "wx/msw/private.h" +// mapi.h in Cygwin's include directory isn't a full implementation and is +// not sufficient for this lib. However recent versions of Cygwin also +// have another mapi.h in include/w32api which can be used. +// +#ifdef __CYGWIN__ +#include +#else #include +#endif #include "wx/net/smapi.h" @@ -462,7 +468,7 @@ bool wxMapiSession::Send(wxMailMessage& message) if (nAttachmentSize) { #ifdef UNICODE - for (int i = 0;i < nAttachmentSize;i++) + for (i = 0;i < nAttachmentSize;i++) { free(mapiMessage.lpFiles[i].lpszPathName); free(mapiMessage.lpFiles[i].lpszFileName); @@ -473,7 +479,7 @@ bool wxMapiSession::Send(wxMailMessage& message) //Free up the Recipients and Originator memory #ifdef UNICODE - for (int i = 0;i < nRecipIndex;i++) + for (i = 0;i < nRecipIndex;i++) free(mapiMessage.lpRecips[i].lpszName); #endif delete [] mapiMessage.lpRecips; @@ -487,3 +493,5 @@ long wxMapiSession::GetLastError() const { return m_data->m_nLastError; } + +#endif // __WXMSW__