fixes for vxWorks 6

This commit is contained in:
2016-03-10 10:29:13 +01:00
parent e7d8669b8c
commit bd45ac15e9
3 changed files with 24 additions and 3 deletions
+19 -2
View File
@@ -8,10 +8,16 @@
#include <epicsVersion.h>
#ifdef vxWorks
extern int execute(const char*);
#include "asprintf.h"
#ifdef _WRS_VXWORKS_MAJOR
/* vxWorks 6+ */
#include <private/shellLibP.h>
#else
/* vxWorks 5 */
#include <shellLib.h>
#include "strdup.h"
#endif
#endif
#ifdef BASE_VERSION
#define EPICS_3_13
@@ -288,7 +294,18 @@ int runScript(const char* filename, const char* args)
macPutValue(mac, p, line_raw);
continue;
}
#ifdef vxWorks
#ifdef _WRS_VXWORKS_MAJOR
if (strlen(line_exp) >= 255)
{
fprintf(stderr, "runScript: Line too long (>=255):\n%s\n", line_exp);
return -1;
}
else
{
SHELL_EVAL_VALUE result;
status = shellInterpEvaluate(line_exp, "C", &result);
}
#elif defined(vxWorks)
if (strlen(line_exp) >= 120)
{
fprintf(stderr, "runScript: Line too long (>=120):\n%s\n", line_exp);