diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 711da3434..8c6cac578 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -197,7 +197,7 @@ endif $(TESTPRODNAME) $(PRODNAME): $(PRODUCT_OBJS) $(PROD_RESS) $(PROD_DEPLIBS) -$(TESTPRODNAME) $(PRODNAME):%$(EXE): +$(TESTPRODNAME) $(PRODNAME): %$(EXE): @$(RM) $@ $(DEBUGCMD) $(LINK.cpp) $(MT_EXE_COMMAND) @@ -218,15 +218,21 @@ $(TESTPRODNAME) $(PRODNAME):%$(EXE): @$(RM) $@ $(HDEPENDS.cpp) $< -%$(OBJ): %.c +# Cancel GNUMake's built-in rules, which don't have our _INC +# dependencies so could get used in some circumstances (gdd) +%.o : %.c +%.o : %.cc +%.o : %.cpp + +%$(OBJ): %.c $(COMMON_INC) $(INSTALL_INC) @$(RM) $@ $(COMPILE.c) -c $< -%$(OBJ): %.cc +%$(OBJ): %.cc $(COMMON_INC) $(INSTALL_INC) @$(RM) $@ $(COMPILE.cpp) -c $< -%$(OBJ): %.cpp +%$(OBJ): %.cpp $(COMMON_INC) $(INSTALL_INC) @$(RM) $@ $(COMPILE.cpp) -c $< diff --git a/configure/os/CONFIG.Common.solaris-sparc b/configure/os/CONFIG.Common.solaris-sparc index 7e8788048..eff24fca5 100644 --- a/configure/os/CONFIG.Common.solaris-sparc +++ b/configure/os/CONFIG.Common.solaris-sparc @@ -20,12 +20,11 @@ COMPILER_LDFLAGS += -mt SOLARIS_VERSION = $(subst 5.,,$(shell uname -r)) -POSIX_CPPFLAGS += -D_POSIX_C_SOURCE=200112L $(POSIX_CPPFLAGS_$(SOLARIS_VERSION)) -POSIX_CPPFLAGS += -D_XOPEN_SOURCE=500 -POSIX_LDLIBS += -lposix4 -lpthread $(POSIX_LDLIBS_$(SOLARIS_VERSION)) +POSIX_CFLAGS = -xc99 -D_POSIX_C_SOURCE=200112L +POSIX_LDLIBS += -lposix4 -lpthread OP_SYS_CPPFLAGS += -DSOLARIS=$(SOLARIS_VERSION) $(COMPILER_CPPFLAGS) -OP_SYS_LDFLAGS += $(COMPILER_LDFLAGS) +OP_SYS_LDFLAGS += $(COMPILER_LDFLAGS) # Set runtime path for shared libraries SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-R%) diff --git a/configure/os/CONFIG.Common.solaris-sparc-gnu b/configure/os/CONFIG.Common.solaris-sparc-gnu index e1b7e4b28..83427e995 100644 --- a/configure/os/CONFIG.Common.solaris-sparc-gnu +++ b/configure/os/CONFIG.Common.solaris-sparc-gnu @@ -9,13 +9,15 @@ # Include definitions common to all solaris-sparc target archs include $(CONFIG)/os/CONFIG.Common.solaris-sparc -# CONFIG.Common.solaris-sparc -COMPILER_CPPFLAGS = -D_REENTRANT +COMPILER_CPPFLAGS = -D_REENTRANT + +POSIX_CFLAGS = -std=gnu99 -D_POSIX_C_SOURCE=200112L STLPORT_LDLIBS_NO = OP_SYS_LDLIBS_8 = -ldl OP_SYS_LDLIBS_9 = -ldl OP_SYS_LDLIBS_10 = +OP_SYS_LDLIBS_11 = -lc diff --git a/configure/os/CONFIG.Common.solaris-x86 b/configure/os/CONFIG.Common.solaris-x86 index e3632a7bc..3c78b0631 100644 --- a/configure/os/CONFIG.Common.solaris-x86 +++ b/configure/os/CONFIG.Common.solaris-x86 @@ -20,9 +20,8 @@ COMPILER_LDFLAGS += -mt SOLARIS_VERSION = $(subst 5.,,$(shell uname -r)) -POSIX_CPPFLAGS += -D_POSIX_C_SOURCE=200112L $(POSIX_CPPFLAGS_$(SOLARIS_VERSION)) -POSIX_CPPFLAGS += -D_XOPEN_SOURCE=500 -POSIX_LDLIBS += -lposix4 -lpthread $(POSIX_LDLIBS_$(SOLARIS_VERSION)) +POSIX_CFLAGS = -xc99 -D_POSIX_C_SOURCE=200112L +POSIX_LDLIBS += -lposix4 -lpthread OP_SYS_CPPFLAGS += -DSOLARIS=$(SOLARIS_VERSION) $(COMPILER_CPPFLAGS) OP_SYS_LDFLAGS += $(COMPILER_LDFLAGS) @@ -53,6 +52,7 @@ OP_SYS_LDLIBS += -lsocket -lnsl OP_SYS_LDLIBS_8 += -ldl -lCrun -lc OP_SYS_LDLIBS_9 += -ldl -lCrun -lc OP_SYS_LDLIBS_10 += -lCrun -lc +OP_SYS_LDLIBS_11 += -lCrun -lc OP_SYS_LDLIBS += $(OP_SYS_LDLIBS_$(SOLARIS_VERSION)) OP_SYS_LDLIBS += $(STLPORT_LDLIBS_$(USE_STLPORT)) diff --git a/configure/os/CONFIG.Common.solaris-x86-gnu b/configure/os/CONFIG.Common.solaris-x86-gnu index ce4fae0ad..6f024289c 100644 --- a/configure/os/CONFIG.Common.solaris-x86-gnu +++ b/configure/os/CONFIG.Common.solaris-x86-gnu @@ -12,9 +12,12 @@ include $(CONFIG)/os/CONFIG.Common.solaris-x86 COMPILER_CPPFLAGS = -D_REENTRANT +POSIX_CFLAGS = -std=gnu99 -D_POSIX_C_SOURCE=200112L + STLPORT_LDLIBS_NO = OP_SYS_LDLIBS_8 = -ldl -lc OP_SYS_LDLIBS_9 = -ldl -lc OP_SYS_LDLIBS_10 = -lc +OP_SYS_LDLIBS_11 = -lc diff --git a/configure/os/CONFIG.Common.vxWorks-486 b/configure/os/CONFIG.Common.vxWorks-486 index a849735ce..b048a2be4 100644 --- a/configure/os/CONFIG.Common.vxWorks-486 +++ b/configure/os/CONFIG.Common.vxWorks-486 @@ -11,14 +11,13 @@ include $(CONFIG)/os/CONFIG.Common.vxWorksCommon # Vx GNU cross compiler suffix -CMPLR_SUFFIX = 386 +CMPLR_SUFFIX = pentium -ARCH_CLASS = pc486 +ARCH_CLASS = x86 -ARCH_DEP_CPPFLAGS = -DCPU=I80486 -D_X86_ -ARCH_DEP_CFLAGS = -m486 -ARCH_DEP_CXXFLAGS += -x 'c++' -ARCH_DEP_CFLAGS += -fno-defer-pop +ARCH_DEP_CPPFLAGS = -DCPU=I80486 -D_X86_ +ARCH_DEP_CFLAGS = -mtune=i486 -march=i486 +ARCH_DEP_CFLAGS += -fno-zero-initialized-in-bss -fno-defer-pop # Allow site overrides -include $(CONFIG)/os/CONFIG_SITE.Common.vxWorks-486 diff --git a/configure/os/CONFIG.Common.vxWorks-pentium b/configure/os/CONFIG.Common.vxWorks-pentium index 324682a97..abec33c6a 100644 --- a/configure/os/CONFIG.Common.vxWorks-pentium +++ b/configure/os/CONFIG.Common.vxWorks-pentium @@ -11,12 +11,14 @@ include $(CONFIG)/os/CONFIG.Common.vxWorksCommon # Vx GNU cross compiler suffix -CMPLR_SUFFIX = 386 - -ARCH_CLASS = pcPentium +CMPLR_SUFFIX = pentium -ARCH_DEP_CPPFLAGS = -DCPU=PENTIUM -D_X86_ -ARCH_DEP_CFLAGS = -mpentium -ARCH_DEP_CXXFLAGS += -x 'c++' -ARCH_DEP_CFLAGS += -fno-defer-pop +ARCH_CLASS = x86 + +ARCH_DEP_CPPFLAGS = -DCPU=PENTIUM -D_X86_ +ARCH_DEP_CFLAGS = -mtune=pentium -march=pentium +ARCH_DEP_CFLAGS += -fno-zero-initialized-in-bss -fno-defer-pop + +# Allow site overrides +-include $(CONFIG)/os/CONFIG_SITE.Common.vxWorks-pentium diff --git a/configure/os/CONFIG.solarisCommon.solarisCommon b/configure/os/CONFIG.solarisCommon.solarisCommon index ef9d0d59e..c864a34f0 100644 --- a/configure/os/CONFIG.solarisCommon.solarisCommon +++ b/configure/os/CONFIG.solarisCommon.solarisCommon @@ -12,6 +12,8 @@ CMPLR_CLASS = solStudio SPARCWORKS = /opt/SUNWspro GNU = NO +# SPARCWORKS path is set in a CONFIG_SITE file + CC = $(SPARCWORKS)/bin/cc CCC = $(SPARCWORKS)/bin/CC CPP = $(CC) -E -Qn diff --git a/configure/os/CONFIG_SITE.Common.solaris-sparc b/configure/os/CONFIG_SITE.Common.solaris-sparc index 95d9b42d2..851254203 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-sparc +++ b/configure/os/CONFIG_SITE.Common.solaris-sparc @@ -5,11 +5,12 @@ # Site Specific definitions for solaris-sparc target # Only the local epics system manager should modify this file -# If readline is installed uncomment the following macro definition -# to include command-line editing and history support -# +# location of the Solaris Studio (was SunPro) compilers +SPARCWORKS = /opt/SUNWspro +#SPARCWORKS = /opt/solarisstudio12.3 -# Readline library provides command-line editing and history in IOC shell +# If readline is installed, uncomment the following macro definition +# to use it for command-line editing and history support #COMMANDLINE_LIBRARY = READLINE # Use stLport library instead of default Cstd library diff --git a/configure/os/CONFIG_SITE.Common.solaris-x86 b/configure/os/CONFIG_SITE.Common.solaris-x86 new file mode 100644 index 000000000..2a972d9cb --- /dev/null +++ b/configure/os/CONFIG_SITE.Common.solaris-x86 @@ -0,0 +1,11 @@ +# CONFIG_SITE.Common.solaris-x86 +# +# $Revision-Id$ +# +# Site Specific definitions for solaris-x86 targets +# Only the local epics system manager should modify this file + +# location of the Solaris Studio (was SunPro) compilers +SPARCWORKS = /opt/SUNWspro +#SPARCWORKS = /opt/solarisstudio12.3 + diff --git a/configure/os/CONFIG_SITE.Common.solaris-x86_64 b/configure/os/CONFIG_SITE.Common.solaris-x86_64 index 315b93597..ce173608d 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-x86_64 +++ b/configure/os/CONFIG_SITE.Common.solaris-x86_64 @@ -5,7 +5,7 @@ # Site Specific definitions for solaris-x86_64 target # Only the local epics system manager should modify this file -# Include definitions common to all solaris-x86_64 target archs +# Include definitions common to all solaris-x86 target archs -include $(CONFIG)/os/CONFIG_SITE.Common.solaris-x86 COMMANDLINE_LIBRARY = EPICS diff --git a/configure/os/CONFIG_SITE.solaris-sparc.Common b/configure/os/CONFIG_SITE.solaris-sparc.Common index d78cdadda..a7398dbcf 100644 --- a/configure/os/CONFIG_SITE.solaris-sparc.Common +++ b/configure/os/CONFIG_SITE.solaris-sparc.Common @@ -4,7 +4,4 @@ # # Site specific override definitions for solaris-sparc host builds # Only the local epics system manager should modify this file - -#INSTALL_LOCATION = /home/phoebus/JBA/testBaseNew -#CROSS_COMPILER_TARGET_ARCHS += vxWorks-ppc604 vxWorks-ppc603 vxWorks-68040 diff --git a/src/ca/client/CAref.html b/src/ca/client/CAref.html index c198ed56a..bdfa33376 100644 --- a/src/ca/client/CAref.html +++ b/src/ca/client/CAref.html @@ -631,7 +631,7 @@ standard out for each CA client beacon anomaly detect event.
See also When a Client Does not See the Server's Beacon.
-The rate at which name resolution (search) requests are sent exponentially @@ -896,9 +896,9 @@ feature.
See also Routing Restrictions on vxWorks Systems.
An application that uses the CA client library functions described in this document will need to include the cadef.h header files as follows.
@@ -910,7 +910,7 @@ many other header files (operating system specific and otherwise), and therefore the application must also specify "<EPICS base>/include/os/<arch>" in its header file search path. -An application that uses the Channel Access Client Library functions described in this document will need to link with the EPICS CA Client Library @@ -956,7 +956,7 @@ and Windows systems.
The above libraries are located in "<EPICS base>/lib/<architechture>".
-If you do not use the EPICS build environment (layered make files) then it @@ -1641,7 +1641,7 @@ etc.
-excas [options]
@@ -1933,7 +1933,7 @@ made to build a new circuit. This behavior could result in undesirable resource consumption resulting from periodic circuit setup and teardown overhead (thrashing) during periods of CPU / network / IP kernel buffer congestion. -Short lived CA client applications that issue a CA put request and then @@ -2555,7 +2555,7 @@ questionable practice for the following reasons.
is the same behavior as on all other OS. -As you might expect, it isnt safe to call the CA client library from a POSIX
diff --git a/src/ca/client/getCallback.cpp b/src/ca/client/getCallback.cpp
index 05e654e30..0fc050043 100644
--- a/src/ca/client/getCallback.cpp
+++ b/src/ca/client/getCallback.cpp
@@ -57,9 +57,9 @@ void getCallback::completion (
// fetch client context and destroy prior to releasing
// the lock and calling cb in case they destroy channel there
this->chan.getClientCtx().destroyGetCallback ( guard, *this );
- {
+ if ( pFuncTmp ) {
epicsGuardRelease < epicsMutex > unguard ( guard );
- ( *pFuncTmp ) ( args );
+ pFuncTmp ( args );
}
}
diff --git a/src/ca/client/oldChannelNotify.cpp b/src/ca/client/oldChannelNotify.cpp
index d8c259040..5775bcc6b 100644
--- a/src/ca/client/oldChannelNotify.cpp
+++ b/src/ca/client/oldChannelNotify.cpp
@@ -343,6 +343,9 @@ int epicsShareAPI ca_array_get_callback ( chtype type,
if ( type < 0 ) {
return ECA_BADTYPE;
}
+ if ( pfunc == NULL ) {
+ return ECA_BADFUNCPTR;
+ }
unsigned tmpType = static_cast < unsigned > ( type );
epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () );
@@ -416,6 +419,9 @@ int epicsShareAPI ca_array_put_callback ( chtype type, arrayElementCount count,
if ( type < 0 ) {
return ECA_BADTYPE;
}
+ if ( pfunc == NULL ) {
+ return ECA_BADFUNCPTR;
+ }
epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () );
pChan->eliminateExcessiveSendBacklog ( guard );
unsigned tmpType = static_cast < unsigned > ( type );
diff --git a/src/ca/client/perl/CA.pm b/src/ca/client/perl/CA.pm
index 31f09f9fb..48297162c 100644
--- a/src/ca/client/perl/CA.pm
+++ b/src/ca/client/perl/CA.pm
@@ -638,7 +638,7 @@ not follow this pattern, but are still printable strings.
=item [1] R3.14 Channel Access Reference Manual by Jeffrey O. Hill
-L