real mingw fix

This commit is contained in:
Patrick von Reth 2011-01-02 15:08:33 +01:00
parent 674e37de23
commit 38a4c0d4fd
2 changed files with 12 additions and 12 deletions

View File

@ -47,18 +47,16 @@
#include "SnarlInterface.h"
namespace Snarl {
namespace V41 {
// workaround for mingw-w64 bug
#ifdef __GNUC__
inline errno_t strncat_s( char *strDest, size_t bufferSizeInBytes, const char *strSource, size_t count){
strncat(strDest,strSource,count);
return 0;
}
#endif //__GNUC__
#ifdef __MINGW64_VERSION_MAJOR
extern "C" {
__declspec(dllimport) errno_t __cdecl strncat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
}
#endif //__MINGW64_VERSION_MAJOR
namespace Snarl {
namespace V41 {
//-----------------------------------------------------------------------------
// Constructor/Destructor

View File

@ -1,10 +1,12 @@
#ifndef SNARL_INTERFACE_V41
#define SNARL_INTERFACE_V41
#define MINGW_HAS_SECURE_API
#ifdef __MINGW32__
#define MINGW_HAS_SECURE_API
#endif
#include <tchar.h>
#include <windows.h>
#include <tchar.h>
#include <cstdio>
#ifndef SMTO_NOTIMEOUTIFNOTHUNG