Compare commits

..

3 Commits

Author SHA1 Message Date
227bb83f60 fix formats for vxWorks 6.9 2020-09-29 17:40:04 +02:00
4edff374d0 fix some type conversion warning on Windows 2020-09-29 17:39:07 +02:00
9273476135 install missing headers 2020-09-29 17:34:58 +02:00
9 changed files with 30 additions and 15 deletions

View File

@ -25,6 +25,10 @@ HEADERS += src/StreamFormatConverter.h
HEADERS += src/StreamBuffer.h
HEADERS += src/StreamError.h
HEADERS += src/StreamVersion.h
HEADERS += src/StreamProtocol.h
HEADERS += src/StreamBusInterface.h
HEADERS += src/StreamCore.h
HEADERS += src/MacroMagic.h
CPPFLAGS += -DSTREAM_INTERNAL -I$(COMMON_DIR)

View File

@ -24,8 +24,15 @@
#include "StreamError.h"
#include <ctype.h>
#if defined(__vxworks) || defined(vxWorks)
#include <version.h>
#if defined(_WRS_VXWORKS_MAJOR) && _WRS_VXWORKS_MAJOR > 6 || (_WRS_VXWORKS_MAJOR == 6 && _WRS_VXWORKS_MINOR > 8)
#include <stdint.h>
#define PRIX32 "X"
#define PRIu32 "u"
#else
#define PRIX32 "lX"
#define PRIu32 "lu"
#endif
#define PRIX8 "X"
#define SCNx8 "hhx"
#define uint_fast8_t uint8_t

View File

@ -71,6 +71,10 @@ INC += StreamFormatConverter.h
INC += StreamBuffer.h
INC += StreamError.h
INC += StreamVersion.h
INC += StreamProtocol.h
INC += StreamBusInterface.h
INC += StreamCore.h
INC += MacroMagic.h
# switch off annoying rset warnings in 3.16+
CPPFLAGS += -DUSE_TYPED_RSET

View File

@ -171,10 +171,10 @@ static long writeData(dbCommon *record, format_t *format)
break;
#ifdef DBR_INT64
case DBF_INT64:
dval = ((epicsInt64 *)aai->bptr)[nowd];
dval = (double)((epicsInt64 *)aai->bptr)[nowd];
break;
case DBF_UINT64:
dval = ((epicsUInt64 *)aai->bptr)[nowd];
dval = (double)((epicsUInt64 *)aai->bptr)[nowd];
break;
#endif
case DBF_LONG:
@ -214,10 +214,10 @@ static long writeData(dbCommon *record, format_t *format)
{
#ifdef DBR_INT64
case DBF_INT64:
lval = ((epicsInt64 *)aai->bptr)[nowd];
lval = (long)((epicsInt64 *)aai->bptr)[nowd];
break;
case DBF_UINT64:
lval = ((epicsUInt64 *)aai->bptr)[nowd];
lval = (long)((epicsUInt64 *)aai->bptr)[nowd];
break;
#endif
case DBF_LONG:

View File

@ -200,10 +200,10 @@ static long writeData(dbCommon *record, format_t *format)
break;
#ifdef DBR_INT64
case DBF_INT64:
dval = ((epicsInt64 *)aao->bptr)[nowd];
dval = (double)((epicsInt64 *)aao->bptr)[nowd];
break;
case DBF_UINT64:
dval = ((epicsUInt64 *)aao->bptr)[nowd];
dval = (double)((epicsUInt64 *)aao->bptr)[nowd];
break;
#endif
case DBF_LONG:
@ -243,10 +243,10 @@ static long writeData(dbCommon *record, format_t *format)
{
#ifdef DBR_INT64
case DBF_INT64:
lval = ((epicsInt64 *)aao->bptr)[nowd];
lval = (long)((epicsInt64 *)aao->bptr)[nowd];
break;
case DBF_UINT64:
lval = ((epicsUInt64 *)aao->bptr)[nowd];
lval = (long)((epicsUInt64 *)aao->bptr)[nowd];
break;
#endif
case DBF_LONG:

View File

@ -73,7 +73,7 @@ static long readData(dbCommon *record, format_t *format)
if (record->pact) return DO_NOT_CONVERT;
/* In @init handler, no processing, enforce monitor updates. */
ao->omod = ao->oval != val;
ao->orbv = ao->oval = val;
ao->orbv = (epicsInt32)(ao->oval = val);
monitor_mask = recGblResetAlarms(record);
if (!(fabs(ao->mlst - val) <= ao->mdel))
{

View File

@ -37,7 +37,7 @@ static long readData(dbCommon *record, format_t *format)
{
lsi->val[length] = 0;
}
lsi->len = length;
lsi->len = (epicsUInt32)length;
return OK;
}

View File

@ -39,7 +39,7 @@ static long readData(dbCommon *record, format_t *format)
{
lso->val[length] = 0;
}
lso->len = length;
lso->len = (epicsUInt32)length;
if (record->pact) return OK;
/* In @init handler, no processing, enforce monitor updates. */
monitor_mask = recGblResetAlarms(record);

View File

@ -172,10 +172,10 @@ static long writeData(dbCommon *record, format_t *format)
break;
#ifdef DBR_INT64
case DBF_INT64:
dval = ((epicsInt64 *)wf->bptr)[nowd];
dval = (double)((epicsInt64 *)wf->bptr)[nowd];
break;
case DBF_UINT64:
dval = ((epicsUInt64 *)wf->bptr)[nowd];
dval = (double)((epicsUInt64 *)wf->bptr)[nowd];
break;
#endif
case DBF_LONG:
@ -215,10 +215,10 @@ static long writeData(dbCommon *record, format_t *format)
{
#ifdef DBR_INT64
case DBF_INT64:
lval = ((epicsInt64 *)wf->bptr)[nowd];
lval = (long)((epicsInt64 *)wf->bptr)[nowd];
break;
case DBF_UINT64:
lval = ((epicsUInt64 *)wf->bptr)[nowd];
lval = (long)((epicsUInt64 *)wf->bptr)[nowd];
break;
#endif
case DBF_LONG: