Build issues for MinWG
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "chfPlugin.h"
|
||||
#include "dbStaticLib.h"
|
||||
@@ -540,7 +541,7 @@ MAIN(chfPluginTest)
|
||||
dbChannel *pch;
|
||||
db_field_log *pfl;
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && (!defined(_MINGW) || __MSVCRT_VERSION__ >= 0x0800)
|
||||
_set_output_format(_TWO_DIGIT_EXPONENT);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
# define MS_InterlockedDecrement64 InterlockedDecrement64
|
||||
# define MS_InterlockedExchange64 InterlockedExchange64
|
||||
# define MS_InterlockedExchangeAdd64 InterlockedExchangeAdd64
|
||||
# define MS_InterlockedCompareExchange InterlockedCompareExchange64
|
||||
# define MS_InterlockedCompareExchange64 InterlockedCompareExchange64
|
||||
#endif
|
||||
|
||||
#include "epicsAtomicMS.h"
|
||||
|
||||
@@ -14,10 +14,15 @@
|
||||
|
||||
int epicsBackTrace(void **buf, int buf_sz)
|
||||
{
|
||||
/* Docs say that (for some windows versions) the sum of
|
||||
* skipped + captured frames must be less than 63
|
||||
*/
|
||||
if ( buf_sz >= 63 )
|
||||
buf_sz = 62;
|
||||
return CaptureStackBackTrace(0, buf_sz, buf, 0);
|
||||
#ifdef CaptureStackBackTrace
|
||||
/* Docs say that (for some windows versions) the sum of
|
||||
* skipped + captured frames must be less than 63
|
||||
*/
|
||||
if ( buf_sz >= 63 )
|
||||
buf_sz = 62;
|
||||
return CaptureStackBackTrace(0, buf_sz, buf, 0);
|
||||
#else
|
||||
/* Older versions of MinGW */
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -23,8 +23,10 @@ epicsShareFunc double epicsStrtod(const char *str, char **endp);
|
||||
* Older compilers have these equivalents though
|
||||
*/
|
||||
|
||||
#define strtoll _strtoi64
|
||||
#define strtoull _strtoui64
|
||||
#ifndef _MINGW
|
||||
# define strtoll _strtoi64
|
||||
# define strtoull _strtoui64
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user