replaced symFindByNameMips with symFindByNameEPICS
This commit is contained in:
@@ -10,7 +10,8 @@ ifeq ($(strip $(TORNADO)),NO)
|
||||
SRCS.c += ../ldpp.c
|
||||
endif
|
||||
|
||||
LIBOBJS = veclist.o iocLogClient.o
|
||||
LIBOBJS = veclist.o iocLogClient.o \
|
||||
symFindByNameEPICS.o symFindByNameAndTypeEPICS.o
|
||||
|
||||
#
|
||||
# Tornado supplies this
|
||||
@@ -19,9 +20,6 @@ ifeq ($(strip $(TORNADO)),NO)
|
||||
LIBOBJS += ldpp.o
|
||||
endif
|
||||
|
||||
LIBOBJS_mips = symFindByNameMips.o
|
||||
|
||||
|
||||
LIBNAME = vxComLib
|
||||
|
||||
#
|
||||
|
||||
35
src/libvxWorks/symFindByNameAndTypeEPICS.c
Normal file
35
src/libvxWorks/symFindByNameAndTypeEPICS.c
Normal file
@@ -0,0 +1,35 @@
|
||||
/* $Id$
|
||||
*
|
||||
* On various RISC processors (at least MIPS and PPC), symbols do not have
|
||||
* the prepended underscore. Here we redefine symFindByNameAndType so that,
|
||||
* if the name lookup fails and if the first character of the name is "_",
|
||||
* the lookup is repeated starting at the second character of the name string.
|
||||
*
|
||||
* 01a,03jun98,wfl created (from symFindByNameEPICS.c).
|
||||
*/
|
||||
|
||||
#ifdef symFindByNameAndType
|
||||
#undef symFindByNameAndType
|
||||
#endif
|
||||
|
||||
#include "vxWorks.h"
|
||||
#include "symLib.h"
|
||||
|
||||
STATUS symFindByNameAndTypeEPICS( SYMTAB_ID symTblId,
|
||||
char *name,
|
||||
char **pvalue,
|
||||
SYM_TYPE *pType,
|
||||
SYM_TYPE sType,
|
||||
SYM_TYPE mask )
|
||||
{
|
||||
STATUS status;
|
||||
|
||||
status = symFindByNameAndType( symTblId, name, pvalue,
|
||||
pType, sType, mask );
|
||||
|
||||
if ( status == ERROR && name[0] == '_' )
|
||||
status = symFindByNameAndType( symTblId, (name+1), pvalue,
|
||||
pType, sType, mask );
|
||||
|
||||
return status;
|
||||
}
|
||||
38
src/libvxWorks/symFindByNameEPICS.c
Normal file
38
src/libvxWorks/symFindByNameEPICS.c
Normal file
@@ -0,0 +1,38 @@
|
||||
/* $Id$
|
||||
*
|
||||
* Comments from original version:
|
||||
* On the MIPS processor, all symbols do not have the prepended underscore.
|
||||
* Here we redefine symFindByName to look at the second character of the
|
||||
* name string.
|
||||
*
|
||||
* On various RISC processors (at least MIPS and PPC), symbols do not have
|
||||
* the prepended underscore. Here we redefine symFindByName so that, if the
|
||||
* name lookup fails and if the first character of the name is "_", the
|
||||
* lookup is repeated starting at the second character of the name string.
|
||||
*
|
||||
* 01a,08apr97,bdg created.
|
||||
* 02a,03apr97,npr changed from mips.h into symFindByNameMips.c
|
||||
* 03a,03jun98,wfl changed Mips -> EPICS and avoid architecture knowledge
|
||||
*/
|
||||
|
||||
#ifdef symFindByName
|
||||
#undef symFindByName
|
||||
#endif
|
||||
|
||||
#include "vxWorks.h"
|
||||
#include "symLib.h"
|
||||
|
||||
STATUS symFindByNameEPICS( SYMTAB_ID symTblId,
|
||||
char *name,
|
||||
char **pvalue,
|
||||
SYM_TYPE *pType )
|
||||
{
|
||||
STATUS status;
|
||||
|
||||
status = symFindByName( symTblId, name, pvalue, pType );
|
||||
|
||||
if ( status == ERROR && name[0] == '_' )
|
||||
status = symFindByName( symTblId, (name+1), pvalue, pType );
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* This file is included in to change the VxWorks function symFindByName().
|
||||
* On the MIPS processor, all symbols do not have the prepended underscore.
|
||||
* Here we redefine symFindByName to look at the second character of the
|
||||
* name string.
|
||||
*
|
||||
* 01a,08apr97,bdg created.
|
||||
* 02a,03apr97,npr changed from mips.h into symFindByNameMips.c
|
||||
*/
|
||||
|
||||
#ifdef symFindByName
|
||||
#undef symFindByName
|
||||
#endif
|
||||
|
||||
#include "vxWorks.h"
|
||||
#include "symLib.h"
|
||||
|
||||
STATUS symFindByNameMips( SYMTAB_ID symTblId,
|
||||
char *name,
|
||||
char **pvalue,
|
||||
SYM_TYPE *pType )
|
||||
{
|
||||
return symFindByName(symTblId, (name+1), pvalue, pType );
|
||||
}
|
||||
Reference in New Issue
Block a user