From f18b435cf682a82ed44e3ec4887e61554df09fb1 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Mon, 6 Jun 2011 09:51:31 -0500
Subject: [PATCH 01/22] configure: Replace REM with perl -e ''
Another good idea from Ben Franksen...
---
configure/os/CONFIG.win32-x86-borland.Common | 4 ++--
configure/os/CONFIG.win32-x86-mingw.Common | 4 ++--
configure/os/CONFIG.win32-x86.Common | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configure/os/CONFIG.win32-x86-borland.Common b/configure/os/CONFIG.win32-x86-borland.Common
index 0ad43a3b1..c0a0eada9 100644
--- a/configure/os/CONFIG.win32-x86-borland.Common
+++ b/configure/os/CONFIG.win32-x86-borland.Common
@@ -8,11 +8,11 @@
#-------------------------------------------------------
CP = $(PERL) -MExtUtils::Command -e cp
-MV = $(PERL) -MExtUtils::Command -e mv
+MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f
MKDIR = $(PERL) -MExtUtils::Command -e mkpath
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
-COMMENT = REM
+COMMENT = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO
diff --git a/configure/os/CONFIG.win32-x86-mingw.Common b/configure/os/CONFIG.win32-x86-mingw.Common
index dedfc1b8e..ce74be68f 100644
--- a/configure/os/CONFIG.win32-x86-mingw.Common
+++ b/configure/os/CONFIG.win32-x86-mingw.Common
@@ -11,11 +11,11 @@
include $(CONFIG)/os/CONFIG.UnixCommon.Common
CP = $(PERL) -MExtUtils::Command -e cp
-MV = $(PERL) -MExtUtils::Command -e mv
+MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f
MKDIR = $(PERL) -MExtUtils::Command -e mkpath
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
-COMMENT = REM
+COMMENT = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO
diff --git a/configure/os/CONFIG.win32-x86.Common b/configure/os/CONFIG.win32-x86.Common
index ce6f439b1..3575ad8ab 100644
--- a/configure/os/CONFIG.win32-x86.Common
+++ b/configure/os/CONFIG.win32-x86.Common
@@ -8,11 +8,11 @@
#-------------------------------------------------------
CP = $(PERL) -MExtUtils::Command -e cp
-MV = $(PERL) -MExtUtils::Command -e mv
+MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f
MKDIR = $(PERL) -MExtUtils::Command -e mkpath
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
-COMMENT = REM
+COMMENT = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO
From 445b5e473ba3164c847f6a63ec40db00787b1ceb Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Tue, 7 Jun 2011 09:52:54 -0500
Subject: [PATCH 02/22] configure: Delete %.C (C++) build rule
Breaks build of %.c files on Windows with some versions of Make.
---
configure/RULES_BUILD | 5 -----
1 file changed, 5 deletions(-)
diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD
index cfacabca4..f2f1b164a 100644
--- a/configure/RULES_BUILD
+++ b/configure/RULES_BUILD
@@ -205,11 +205,6 @@ $(OBJLIBNAME):%$(OBJ):
@$(RM) $@
$(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
-%$(OBJ): %.C
- @$(HDEPENDS_CMD)
- @$(RM) $@
- $(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
-
# WIN95/NT resource compiler
%$(RES): %.rc
@$(RM) $@
From 7560fb1bb1e16fdd68fa7210a5c972c6f4f52718 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Wed, 8 Jun 2011 11:16:26 -0500
Subject: [PATCH 03/22] rec/compress: Post monitors on NUSE field
Matt Pearson asked for NUSE monitors, so clients can track how
much data has been collected.
---
src/rec/compressRecord.c | 12 +++++++-----
src/rec/compressRecord.dbd | 4 ++++
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/rec/compressRecord.c b/src/rec/compressRecord.c
index f001fd4b8..2879852d8 100644
--- a/src/rec/compressRecord.c
+++ b/src/rec/compressRecord.c
@@ -92,12 +92,14 @@ static void reset(compressRecord *prec)
static void monitor(compressRecord *prec)
{
- unsigned short monitor_mask;
+ unsigned short alarm_mask = recGblResetAlarms(prec);
+ unsigned short monitor_mask = alarm_mask | DBE_LOG | DBE_VALUE;
- monitor_mask = recGblResetAlarms(prec);
- monitor_mask |= (DBE_LOG|DBE_VALUE);
- if(monitor_mask) db_post_events(prec,prec->bptr,monitor_mask);
- return;
+ if (alarm_mask || prec->nuse != prec->ouse) {
+ db_post_events(prec, &prec->nuse, monitor_mask);
+ prec->ouse = prec->nuse;
+ }
+ db_post_events(prec, prec->bptr, monitor_mask);
}
static void put_value(compressRecord *prec,double *psource, epicsInt32 n)
diff --git a/src/rec/compressRecord.dbd b/src/rec/compressRecord.dbd
index e3bcd438e..45f5a2957 100644
--- a/src/rec/compressRecord.dbd
+++ b/src/rec/compressRecord.dbd
@@ -95,6 +95,10 @@ recordtype(compress) {
prompt("Number Used")
special(SPC_NOMOD)
}
+ field(OUSE,DBF_ULONG) {
+ prompt("Old Number Used")
+ special(SPC_NOMOD)
+ }
field(BPTR,DBF_NOACCESS) {
prompt("Buffer Pointer")
special(SPC_NOMOD)
From 8d15407e2f4483181b0f0eb37c60bcd5460b2cd9 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Wed, 8 Jun 2011 12:15:18 -0500
Subject: [PATCH 04/22] tools: Remove warning from newer versions of Perl.
Replace \1 with $1 in substitution strings.
---
src/tools/fullPathName.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tools/fullPathName.pl b/src/tools/fullPathName.pl
index da921f6dc..27fc57a21 100644
--- a/src/tools/fullPathName.pl
+++ b/src/tools/fullPathName.pl
@@ -29,7 +29,7 @@ $Getopt::Std::OUTPUT_HELP_VERSION = 1;
my $path = AbsPath(shift);
# Escape shell special characters unless on Windows, which doesn't allow them.
-$path =~ s/([!"\$&'\(\)*,:;<=>?\[\\\]^`{|}])/\\\1/g unless $^O eq 'MSWin32';
+$path =~ s/([!"\$&'\(\)*,:;<=>?\[\\\]^`{|}])/\\$1/g unless $^O eq 'MSWin32';
print "$path\n";
From 3bf5b21f575f2c14389c7ca2d5b2958b35ecd5fa Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Wed, 8 Jun 2011 12:26:01 -0500
Subject: [PATCH 05/22] tools: Improve makeDbDepends
Rewrite, add support for quotes around filenames in "file" statements.
---
src/tools/makeDbDepends.pl | 39 +++++++++++++++-----------------------
1 file changed, 15 insertions(+), 24 deletions(-)
diff --git a/src/tools/makeDbDepends.pl b/src/tools/makeDbDepends.pl
index 729814326..16834de10 100644
--- a/src/tools/makeDbDepends.pl
+++ b/src/tools/makeDbDepends.pl
@@ -3,31 +3,22 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
# Called from within RULES.Db in the Db directories.
# Searches .substitutions and .template files (from the command line) for
-# "file xxx {" entries to create a DEPENDS file
-# and
-# 'include "xxx"' entries to create a DEPENDS file
+# file ["']xxx["'] {
+# and
+# include "xxx"
+# entries to include in the DEPENDS file
+use strict;
-$target = $ARGV[0];
-shift @ARGV;
+my $target = shift @ARGV;
+my %depends;
-
-foreach $file (@ARGV) {
- open(IN, "<$file") or die "Cannot open $file: $!";
- @infile = ;
- close IN or die "Cannot close $file: $!";
-
- @depends = grep { s/^\s*file\s*(.*)\s*\{.*$/\1/ } @infile;
- chomp @depends;
-
- if (@depends) {
- print "$target: @depends\n";
- }
-
- @depends2 = grep { s/^\s*include\s*\"\s*(.*)\s*\".*$/\1/ } @infile;
- chomp @depends2;
-
- if (@depends2) {
- print "$target: @depends2\n";
- }
+while (my $line = <>) {
+ $depends{$2}++ if $line =~ m/^\s*file\s*(["']?)(.*)\1/;
+ $depends{$1}++ if $line =~ m/^\s*include\s+"(.*)"/;
+}
+
+if (%depends) {
+ my @depends = keys %depends;
+ print "$target: @depends\n";
}
From d0423738d178ecdd73b082b842799edf4a1c86d2 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Fri, 10 Jun 2011 10:14:40 -0500
Subject: [PATCH 06/22] configure: Make the vxWorks macro expand to itself
This fixes a problem in .st sequence programs that do this:
%%#include
The pre-processor was replacing the token since the line is not a
pre-processor directive (yet) and it doesn't appear inside "quotes".
NB: This will break any code that is incorrectly using
#if vxWorks
instead of
#ifdef vxWorks
---
configure/os/CONFIG.Common.vxWorksCommon | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure/os/CONFIG.Common.vxWorksCommon b/configure/os/CONFIG.Common.vxWorksCommon
index e1adbe8f6..2203d276d 100644
--- a/configure/os/CONFIG.Common.vxWorksCommon
+++ b/configure/os/CONFIG.Common.vxWorksCommon
@@ -159,7 +159,7 @@ export TOOL_FAMILY = GNU
#--------------------------------------------------
# Operating system flags
-OP_SYS_CPPFLAGS += -DvxWorks
+OP_SYS_CPPFLAGS += -DvxWorks=vxWorks
OP_SYS_CFLAGS += -fno-builtin
# Fix for vxWorks 5 headers that use macros defined in vxWorks.h but
From 5343b836b8dce02d4507aefac4439a9277cdc496 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Fri, 10 Jun 2011 16:17:41 -0500
Subject: [PATCH 07/22] configure: Reorganized the uninstall targets in
RULES_TOP
Useful rules:
uninstall. - Remove bin & lib directories for only.
archuninstall - Remove bin & lib directories created by this hostarch.
realuninstall - Removes ALL install dirs
---
configure/RULES_TOP | 73 ++++++++++++++++++++++-----------------------
1 file changed, 36 insertions(+), 37 deletions(-)
diff --git a/configure/RULES_TOP b/configure/RULES_TOP
index 51188ea97..7bcfc74a6 100644
--- a/configure/RULES_TOP
+++ b/configure/RULES_TOP
@@ -1,10 +1,9 @@
#*************************************************************************
-# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
+# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
-# EPICS BASE Versions 3.13.7
-# and higher are distributed subject to a Software License Agreement found
+# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
#
@@ -13,73 +12,73 @@
include $(CONFIG)/RULES_DIRS
+distclean: realclean cvsclean realuninstall
+
+CVSCLEAN=$(firstword $(wildcard $(TOOLS)/cvsclean.pl $(TOP)/src/tools/cvsclean.pl))
+cvsclean:
+ $(PERL) $(CVSCLEAN)
+
+realuninstall: uninstallDirs
+ $(RMDIR) $(INSTALL_LOCATION_BIN)
+ $(RMDIR) $(INSTALL_LOCATION_LIB)
+
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC)\
$(INSTALL_HTML) $(INSTALL_JAVA) $(INSTALL_TEMPLATES) \
$(INSTALL_DB)
UNINSTALL_DIRS += $(DIRECTORY_TARGETS)
+uninstallDirs:
+ $(RMDIR) $(UNINSTALL_DIRS)
+
+uninstall: archuninstall uninstallDirs
+
+archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
+ @$(MAKE) -f Makefile cleandirs
-uninstallArchTargets = $(foreach arch,$(BUILD_ARCHS), uninstall$(DIVIDER)$(arch))
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
-
-$(uninstallArchTargets): uninstallDirs
- @$(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart) $(INSTALL_LOCATION_LIB)/$(archPart)
+uninstall$(DIVIDER)%:
+ $(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart)
+ $(RMDIR) $(INSTALL_LOCATION_LIB)/$(archPart)
cleandirs:
ifeq ($(wildcard $(INSTALL_LOCATION_BIN)/*),)
- @$(RMDIR) $(INSTALL_LOCATION_BIN)
+ $(RMDIR) $(INSTALL_LOCATION_BIN)
endif
ifeq ($(wildcard $(INSTALL_LOCATION_LIB)/*),)
- @$(RMDIR) $(INSTALL_LOCATION_LIB)
+ $(RMDIR) $(INSTALL_LOCATION_LIB)
endif
@echo
# The echo above stops a "nothing to be done for cleandirs" message
-distclean: realclean realuninstall
-
-CVSCLEAN=$(firstword $(wildcard $(TOOLS)/cvsclean.pl $(TOP)/src/tools/cvsclean.pl))
-
-cvsclean:
- @$(PERL) $(CVSCLEAN)
-
-realuninstall:
- @$(RMDIR) $(INSTALL_LOCATION_BIN) $(INSTALL_LOCATION_LIB)
- @$(RMDIR) $(UNINSTALL_DIRS)
-
-uninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
- @$(MAKE) -f Makefile cleandirs
-
-uninstallDirs:
- @$(RMDIR) $(UNINSTALL_DIRS)
-
help:
@echo "Usage: gnumake [options] [target] ..."
@echo "Targets supported by all Makefiles:"
- @echo " install - Builds and installs all targets (default rule)"
- @echo " all - Same as install"
- @echo " buildInstall - Same as install"
+ @echo " all - Same as install (default rule)"
+ @echo " inc - Installs header files"
+ @echo " build - Builds and installs all targets"
+ @echo " install - Builds and installs all targets"
+ @echo " buildInstall - Same as install (deprecated)"
@echo " clean - Removes the O. dirs created by running make"
@echo " In O. dir, clean removes build created files"
@echo " realclean - Removes ALL O. dirs"
@echo " Cannot be used within an O. dir"
@echo " rebuild - Same as clean install"
- @echo " inc - Installs header files"
- @echo " build - Builds all targets"
@echo " archclean - Removes O. dirs but not O.Common dir"
@echo "\"Partial\" build targets supported by Makefiles:"
@echo " inc. - Installs only header files."
+ @echo " build. - Builds and installs only."
@echo " install. - Builds and installs only."
@echo " clean. - Cleans binaries in O. dirs only."
- @echo " build. - Builds only."
+ @echo " uninstall. - Remove bin & lib directories for only."
@echo "Targets supported by top level Makefile:"
- @echo " uninstall - Cleans directories created by the install."
+ @echo " archuninstall - Remove bin & lib directories created by this hostarch."
+ @echo " uninstall - Remove install directories created by this hostarch."
@echo " realuninstall - Removes ALL install dirs"
- @echo " distclean - Same as realclean realuninstall."
+ @echo " distclean - Same as realclean cvsclean realuninstall."
@echo " cvsclean - Removes cvs .#* files in all dirs of directory tree"
@echo " help - Prints this list of valid make targets "
@echo "Indiv. object targets are supported by O. level Makefile .e.g"
@echo " xxxRecord.o"
-.PHONY : $(uninstallArchTargets)
-.PHONY : uninstall help cleandirs distclean uninstallDirs realuninstall
-.PHONY : cvsclean
+.PHONY: cleandirs distclean cvsclean realuninstall archuninstall uninstallDirs
+.PHONY: uninstall help
From dafb7d5d4c40fe0c6f22d367ca47d0f34be90471 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Fri, 10 Jun 2011 16:21:52 -0500
Subject: [PATCH 08/22] configure: Stop make displaying COMMENT lines...
---
configure/CONFIG_COMMON | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON
index 338bd258a..cbcaecad3 100644
--- a/configure/CONFIG_COMMON
+++ b/configure/CONFIG_COMMON
@@ -83,7 +83,7 @@ COMMON_DIR = ../O.Common
#-------------------------------------------------------
# Make echo output - suppress echoing if make's '-s' flag is set
COMMENT = \#
-ECHO = $(if $(findstring s,$(MAKEFLAGS)),$(COMMENT),@echo)
+ECHO = @$(if $(findstring s,$(MAKEFLAGS)),$(COMMENT),echo)
#-------------------------------------------------------
ifdef T_A
From 4448a5501ae3b574bb9584fd992c653f79ae4dd3 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Fri, 10 Jun 2011 16:23:02 -0500
Subject: [PATCH 09/22] Document recent commits.
---
documentation/RELEASE_NOTES.html | 63 +++++++++++++++++++++++++++++++-
1 file changed, 61 insertions(+), 2 deletions(-)
diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index 5c957e771..37224ed9f 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -3,14 +3,73 @@
- EPICS Base R3.14.12.1 Release Notes
+ EPICS Base R3.14.12.2 Release Notes
-EPICS Base Release 3.14.12.1
+EPICS Base Release 3.14.12.2
+
+Changes between 3.14.12.1 and 3.14.12.2
+Top-level make target changes
+
+Several make targets have been changed. Note that these can only be used from an
+application's <top> directory.
+
+
+ make uninstall.<arch>
+ - Deletes the bin/<arch> and lib/<arch> directories for <arch>
+ only. Note that <arch> does not have to be an architecture that this host is
+ configured to build, it works for any arch.
+
+ make archuninstall
+ - Deletes the bin/<arch> and lib/<arch> directories for all
+ architectures that this host is configured to build. Should not affect files used
+ for multiple architectures, or for host or target architectures that this host is
+ not configured to build.
+
+ make uninstall
+ - Does archuninstall and also deletes the other install directories include, db,
+ dbd, doc, html, templates and java. This will affect subsequent builds for other
+ architectures, but it doesn't delete their bin/<arch> or lib/<arch>
+ contents.
+
+ make realuninstall
+ - Deletes all install directories for all architectures.
+
+ make distclean
+ - Does realclean realuninstall as before, and also now does a cvsclean, which
+ removes file remnants from CVS operations named
.#* and editor
+ backups named *~ throughout the source tree.
+
+
+
+Compress record type
+
+This record now posts monitors on its NUSE field whenever its value changes. A new
+field OUSE was added to support this.
+
+Remove C++ build rule for .C files
+
+An early convention on Unix systems was to name C++ files with an upper-case
+extention, .C. This does not work on Windows or MacOS where the
+filesystems are case-insensitive, and the C++ build rule was causing problems so has
+been eliminated. Any remaining C++ source files that are still using this convention
+will have to be renamed, preferably to .cpp
+
+Support make -s on Windows
+
+The flag to silence build output did not work on some Windows architecture
+combinations. This has now been fixed.
+
+iocLogServer now supports logrotate
+
+The feature in the iocLogServer that closed and reopened the logfile used to ignore
+the SIGHUP signal when the log filename did not change. This has now been changed so
+these logfiles can be used with the standard Linux logrotate package.
+
Changes between 3.14.12 and 3.14.12.1
This release only contains changes that fix bugs or add build configuration
From 2fb7df85480ba40cc4f2e550b1822e969c818cd7 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Mon, 20 Jun 2011 13:52:32 -0500
Subject: [PATCH 10/22] libCom: __attribute__((deprecated)) not in gcc 2.x
Only apply this attribute for gcc 3 and later.
---
src/libCom/misc/compilerDependencies.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libCom/misc/compilerDependencies.h b/src/libCom/misc/compilerDependencies.h
index 4d451469e..4c2a8400f 100644
--- a/src/libCom/misc/compilerDependencies.h
+++ b/src/libCom/misc/compilerDependencies.h
@@ -95,7 +95,7 @@
/*
* Deprecation marker
*/
-#ifdef __GNUC__
+#if defined( __GNUC__ ) && (__GNUC__ > 2)
# define EPICS_DEPRECATED __attribute__((deprecated))
#else
# define EPICS_DEPRECATED
From 515712c0e7c1f333a80f88ee665368c49381205b Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Mon, 27 Jun 2011 15:09:54 -0500
Subject: [PATCH 11/22] startup: Fix host arch for 64-bit darwin kernels
"uname -m" returns x86_86 on those machines, which we weren't expecting.
---
startup/EpicsHostArch | 9 ++++-----
startup/EpicsHostArch.pl | 3 ++-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/startup/EpicsHostArch b/startup/EpicsHostArch
index ae25ea7cd..6b102b9b9 100755
--- a/startup/EpicsHostArch
+++ b/startup/EpicsHostArch
@@ -1,11 +1,10 @@
#!/bin/sh
#*************************************************************************
-# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
+# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
-# EPICS BASE Versions 3.13.7
-# and higher are distributed subject to a Software License Agreement found
+# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
#
@@ -37,9 +36,9 @@ case $sysname in
Darwin )
os=darwin
cpu=`uname -m`
- case "$cpu" in
+ case $cpu in
"Power Macintosh") cpu=ppc ;;
- "i386") cpu=x86 ;;
+ i386 | x86_64 ) cpu=x86 ;;
esac
echo ${os}-${cpu}${suffix}
;;
diff --git a/startup/EpicsHostArch.pl b/startup/EpicsHostArch.pl
index 169f9e32e..7fb5747c8 100755
--- a/startup/EpicsHostArch.pl
+++ b/startup/EpicsHostArch.pl
@@ -1,7 +1,7 @@
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
if $running_under_some_shell; # EpicsHostArch.pl
#*************************************************************************
-# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
+# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
@@ -34,6 +34,7 @@ sub GetEpicsHostArch { # no args
my($kernel, $hostname, $release, $version, $cpu) = POSIX::uname();
if ($cpu =~ m/Power Macintosh/) { return "darwin-ppc"; }
elsif ($cpu =~ m/i386/) { return "darwin-x86"; }
+ elsif ($cpu =~ m/x86_64/) { return "darwin-x86"; }
else { return "unsupported"; }
} else { return "unsupported"; }
}
From a80bd1a63095eb866baa712795f62230475ce498 Mon Sep 17 00:00:00 2001
From: Michael Davidsaver
Date: Fri, 8 Jul 2011 11:18:00 -0500
Subject: [PATCH 12/22] libCom: Avoid race in errlog shutdown.
A rare race during shutdown. The contenders are the log thread
coming out of its loop and calling errlogCleanup(), and the
exitHandler signaling waitForWork.
This solution is to move cleanup completely into exitHandler,
which already waits for the log thread to exit.
---
documentation/RELEASE_NOTES.html | 55 +++++++++++++++++++-------------
src/libCom/error/errlog.c | 23 +++++--------
2 files changed, 40 insertions(+), 38 deletions(-)
diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index 37224ed9f..a527844fb 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -13,51 +13,58 @@
+Another race condition in errlog cleaned up
+
+If it was still busy when the IOC was closed down, the errlog thread could
+have preempted the exit handler and freed the various internal pvtData mutex and
+event objects too soon.
+
Top-level make target changes
-Several make targets have been changed. Note that these can only be used from an
-application's <top> directory.
+Several make targets have been changed. Note that these can only be used from
+an application's <top> directory.
make uninstall.<arch>
- - Deletes the bin/<arch> and lib/<arch> directories for <arch>
- only. Note that <arch> does not have to be an architecture that this host is
- configured to build, it works for any arch.
+ - Deletes the bin/<arch> and lib/<arch> directories for
+ <arch> only. Note that <arch> does not have to be an
+ architecture that this host is configured to build, it works for any
+ arch.
make archuninstall
- Deletes the bin/<arch> and lib/<arch> directories for all
- architectures that this host is configured to build. Should not affect files used
- for multiple architectures, or for host or target architectures that this host is
- not configured to build.
+ architectures that this host is configured to build. Should not affect files
+ used for multiple architectures, or for host or target architectures that
+ this host is not configured to build.
make uninstall
- - Does archuninstall and also deletes the other install directories include, db,
- dbd, doc, html, templates and java. This will affect subsequent builds for other
- architectures, but it doesn't delete their bin/<arch> or lib/<arch>
- contents.
+ - Does archuninstall and also deletes the other install directories include,
+ db, dbd, doc, html, templates and java. This will affect subsequent builds
+ for other architectures, but it doesn't delete their bin/<arch> or
+ lib/<arch> contents.
make realuninstall
- Deletes all install directories for all architectures.
make distclean
- - Does realclean realuninstall as before, and also now does a cvsclean, which
- removes file remnants from CVS operations named
.#* and editor
- backups named *~ throughout the source tree.
+ - Does realclean realuninstall as before, and also now does a cvsclean,
+ which removes file remnants from CVS operations named
.#* and
+ editor backups named *~ throughout the source tree.
Compress record type
-This record now posts monitors on its NUSE field whenever its value changes. A new
-field OUSE was added to support this.
+This record now posts monitors on its NUSE field whenever its value changes.
+A new field OUSE was added to support this.
Remove C++ build rule for .C files
An early convention on Unix systems was to name C++ files with an upper-case
extention, .C. This does not work on Windows or MacOS where the
-filesystems are case-insensitive, and the C++ build rule was causing problems so has
-been eliminated. Any remaining C++ source files that are still using this convention
-will have to be renamed, preferably to .cpp
+filesystems are case-insensitive, and the C++ build rule was causing problems so
+has been eliminated. Any remaining C++ source files that are still using this
+convention will have to be renamed, preferably to .cpp
Support make -s on Windows
@@ -66,9 +73,11 @@ combinations. This has now been fixed.
iocLogServer now supports logrotate
-The feature in the iocLogServer that closed and reopened the logfile used to ignore
-the SIGHUP signal when the log filename did not change. This has now been changed so
-these logfiles can be used with the standard Linux logrotate package.
+The feature in the iocLogServer that closed and reopened the logfile used to
+ignore the SIGHUP signal when the log filename did not change. This has now been
+changed so these logfiles can be used with the standard Linux logrotate
+package.
+
Changes between 3.14.12 and 3.14.12.1
diff --git a/src/libCom/error/errlog.c b/src/libCom/error/errlog.c
index 1cf1575bf..c5834057b 100644
--- a/src/libCom/error/errlog.c
+++ b/src/libCom/error/errlog.c
@@ -41,7 +41,6 @@
/*Declare storage for errVerbose */
epicsShareDef int errVerbose = 0;
-static void errlogCleanup(void);
static void exitHandler(void *);
static void errlogThread(void);
@@ -391,8 +390,15 @@ static void exitHandler(void *pvt)
pvtData.atExit = 1;
epicsEventSignal(pvtData.waitForWork);
epicsEventMustWait(pvtData.waitForExit);
+
+ free(pvtData.pbuffer);
+ epicsMutexDestroy(pvtData.flushLock);
+ epicsEventDestroy(pvtData.flush);
+ epicsEventDestroy(pvtData.waitForFlush);
+ epicsMutexDestroy(pvtData.listenerLock);
+ epicsMutexDestroy(pvtData.msgQueueLock);
+ epicsEventDestroy(pvtData.waitForWork);
epicsEventDestroy(pvtData.waitForExit);
- return;
}
struct initArgs {
@@ -432,18 +438,6 @@ static void errlogInitPvt(void *arg)
pvtData.errlogInitFailed = FALSE;
}
}
-
-static void errlogCleanup(void)
-{
- free(pvtData.pbuffer);
- epicsMutexDestroy(pvtData.flushLock);
- epicsEventDestroy(pvtData.flush);
- epicsEventDestroy(pvtData.waitForFlush);
- epicsMutexDestroy(pvtData.listenerLock);
- epicsMutexDestroy(pvtData.msgQueueLock);
- epicsEventDestroy(pvtData.waitForWork);
- /*Note that exitHandler must destroy waitForExit*/
-}
epicsShareFunc int epicsShareAPI errlogInit2(int bufsize, int maxMsgSize)
{
@@ -514,7 +508,6 @@ static void errlogThread(void)
epicsThreadSleep(.2); /*just wait an extra .2 seconds*/
epicsEventSignal(pvtData.waitForFlush);
}
- errlogCleanup();
epicsEventSignal(pvtData.waitForExit);
}
From a367e4be95a98e04a689f715150020b484792656 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Wed, 13 Jul 2011 10:38:13 -0500
Subject: [PATCH 13/22] tools: use AbsPath() instead of abs_path() in
checkRelease
abs_path() dies for dirs that don't exist.
---
src/tools/convertRelease.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tools/convertRelease.pl b/src/tools/convertRelease.pl
index fbdcf0606..f6eb50e73 100644
--- a/src/tools/convertRelease.pl
+++ b/src/tools/convertRelease.pl
@@ -19,7 +19,7 @@ use strict;
use FindBin qw($Bin);
use lib ("$Bin/../../lib/perl", $Bin);
-use Cwd qw(cwd abs_path);
+use Cwd qw(cwd);
use Getopt::Std;
use EPICS::Path;
use EPICS::Release;
@@ -215,7 +215,7 @@ sub checkRelease {
while (my ($parent, $ppath) = each %check) {
if (exists $macros{$parent} &&
- abs_path($macros{$parent}) ne abs_path($ppath)) {
+ AbsPath($macros{$parent}) ne AbsPath($ppath)) {
print "\n" unless ($status);
print "Definition of $parent conflicts with $app support.\n";
print "In this application a RELEASE file defines\n";
From e71785edf6aa71916214ce5a6e42837362e41c1a Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Thu, 21 Jul 2011 16:10:50 -0500
Subject: [PATCH 14/22] libCom/devLib: Make unsolicitedHandlerEPICS() visible
This symbol is required to be visible on non-PowerPC (68k) vxWorks
systems for devInterruptInUseVME() to recognize interrupt vectors
that the devDisconnectInterruptVME() routine has marked as not used.
---
src/libCom/osi/os/vxWorks/devLibVMEOSD.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c
index 086e0f7d5..22cd177ea 100644
--- a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c
+++ b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c
@@ -50,9 +50,9 @@ static myISR *isrFetch(unsigned vectorNumber);
/*
* this routine needs to be in the symbol table
- * for this code to work correctly
+ * (i.e. not static) for this code to work correctly
*/
-static void unsolicitedHandlerEPICS(int vectorNumber);
+void unsolicitedHandlerEPICS(int vectorNumber);
/*
* this is in veclist.c
@@ -412,8 +412,10 @@ static int vxDevInterruptInUseVME (unsigned vectorNumber)
* interrupt and an interrupt arrives on the
* disconnected vector
*
+ * This routine needs to be in the symbol table
+ * (i.e. not static) for this code to work correctly
*/
-static void unsolicitedHandlerEPICS(int vectorNumber)
+void unsolicitedHandlerEPICS(int vectorNumber)
{
/*
* call logMsg() and not errMessage()
From f9f8d1150cce5208d4a063acab085437b39e4be4 Mon Sep 17 00:00:00 2001
From: Jeff Hill
Date: Tue, 26 Jul 2011 10:40:37 -0600
Subject: [PATCH 15/22] fixed spelling and formatting nits
---
src/ca/CAref.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ca/CAref.html b/src/ca/CAref.html
index 961d9fe36..743f44bdd 100644
--- a/src/ca/CAref.html
+++ b/src/ca/CAref.html
@@ -246,7 +246,7 @@ $Date$
Why Reconfigure Channel Access
-Typically reasons to reconfigure EPICS Channel Access:
+Typical reasons to reconfigure EPICS Channel Access:
- Two independent control systems must share a network without fear of
interaction
@@ -4359,7 +4359,7 @@ that use ca_context_destroy).
ca_context_destroy()
-
void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);
+void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);
Description
From 1b9ca756cc46c661ab79a71a1ce915f35c723303 Mon Sep 17 00:00:00 2001
From: Jeff Hill
Date: Tue, 26 Jul 2011 16:23:34 -0600
Subject: [PATCH 16/22] Changed repeaterTimerNotify interface implementation
into a nested class of udpiiu so that we dont use multiple inheritance, and
therefore hopefully avoid code generation problems with certain versions of
g++ on MacOSX (I cant reproduce this problem on any ofthe machines here)
---
src/ca/udpiiu.cpp | 19 ++++++++++---------
src/ca/udpiiu.h | 26 ++++++++++++++++----------
2 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/src/ca/udpiiu.cpp b/src/ca/udpiiu.cpp
index 755875aa7..625bead9f 100644
--- a/src/ca/udpiiu.cpp
+++ b/src/ca/udpiiu.cpp
@@ -81,8 +81,9 @@ udpiiu::udpiiu (
cac::lowestPriorityLevelAbove (
cac::lowestPriorityLevelAbove (
cac.getInitializingThreadsPriority () ) ) ),
+ m_repeaterTimerNotify ( *this ),
repeaterSubscribeTmr (
- *this, timerQueue, cbMutexIn, ctxNotifyIn ),
+ m_repeaterTimerNotify, timerQueue, cbMutexIn, ctxNotifyIn ),
govTmr ( *this, timerQueue, cacMutexIn ),
maxPeriod ( maxSearchPeriodDefault ),
rtteMean ( minRoundTripEstimate ),
@@ -397,14 +398,14 @@ void udpRecvThread::run ()
}
/*
- * udpiiu::repeaterRegistrationMessage ()
+ * udpiiu::M_repeaterTimerNotify::repeaterRegistrationMessage ()
*
* register with the repeater
*/
-void udpiiu::repeaterRegistrationMessage ( unsigned attemptNumber )
+void udpiiu :: M_repeaterTimerNotify :: repeaterRegistrationMessage ( unsigned attemptNumber )
{
- epicsGuard < epicsMutex > cbGuard ( this->cacMutex );
- caRepeaterRegistrationMessage ( this->sock, this->repeaterPort, attemptNumber );
+ epicsGuard < epicsMutex > cbGuard ( m_udpiiu.cacMutex );
+ caRepeaterRegistrationMessage ( m_udpiiu.sock, m_udpiiu.repeaterPort, attemptNumber );
}
/*
@@ -1233,16 +1234,16 @@ void udpiiu::govExpireNotify (
this->ppSearchTmr[0]->installChannel ( guard, chan );
}
-int udpiiu :: printFormated (
- epicsGuard < epicsMutex > & cbGuard,
- const char * pformat, ... )
+int udpiiu :: M_repeaterTimerNotify :: printFormated (
+ epicsGuard < epicsMutex > & cbGuard,
+ const char * pformat, ... )
{
va_list theArgs;
int status;
va_start ( theArgs, pformat );
- status = this->cacRef.varArgsPrintFormated ( cbGuard, pformat, theArgs );
+ status = m_udpiiu.cacRef.varArgsPrintFormated ( cbGuard, pformat, theArgs );
va_end ( theArgs );
diff --git a/src/ca/udpiiu.h b/src/ca/udpiiu.h
index 3c9327547..5a0f869e1 100644
--- a/src/ca/udpiiu.h
+++ b/src/ca/udpiiu.h
@@ -88,8 +88,7 @@ static const double beaconAnomalySearchPeriod = 5.0; // seconds
class udpiiu :
private netiiu,
private searchTimerNotify,
- private disconnectGovernorNotify,
- private repeaterTimerNotify {
+ private disconnectGovernorNotify {
public:
udpiiu (
epicsGuard < epicsMutex > & cacGuard,
@@ -139,9 +138,24 @@ private:
private:
udpiiu & _udpiiu;
};
+ class M_repeaterTimerNotify :
+ public repeaterTimerNotify {
+ public:
+ M_repeaterTimerNotify ( udpiiu & iiu ) :
+ m_udpiiu ( iiu ) {}
+ // repeaterTimerNotify
+ void repeaterRegistrationMessage (
+ unsigned attemptNumber );
+ int printFormated (
+ epicsGuard < epicsMutex > & callbackControl,
+ const char * pformat, ... );
+ private:
+ udpiiu & m_udpiiu;
+ };
char xmitBuf [MAX_UDP_SEND];
char recvBuf [MAX_UDP_RECV];
udpRecvThread recvThread;
+ M_repeaterTimerNotify m_repeaterTimerNotify;
repeaterSubscribeTimer repeaterSubscribeTmr;
disconnectGovernorTimer govTmr;
tsDLList < SearchDest > _searchDestList;
@@ -278,14 +292,6 @@ private:
void govExpireNotify (
epicsGuard < epicsMutex > &, nciu & );
- // repeaterTimerNotify
- void repeaterRegistrationMessage (
- unsigned attemptNumber );
-
- int printFormated (
- epicsGuard < epicsMutex > & callbackControl,
- const char * pformat, ... );
-
udpiiu ( const udpiiu & );
udpiiu & operator = ( const udpiiu & );
From 7783f0044bebaf31d65c64f54a729ca43973fc7d Mon Sep 17 00:00:00 2001
From: Janet Anderson
Date: Wed, 27 Jul 2011 16:08:02 -0500
Subject: [PATCH 17/22] Added commented changes from Eric Norum to build with
CLANG
---
configure/os/CONFIG_SITE.Common.darwin-x86 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/configure/os/CONFIG_SITE.Common.darwin-x86 b/configure/os/CONFIG_SITE.Common.darwin-x86
index 9f9e7887b..7aad1537e 100644
--- a/configure/os/CONFIG_SITE.Common.darwin-x86
+++ b/configure/os/CONFIG_SITE.Common.darwin-x86
@@ -13,3 +13,11 @@
ARCH_CLASS = i386
#ARCH_CLASS = x86_64
#ARCH_CLASS = i386 x86_64
+
+#
+# Uncomment the followings lines to build with CLANG instead of GCC.
+#
+#CC = clang
+#CCC = clang++
+#GNU_LDLIBS_YES =
+
From f59825a4621fad2de9358aef46e6dbdd476f7f0b Mon Sep 17 00:00:00 2001
From: Janet Anderson
Date: Fri, 5 Aug 2011 12:02:30 -0500
Subject: [PATCH 18/22] Added HDEPENDS_METHOD override for cross builds
---
configure/os/CONFIG.win32-x86.win32-x86 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure/os/CONFIG.win32-x86.win32-x86 b/configure/os/CONFIG.win32-x86.win32-x86
index 78482e73d..65a2be4eb 100644
--- a/configure/os/CONFIG.win32-x86.win32-x86
+++ b/configure/os/CONFIG.win32-x86.win32-x86
@@ -31,7 +31,9 @@ BAFCMD = bscmake /nologo /o $@
# Configure OS vendor C compiler
CC = cl
+# Override CONFIG.gnuCommon for cross builds.
GNU = NO
+HDEPENDS_METHOD = CMD
#
# /W use warning level N
From bc4a7854ece8a5c3467c445e6785f703ce9f15a3 Mon Sep 17 00:00:00 2001
From: Ralph Lange
Date: Mon, 8 Aug 2011 18:31:19 +0200
Subject: [PATCH 19/22] libCom: Explicitly use namespace std for size_t
declaration in epicsSingleton.h
This fixes a compile error that occurs in new gcc versions (since ~4.6.1)
---
src/libCom/cxxTemplates/epicsSingleton.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libCom/cxxTemplates/epicsSingleton.h b/src/libCom/cxxTemplates/epicsSingleton.h
index 056285465..b97c82b8c 100644
--- a/src/libCom/cxxTemplates/epicsSingleton.h
+++ b/src/libCom/cxxTemplates/epicsSingleton.h
@@ -34,7 +34,7 @@ public:
void * pInstance () const;
private:
void * _pInstance;
- size_t _refCount;
+ std :: size_t _refCount;
SingletonUntyped ( const SingletonUntyped & );
SingletonUntyped & operator = ( const SingletonUntyped & );
};
From d286a81ef0c576706c6e5428a51a5cc173ac33ba Mon Sep 17 00:00:00 2001
From: Janet Anderson
Date: Tue, 9 Aug 2011 11:39:00 -0500
Subject: [PATCH 20/22] configure: Remove T_A=* from MAKEFLAGS before
findstring s in ECHO def.
---
configure/CONFIG_COMMON | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON
index cbcaecad3..d5de9cbbc 100644
--- a/configure/CONFIG_COMMON
+++ b/configure/CONFIG_COMMON
@@ -83,7 +83,7 @@ COMMON_DIR = ../O.Common
#-------------------------------------------------------
# Make echo output - suppress echoing if make's '-s' flag is set
COMMENT = \#
-ECHO = @$(if $(findstring s,$(MAKEFLAGS)),$(COMMENT),echo)
+ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(COMMENT),echo)
#-------------------------------------------------------
ifdef T_A
From 35b72b60fb3fd2ccebf44d6f48d8a833b696a8f9 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Wed, 17 Aug 2011 15:08:10 -0500
Subject: [PATCH 21/22] shutdown: Lock records during dbCa link cleanup
CA links in records were being removed without locking them first.
We also now set the link type to CONSTANT, which prevents some
assertion failures if the record gets processed again before the
IOC finally dies.
---
src/misc/iocInit.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/misc/iocInit.c b/src/misc/iocInit.c
index 3100ffd4b..2a398b713 100644
--- a/src/misc/iocInit.c
+++ b/src/misc/iocInit.c
@@ -506,6 +506,7 @@ static void doCloseLinks(dbRecordType *pdbRecordType, dbCommon *precord,
devSup *pdevSup;
struct dsxt *pdsxt;
int j;
+ int locked = 0;
for (j = 0; j < pdbRecordType->no_links; j++) {
dbFldDes *pdbFldDes =
@@ -513,7 +514,12 @@ static void doCloseLinks(dbRecordType *pdbRecordType, dbCommon *precord,
DBLINK *plink = (DBLINK *)((char *)precord + pdbFldDes->offset);
if (plink->type == CA_LINK) {
+ if (!locked) {
+ dbScanLock(precord);
+ locked = 1;
+ }
dbCaRemoveLink(plink);
+ plink->type = CONSTANT;
}
}
@@ -521,8 +527,16 @@ static void doCloseLinks(dbRecordType *pdbRecordType, dbCommon *precord,
(pdevSup = dbDSETtoDevSup(pdbRecordType, precord->dset)) &&
(pdsxt = pdevSup->pdsxt) &&
pdsxt->del_record) {
+ if (!locked) {
+ dbScanLock(precord);
+ locked = 1;
+ }
pdsxt->del_record(precord);
}
+ if (locked) {
+ precord->pact = TRUE;
+ dbScanUnlock(precord);
+ }
}
static void exitDatabase(void *dummy)
From 2b4edba8f3e01481146e1f4feef165c2c156ebe7 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Wed, 17 Aug 2011 15:14:10 -0500
Subject: [PATCH 22/22] Update copyright names and dates in LICENSE file.
---
LICENSE | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/LICENSE b/LICENSE
index ff9597ccf..4806c058e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,11 +1,14 @@
-Copyright (c) 1991-2007 UChicago Argonne LLC and The Regents of the
-University of California. All rights reserved.
+Copyright (c) 1991-2011 UChicago Argonne LLC.
+Copyright (c) 1991-2006 The Regents of the University of California.
+Copyright (c) 2006-2011. Los Alamos National Security, LLC. Some of this
+material was produced under U.S. Government contract DE-AC52-06NA25396
+for Los Alamos National Laboratory (LANL), which is operated by Los Alamos
+National Security, LLC for the U.S. Department of Energy.
EPICS BASE is distributed subject to the following license conditions:
SOFTWARE LICENSE AGREEMENT
Software: EPICS BASE
- Versions: 3.13.7 and higher
1. The "Software", below, refers to EPICS BASE (in either source code, or
binary form and accompanying documentation). Each licensee is