Merged changes from 3.14 branch.
Includes all changes up to rev 12323 on 2012-02-20.
This commit is contained in:
@@ -24,8 +24,8 @@ vpath %.acs $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
|
||||
# dbExpand
|
||||
INSTALL_DBDFLAGS += -I $(INSTALL_DBD)
|
||||
INSTALL_DBFLAGS += -I $(INSTALL_DB)
|
||||
DBDFLAGS = $(USR_DBDFLAGS) -I . -I .. $(INSTALL_DBDFLAGS) $(RELEASE_DBDFLAGS)
|
||||
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) -I. -I.. $(INSTALL_DBFLAGS) $(RELEASE_DBFLAGS)
|
||||
DBDFLAGS = $(USR_DBDFLAGS) -I. -I.. -I$(COMMON_DIR) $(INSTALL_DBDFLAGS) $(RELEASE_DBDFLAGS)
|
||||
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) -I. -I.. -I$(COMMON_DIR) $(INSTALL_DBFLAGS) $(RELEASE_DBFLAGS)
|
||||
|
||||
#####################################################
|
||||
# To allow os specific dbd files AND have the -j option work properly,
|
||||
|
||||
@@ -22,6 +22,7 @@ vpath %.cpp $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
vpath %.C $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
vpath %.rc $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
vpath %.h $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
vpath %.H $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
vpath %.skel.static $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
vpath %.y $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
vpath %.l $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
|
||||
@@ -11,9 +11,6 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = arm
|
||||
|
||||
# Set a special definition for network order of Netwinder ARM floating point
|
||||
ARCH_DEP_CPPFLAGS += -D_ARM_NWFP_
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
GNU_TARGET = arm-linux
|
||||
|
||||
@@ -52,20 +52,6 @@ OP_SYS_CPPFLAGS += -Ddarwin
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
|
||||
#
|
||||
# The following two definitions enable the use of DarwinPorts packages.
|
||||
#
|
||||
OP_SYS_INCLUDES += -I/opt/local/include
|
||||
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
|
||||
OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /opt/local/lib/*))))
|
||||
|
||||
#
|
||||
# The following two definitions enable the use of Fink packages.
|
||||
#
|
||||
OP_SYS_INCLUDES += -I/sw/include
|
||||
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
|
||||
OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /sw/lib/*))))
|
||||
|
||||
#
|
||||
# Libraries for command-line editing.
|
||||
#
|
||||
|
||||
20
configure/os/CONFIG_SITE.darwinCommon.darwinCommon
Normal file
20
configure/os/CONFIG_SITE.darwinCommon.darwinCommon
Normal file
@@ -0,0 +1,20 @@
|
||||
# CONFIG_SITE.darwinCommon.darwinCommon
|
||||
#
|
||||
# $Revision-Id$
|
||||
# This file is maintained by the build community.
|
||||
#
|
||||
# Site specific definitions for darwin builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Uncomment the following two definitions to enable the use of DarwinPorts packages.
|
||||
#
|
||||
#OP_SYS_INCLUDES += -I/opt/local/include
|
||||
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
|
||||
#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /opt/local/lib/*))))
|
||||
|
||||
# Uncomment the following two definitions to enable the use of Fink packages.
|
||||
#
|
||||
#OP_SYS_INCLUDES += -I/sw/include
|
||||
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
|
||||
#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /sw/lib/*))))
|
||||
|
||||
@@ -397,6 +397,11 @@ void udpRecvThread::run ()
|
||||
} while ( ! this->iiu.shutdownCmd );
|
||||
}
|
||||
|
||||
/* for sunpro compiler */
|
||||
udpiiu::M_repeaterTimerNotify::~M_repeaterTimerNotify ()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* udpiiu::M_repeaterTimerNotify::repeaterRegistrationMessage ()
|
||||
*
|
||||
|
||||
@@ -143,6 +143,7 @@ private:
|
||||
public:
|
||||
M_repeaterTimerNotify ( udpiiu & iiu ) :
|
||||
m_udpiiu ( iiu ) {}
|
||||
~M_repeaterTimerNotify (); /* for sunpro compiler */
|
||||
// repeaterTimerNotify
|
||||
void repeaterRegistrationMessage (
|
||||
unsigned attemptNumber );
|
||||
|
||||
@@ -230,6 +230,18 @@ void casStreamIOWakeup::show ( unsigned level ) const
|
||||
printf ( "}\n" );
|
||||
}
|
||||
|
||||
//
|
||||
// casStreamOS::armRecv ()
|
||||
//
|
||||
inline void casStreamOS::armRecv()
|
||||
{
|
||||
if ( ! this->pRdReg ) {
|
||||
if ( ! this->inBufFull() ) {
|
||||
this->pRdReg = new casStreamReadReg ( *this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// casStreamIOWakeup::expire()
|
||||
//
|
||||
@@ -297,18 +309,6 @@ void casStreamIOWakeup::start ( casStreamOS &os )
|
||||
this->pOS->printStatus ( "casStreamIOWakeup tmr start" );
|
||||
}
|
||||
|
||||
//
|
||||
// casStreamOS::armRecv ()
|
||||
//
|
||||
inline void casStreamOS::armRecv()
|
||||
{
|
||||
if ( ! this->pRdReg ) {
|
||||
if ( ! this->inBufFull() ) {
|
||||
this->pRdReg = new casStreamReadReg ( *this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// casStreamOS::disarmRecv ()
|
||||
//
|
||||
|
||||
@@ -969,7 +969,7 @@ long epicsShareAPI dbGetField(DBADDR *paddr,short dbrType,
|
||||
|
||||
case DBR_CHAR:
|
||||
case DBR_UCHAR:
|
||||
if (nRequest && *nRequest > 1) {
|
||||
if (nRequest && *nRequest > 0) {
|
||||
maxlen = *nRequest - 1;
|
||||
break;
|
||||
}
|
||||
@@ -984,8 +984,8 @@ long epicsShareAPI dbGetField(DBADDR *paddr,short dbrType,
|
||||
if (!status) status = dbFindField(&dbEntry, pfldDes->name);
|
||||
if (!status) {
|
||||
rtnString = dbGetString(&dbEntry);
|
||||
strncpy(pbuf, rtnString, maxlen - 1);
|
||||
pbuf[maxlen - 1] = 0;
|
||||
strncpy(pbuf, rtnString, maxlen);
|
||||
pbuf[maxlen] = 0;
|
||||
}
|
||||
dbFinishEntry(&dbEntry);
|
||||
} else {
|
||||
@@ -1028,7 +1028,7 @@ long epicsShareAPI dbGet(DBADDR *paddr, short dbrType,
|
||||
|
||||
case DBR_CHAR:
|
||||
case DBR_UCHAR:
|
||||
if (nRequest && *nRequest > 1) {
|
||||
if (nRequest && *nRequest > 0) {
|
||||
maxlen = *nRequest - 1;
|
||||
break;
|
||||
}
|
||||
@@ -1037,8 +1037,8 @@ long epicsShareAPI dbGet(DBADDR *paddr, short dbrType,
|
||||
return S_db_badDbrtype;
|
||||
}
|
||||
|
||||
strncpy(pbuf, (char *)paddr->pfield, maxlen - 1);
|
||||
pbuf[maxlen - 1] = 0;
|
||||
strncpy(pbuf, (char *)paddr->pfield, maxlen);
|
||||
pbuf[maxlen] = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -416,6 +416,13 @@ static long getCharChar(
|
||||
char *pbuffer = (char *)pto;
|
||||
char *psrc=(char *)(paddr->pfield);
|
||||
|
||||
if (paddr->pfldDes->field_type == DBF_STRING) {
|
||||
/* This is a DBF_STRING field being read as a long string.
|
||||
* The buffer we return must be zero-terminated.
|
||||
*/
|
||||
pbuffer[--nRequest] = 0;
|
||||
if (nRequest == 0) return(0);
|
||||
}
|
||||
if(nRequest==1 && offset==0) {
|
||||
*pbuffer = *psrc;
|
||||
return(0);
|
||||
@@ -436,6 +443,13 @@ static long getCharUchar(
|
||||
unsigned char *pbuffer = (unsigned char *)pto;
|
||||
char *psrc=(char *)(paddr->pfield);
|
||||
|
||||
if (paddr->pfldDes->field_type == DBF_STRING) {
|
||||
/* This is a DBF_STRING field being read as a long string.
|
||||
* The buffer we return must be zero-terminated.
|
||||
*/
|
||||
pbuffer[--nRequest] = 0;
|
||||
if (nRequest == 0) return(0);
|
||||
}
|
||||
if(nRequest==1 && offset==0) {
|
||||
*pbuffer = *psrc;
|
||||
return(0);
|
||||
|
||||
@@ -317,7 +317,7 @@ long epicsShareAPI dbpf(const char *pname,const char *pvalue)
|
||||
if (nameToAddr(pname, &addr)) return -1;
|
||||
/* For enumerated types must allow for ENUM rather than string*/
|
||||
/* If entire field is digits then use DBR_ENUM else DBR_STRING*/
|
||||
if (addr.dbr_field_type == DBR_ENUM && !*pvalue &&
|
||||
if (addr.dbr_field_type == DBR_ENUM && *pvalue &&
|
||||
strspn(pvalue,"0123456789") == strlen(pvalue)) {
|
||||
unsigned short value;
|
||||
|
||||
|
||||
@@ -545,10 +545,19 @@ iocshBody (const char *pathname, const char *commandLine)
|
||||
lineno++;
|
||||
|
||||
/*
|
||||
* Ignore comment lines other than to echo
|
||||
* them if they came from a script.
|
||||
* Skip leading white-space
|
||||
*/
|
||||
if (*raw == '#') {
|
||||
icin = 0;
|
||||
while ((c = raw[icin]) && isspace(c)) {
|
||||
icin++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ignore comment lines other than to echo
|
||||
* them if they came from a script. This
|
||||
* avoids macLib errors from comments.
|
||||
*/
|
||||
if (c == '#') {
|
||||
if ((prompt == NULL) && (commandLine == NULL))
|
||||
puts(raw);
|
||||
continue;
|
||||
@@ -562,15 +571,28 @@ iocshBody (const char *pathname, const char *commandLine)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Echo commands read from scripts
|
||||
* Skip leading white-space coming from a macro
|
||||
*/
|
||||
while ((c = line[icin]) && isspace(c)) {
|
||||
icin++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Echo non-empty lines read from a script
|
||||
*/
|
||||
if ((prompt == NULL) && *line && (commandLine == NULL))
|
||||
puts(line);
|
||||
|
||||
/*
|
||||
* Ignore lines that became a comment or empty after macro expansion
|
||||
*/
|
||||
if (!c || c == '#')
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Break line into words
|
||||
*/
|
||||
icout = icin = 0;
|
||||
icout = 0;
|
||||
inword = 0;
|
||||
argc = 0;
|
||||
quote = EOF;
|
||||
|
||||
@@ -446,7 +446,10 @@ epicsShareFunc epicsThreadBooleanStatus epicsShareAPI epicsThreadHighestPriority
|
||||
epicsShareFunc unsigned int epicsShareAPI
|
||||
epicsThreadGetStackSize ( epicsThreadStackSizeClass stackSizeClass )
|
||||
{
|
||||
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {4000, 6000, 11000};
|
||||
#define STACK_SIZE(f) (f * 0x10000 * sizeof(void *))
|
||||
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {
|
||||
STACK_SIZE(1), STACK_SIZE(2), STACK_SIZE(4)
|
||||
};
|
||||
|
||||
if (stackSizeClass<epicsThreadStackSmall) {
|
||||
fprintf ( stderr,
|
||||
|
||||
@@ -398,9 +398,6 @@ static void epicsThreadInit(void)
|
||||
}
|
||||
|
||||
|
||||
#define ARCH_STACK_FACTOR 1024
|
||||
|
||||
|
||||
epicsShareFunc unsigned int epicsShareAPI epicsThreadGetStackSize (epicsThreadStackSizeClass stackSizeClass)
|
||||
{
|
||||
#if ! defined (_POSIX_THREAD_ATTR_STACKSIZE)
|
||||
@@ -408,8 +405,10 @@ epicsShareFunc unsigned int epicsShareAPI epicsThreadGetStackSize (epicsThreadSt
|
||||
#elif defined (OSITHREAD_USE_DEFAULT_STACK)
|
||||
return 0;
|
||||
#else
|
||||
static const unsigned stackSizeTable[epicsThreadStackBig+1] =
|
||||
{128*ARCH_STACK_FACTOR, 256*ARCH_STACK_FACTOR, 512*ARCH_STACK_FACTOR};
|
||||
#define STACK_SIZE(f) (f * 0x10000 * sizeof(void *))
|
||||
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {
|
||||
STACK_SIZE(1), STACK_SIZE(2), STACK_SIZE(4)
|
||||
};
|
||||
if (stackSizeClass<epicsThreadStackSmall) {
|
||||
errlogPrintf("epicsThreadGetStackSize illegal argument (too small)");
|
||||
return stackSizeTable[epicsThreadStackBig];
|
||||
|
||||
@@ -85,8 +85,13 @@ void testStdoutRedir (const char *report)
|
||||
testOk1(stdout == realStdout);
|
||||
|
||||
errno = 0;
|
||||
if (!testOk1(!fclose(stream)))
|
||||
testDiag("fclose error: %s\n", strerror(errno));
|
||||
if (!testOk1(!fclose(stream))) {
|
||||
testDiag("fclose error: %s", strerror(errno));
|
||||
#ifdef vxWorks
|
||||
testDiag("The above test fails if you don't cd to a writable directory");
|
||||
testDiag("before running the test. The next test will also fail...");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!testOk1((stream = fopen(report, "r")) != NULL)) {
|
||||
testDiag("'%s' could not be opened for reading: %s",
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
/*
|
||||
* Authors: Jeff Hill, Marty Kraimer and Andrew Johnson
|
||||
*/
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/*caMonitor.c*/
|
||||
/* This example accepts a file containing a list of pvs to monitor
|
||||
* It prints a message for all ca evemts: connection, access rights, data
|
||||
|
||||
/* This example accepts the name of a file containing a list of pvs to monitor.
|
||||
* It prints a message for all ca events: connection, access rights and monitor.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -110,18 +112,18 @@ int main(int argc,char **argv)
|
||||
SEVCHK(ca_context_create(ca_disable_preemptive_callback),"ca_context_create");
|
||||
SEVCHK(ca_add_exception_event(exceptionCallback,NULL),
|
||||
"ca_add_exception_event");
|
||||
for(i=0; i<npv; i++) {
|
||||
for (i=0; i<npv; i++) {
|
||||
SEVCHK(ca_create_channel(pname[i],connectionCallback,
|
||||
pmynode[i],20,&pmynode[i]->mychid),
|
||||
"ca_create_channel");
|
||||
SEVCHK(ca_replace_access_rights_event(pmynode[i]->mychid,
|
||||
accessRightsCallback),
|
||||
"ca_replace_access_rights_event");
|
||||
SEVCHK(ca_add_event(DBR_STRING,pmynode[i]->mychid,eventCallback,
|
||||
pmynode[i],&pmynode[i]->myevid),
|
||||
"ca_add_event");
|
||||
SEVCHK(ca_create_subscription(DBR_STRING,1,pmynode[i]->mychid,
|
||||
DBE_VALUE,eventCallback,pmynode[i],&pmynode[i]->myevid),
|
||||
"ca_create_subscription");
|
||||
}
|
||||
/*Should never return from following call*/
|
||||
SEVCHK(ca_pend_event(0.0),"ca_pend_event");
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ my $target = shift @ARGV;
|
||||
my %depends;
|
||||
|
||||
while (my $line = <>) {
|
||||
$depends{$2}++ if $line =~ m/^\s*file\s*(["']?)(.*)\1/;
|
||||
$depends{$1}++ if $line =~ m/^\s*include\s+"(.*)"/;
|
||||
$depends{$2}++ if $line =~ m/^ \s* file \s* (["']?) (\S*) \1 /x;
|
||||
$depends{$1}++ if $line =~ m/^ \s* include \s* "(.*)" /x;
|
||||
}
|
||||
|
||||
if (%depends) {
|
||||
|
||||
Reference in New Issue
Block a user