#include "../../../include/nntp/mime/Mime.h"\r
#include <stdlib.h>\r
#include <time.h>\r
+#include <cstring>\r
+\r
+#ifndef _WIN32\r
+ #define stricmp strcasecmp\r
+ #define strnicmp strncasecmp\r
+ #define memicmp memcmp\r
+#endif\r
\r
#ifdef _DEBUG\r
#undef THIS_FILE\r
char buf[80];\r
if (!pszBoundary) // generate a new boundary delimeter\r
{\r
- ::srand(((unsigned)::time(NULL)) ^ (unsigned)this);\r
+ ::srand(((unsigned)::time(NULL)));// ^ reinterpret_cast<unsigned>(this));\r
::sprintf(buf, "__=_Part_Boundary_%03d_%06d.%06d", ++s_nPartNumber, rand(), rand());\r
if (s_nPartNumber >= 9)\r
s_nPartNumber = 0;\r
#include <fcntl.h>\r
#include <sys/types.h>\r
#include <sys/stat.h>\r
-#include <io.h>\r
+\r
+#ifdef _WIN32\r
+ #include <io.h>\r
+#else\r
+ #if !defined(__APPLE__) && !defined(__DARWIN__)\r
+ #if !defined(__FreeBSD__) && !defined(solaris) && !defined(__sun)\r
+ #include <sys/io.h>\r
+ #else\r
+ #include <stdio.h>\r
+ #endif\r
+ #endif\r
+#endif\r
+\r
+#ifndef O_BINARY\r
+ #define O_BINARY 0\r
+#endif\r
\r
// initialize the content with text\r
int CMimeBody::SetText(const char* pbText, int nLength/*=0*/)\r