X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnntp%2Fmime%2FMime.cpp;h=0da5a049b3a982d837c08d937859a6c74cba4a84;hb=59a5414ec47a2932a7802fcd1d98c4d80166564f;hp=e79d0595244b69aecddfa36cb8a4182db84398fd;hpb=6b896a9e1dc143bba86795be1e9336549db9b85f;p=fms.git diff --git a/src/nntp/mime/Mime.cpp b/src/nntp/mime/Mime.cpp index e79d059..0da5a04 100644 --- a/src/nntp/mime/Mime.cpp +++ b/src/nntp/mime/Mime.cpp @@ -12,6 +12,14 @@ #include "../../../include/nntp/mime/Mime.h" #include #include +#include +#include + +#ifndef _WIN32 + #define stricmp strcasecmp + #define strnicmp strncasecmp + #define memicmp memcmp +#endif #ifdef _DEBUG #undef THIS_FILE @@ -356,7 +364,7 @@ void CMimeHeader::SetBoundary(const char* pszBoundary/*=NULL*/) char buf[80]; if (!pszBoundary) // generate a new boundary delimeter { - ::srand(((unsigned)::time(NULL)) ^ (unsigned)this); + ::srand(((unsigned)::time(NULL)));// ^ reinterpret_cast(this)); ::sprintf(buf, "__=_Part_Boundary_%03d_%06d.%06d", ++s_nPartNumber, rand(), rand()); if (s_nPartNumber >= 9) s_nPartNumber = 0; @@ -464,7 +472,22 @@ list::iterator CMimeHeader::FindField(const char* pszFieldName) #include #include #include -#include + +#ifdef _WIN32 + #include +#else + #if !defined(__APPLE__) && !defined(__DARWIN__) + #if !defined(__FreeBSD__) && !defined(solaris) && !defined(__sun) + #include + #else + #include + #endif + #endif +#endif + +#ifndef O_BINARY + #define O_BINARY 0 +#endif // initialize the content with text int CMimeBody::SetText(const char* pbText, int nLength/*=0*/)