Don't require pdbbase if not linking iocshRegisterCommon commands.
This commit is contained in:
+10
-1
@@ -35,6 +35,11 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
/*
|
||||
* Global link to pdbbase
|
||||
*/
|
||||
epicsShareDef struct dbBase **iocshPpdbbase;
|
||||
|
||||
/*
|
||||
* File-local information
|
||||
*/
|
||||
@@ -273,7 +278,11 @@ cvtArg (const char *filename, int lineno, char *arg, iocshArgBuf *argBuf, const
|
||||
case iocshArgPdbbase:
|
||||
/* Argument must be missing or 0 or pdbbase */
|
||||
if(!arg || !*arg || (*arg == '0') || (strcmp(arg, "pdbbase") == 0)) {
|
||||
argBuf->vval = pdbbase;
|
||||
if(!iocshPpdbbase || !*iocshPpdbbase) {
|
||||
showError (filename, lineno, "pdbbase not present");
|
||||
return 0;
|
||||
}
|
||||
argBuf->vval = *iocshPpdbbase;
|
||||
break;
|
||||
}
|
||||
showError (filename, lineno, "Expecting `pdbbase' got `%s'", arg);
|
||||
|
||||
@@ -70,6 +70,9 @@ epicsShareFunc void epicsShareAPI iocshFree(void);
|
||||
|
||||
epicsShareFunc int epicsShareAPI iocsh(const char *pathname);
|
||||
|
||||
/* 'weak' link to pdbbase */
|
||||
epicsShareExtern struct dbBase **iocshPpdbbase;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <dbAccess.h>
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocCoreLimitsRegister.h"
|
||||
@@ -34,6 +35,7 @@
|
||||
|
||||
void epicsShareAPI iocshRegisterCommon(void)
|
||||
{
|
||||
iocshPpdbbase = &pdbbase;
|
||||
iocCoreLimitsRegister();
|
||||
osiRegister();
|
||||
iocUtilRegister();
|
||||
|
||||
Reference in New Issue
Block a user