Compare commits
203 Commits
PSI-7.0.7.
...
PSI-7.0.8.
| Author | SHA1 | Date | |
|---|---|---|---|
| 6bb78e0d59 | |||
| 7d73932dc8 | |||
| 4a442bb56c | |||
| 60075df3cf | |||
| 42892f3921 | |||
| 52b3496084 | |||
| 2296dbc132 | |||
| 4af01ed26a | |||
| d83079999b | |||
| 15a2e22149 | |||
| 2dc71ebd6e | |||
|
|
2e4113b63b | ||
|
|
3b50194837 | ||
| 99f70a1081 | |||
|
|
5d9ffe15da | ||
|
|
3ac8dcc3de | ||
|
|
25e155ee8c | ||
|
|
049cc175a9 | ||
|
|
0d92b74aae | ||
|
|
ecba8a3a5e | ||
|
|
466a9b565e | ||
|
|
c304b7db53 | ||
|
|
0eb31ed70b | ||
|
|
c5f5e4e508 | ||
|
|
9866815dab | ||
|
|
0e66b3edff | ||
|
|
dd154180bf | ||
|
|
574fe116fc | ||
| 7077ece7f9 | |||
| 22aaded26d | |||
| c1b8831205 | |||
| 1e64b08c32 | |||
| d67036fcc0 | |||
| d494d91ba2 | |||
|
|
052a0c7e19 | ||
|
|
979dde8376 | ||
|
|
9a0113f834 | ||
|
|
3d70e70640 | ||
|
|
f9e53dded6 | ||
| 403ebab858 | |||
|
|
8e62ea4965 | ||
|
|
f00de26be1 | ||
|
|
50b6a3801a | ||
|
|
2a5def7fc6 | ||
|
|
fd072e4429 | ||
|
|
3a5c9ab0cd | ||
|
|
c735de4ff8 | ||
|
|
bb5423171d | ||
|
|
4e4e55ca89 | ||
|
|
e9748881cd | ||
|
|
39b0301062 | ||
|
|
2f98251c9f | ||
|
|
535c9c2a06 | ||
|
|
057eb87101 | ||
| 457387ed38 | |||
| b6fffc2225 | |||
| 86cdfc596f | |||
|
|
3dae29b7e8 | ||
|
|
9d393c4437 | ||
| 97ffcb725c | |||
| 5930e8e2e4 | |||
| 212f387d1b | |||
| 1ae21cdde4 | |||
| 03f17a08c3 | |||
|
|
a5c3330c8e | ||
|
|
856f345d2c | ||
|
|
3f4d080260 | ||
|
|
1e8d49f2a6 | ||
|
|
31b22fd253 | ||
|
|
916b17ef3f | ||
|
|
437320926b | ||
|
|
7890e67d37 | ||
|
|
918a188285 | ||
|
|
2f730b8e9f | ||
|
|
1835187a86 | ||
|
|
f287cfa2ac | ||
|
|
785237e41a | ||
| 23999a106b | |||
|
|
91e1d0ab80 | ||
|
|
172bfce1f3 | ||
|
|
615e7e99ce | ||
|
|
57c930fbee | ||
|
|
785b777baf | ||
|
|
d0d15ee911 | ||
|
|
5af9c7e50d | ||
|
|
5fe563bed8 | ||
|
|
772c10d904 | ||
|
|
72d50ce274 | ||
|
|
0a6b9e4511 | ||
| be8f8b41ff | |||
|
|
1b46077096 | ||
|
|
ede745cc34 | ||
| 54117d5371 | |||
|
|
a864f16318 | ||
|
|
4c20518864 | ||
|
|
6ca716a77f | ||
|
|
aa77b1c04a | ||
|
|
fe4247d57d | ||
|
|
77490d4939 | ||
|
|
0495ac3bc5 | ||
|
|
4a305a42a7 | ||
| cc134d4649 | |||
| 012c4c73f1 | |||
| 96864abb6c | |||
|
|
11fba63d18 | ||
|
|
1db37bcd91 | ||
|
|
beec00b403 | ||
|
|
4966baf423 | ||
|
|
e5b4829074 | ||
|
|
d8b5616772 | ||
|
|
92615a77fe | ||
|
|
b3f92d81db | ||
|
|
839f764bcb | ||
|
|
4bb50fe664 | ||
| ad00947d48 | |||
| 2db99d46a7 | |||
|
|
c77f32b19c | ||
|
|
66ce1c2076 | ||
| 11661455f1 | |||
| ecb02803c8 | |||
| fcb720275a | |||
| 87d492bffd | |||
|
|
1a9dc993c1 | ||
| b379c6f3a5 | |||
| da010afde9 | |||
| cb710920d0 | |||
| 87dea74dcd | |||
| d35c7fe5eb | |||
| c5469efca1 | |||
| fd436c40e8 | |||
| 8557d8adce | |||
| a0c55f597b | |||
| 9090f54f45 | |||
| 6085f9eb0b | |||
| a1de706d2c | |||
| 0b12a0cf7e | |||
|
|
cb1571783b | ||
|
|
5dfc6caf3c | ||
|
|
cb49bd0133 | ||
|
|
4720b61c1f | ||
| 4383cf291e | |||
|
|
a6977ae731 | ||
| e9dcdd8936 | |||
|
|
07cbf00187 | ||
|
|
c75b9ad0be | ||
|
|
87acb98d1e | ||
|
|
403e203325 | ||
|
|
a7a56912eb | ||
|
|
fe4a32e425 | ||
|
|
823386573f | ||
|
|
ea8247586f | ||
|
|
e88a186fc3 | ||
|
|
20f32068c3 | ||
|
|
8998341588 | ||
|
|
448fde0671 | ||
|
|
477e36b1f0 | ||
|
|
fad830bd14 | ||
|
|
331df3d7e4 | ||
|
|
4a53713f37 | ||
|
|
2e6fd505d2 | ||
|
|
5ecf7d18a8 | ||
|
|
56dbc949ff | ||
| e2bb42d8d3 | |||
|
|
6a369acd0b | ||
|
|
d9d35a4eab | ||
|
|
116881ad87 | ||
| 96857d92bc | |||
|
|
0cf8c934f9 | ||
|
|
69d05fe5b0 | ||
|
|
511bf1ffca | ||
|
|
7a7028de56 | ||
|
|
7a65c001ce | ||
|
|
0bc6ff3d4c | ||
|
|
f2fe9d1203 | ||
|
|
ffc2d0f23a | ||
|
|
a352865df9 | ||
|
|
63740f2edd | ||
|
|
f4be9daf4d | ||
|
|
3fa1932345 | ||
|
|
95bd5453d9 | ||
|
|
eb3f8a004c | ||
|
|
9f868a1074 | ||
|
|
b41787b6bf | ||
| 19b232545c | |||
|
|
2ca70d3aa2 | ||
|
|
395015aac4 | ||
|
|
92cae86ff2 | ||
|
|
49ea46ee5e | ||
|
|
df908f299b | ||
|
|
6dec68554c | ||
|
|
badd8f518d | ||
|
|
766c9906b5 | ||
|
|
60fa2d31da | ||
|
|
88ea1507f4 | ||
|
|
8c08c57247 | ||
|
|
45b3bce515 | ||
|
|
7c4a21eab4 | ||
|
|
fab8fd7102 | ||
|
|
3d25756065 | ||
|
|
5aca4c684c | ||
|
|
39b5c01c5d | ||
|
|
3b22e5f710 | ||
|
|
9f660f2238 |
2
.ci
2
.ci
Submodule .ci updated: 130e88b709...0e93b70855
14
.gitattributes
vendored
14
.gitattributes
vendored
@@ -1,9 +1,11 @@
|
||||
.ci/ export-ignore
|
||||
.tools/ export-ignore
|
||||
.github/ export-ignore
|
||||
.appveyor/ export-ignore
|
||||
.appveyor.yml export-ignore
|
||||
README export-subst
|
||||
.appveyor.yml export-ignore
|
||||
.appveyor/ export-ignore
|
||||
.ci/ export-ignore
|
||||
.github/ export-ignore
|
||||
.gitmodules export-ignore
|
||||
.readthedocs.yml export-ignore
|
||||
.tools/ export-ignore
|
||||
README export-subst
|
||||
|
||||
#Which files need CRLF handling
|
||||
# default to automatic
|
||||
|
||||
2
.github/workflows/check-editorconfig.yml
vendored
2
.github/workflows/check-editorconfig.yml
vendored
@@ -8,6 +8,6 @@ jobs:
|
||||
editorconfig:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: EditorConfig-Action
|
||||
uses: greut/eclint-action@v0
|
||||
|
||||
21
.github/workflows/ci-scripts-build.yml
vendored
21
.github/workflows/ci-scripts-build.yml
vendored
@@ -29,6 +29,7 @@ on:
|
||||
- '.gitattributes'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
SETUP_PATH: .ci-local:.ci
|
||||
@@ -59,7 +60,10 @@ jobs:
|
||||
# Remove respective -Wno-error=... flag once it is fixed.
|
||||
extra: "CMD_CXXFLAGS=-std=c++20
|
||||
CMD_CPPFLAGS='-fdiagnostics-color
|
||||
-fstack-protector-strong
|
||||
-Wformat
|
||||
-Werror
|
||||
-Werror=format-security
|
||||
-Wno-error=deprecated-declarations
|
||||
-Wno-error=stringop-truncation
|
||||
-Wno-error=restrict
|
||||
@@ -67,8 +71,9 @@ jobs:
|
||||
-Wno-error=nonnull
|
||||
-Wno-error=dangling-pointer
|
||||
-Wno-error=format-overflow
|
||||
-Wno-error=format-security
|
||||
-Wno-error=stringop-overread'"
|
||||
-Wno-error=stringop-overread
|
||||
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
|
||||
CMD_LDFLAGS=-Wl,-z,relro"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
@@ -236,10 +241,10 @@ jobs:
|
||||
matrix:
|
||||
# Job names also name artifacts, character limitations apply
|
||||
include:
|
||||
- name: "CentOS-7"
|
||||
image: centos:7
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
#- name: "CentOS-7"
|
||||
# image: centos:7
|
||||
# cmp: gcc
|
||||
# configuration: default
|
||||
|
||||
- name: "Fedora-33"
|
||||
image: fedora:33
|
||||
@@ -283,6 +288,10 @@ jobs:
|
||||
submodules: true
|
||||
- name: Automatic core dumper analysis
|
||||
uses: mdavidsaver/ci-core-dumper@master
|
||||
if: matrix.image!='centos:7'
|
||||
- name: Automatic core dumper analysis
|
||||
uses: mdavidsaver/ci-core-dumper@node16
|
||||
if: matrix.image=='centos:7'
|
||||
- name: Prepare and compile dependencies
|
||||
run: python .ci/cue.py prepare
|
||||
- name: Build main module
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -20,3 +20,5 @@ O.*/
|
||||
.iocsh_history
|
||||
RPMS
|
||||
SRPMS
|
||||
BUILDROOT
|
||||
*.rpm
|
||||
|
||||
@@ -136,19 +136,20 @@ sed -i -e 's|^\./||' "$TDIR"/list.1
|
||||
|
||||
# Exclude files
|
||||
sed \
|
||||
-e '/\/\.ci\//d' \
|
||||
-e '/\/\.appveyor\.yml$/d' \
|
||||
-e '/\/\.appveyor\//d' \
|
||||
-e '/\/\.ci-local\//d' \
|
||||
-e '/\/\.tools\//d' \
|
||||
-e '/\/jenkins\//d' \
|
||||
-e '/\/\.ci\//d' \
|
||||
-e '/\/\.cproject$/d' \
|
||||
-e '/\/\.github\//d' \
|
||||
-e '/\/\.gitmodules$/d' \
|
||||
-e '/\/\.hgtags$/d' \
|
||||
-e '/\/\.cproject$/d' \
|
||||
-e '/\/\.project$/d' \
|
||||
-e '/\/\.lgtm\.yml$/d' \
|
||||
-e '/\/\.travis\.yml$/d' \
|
||||
-e '/\/\.appveyor\.yml$/d' \
|
||||
-e '/\/\.project$/d' \
|
||||
-e '/\/\.readthedocs\.yml$/d' \
|
||||
-e '/\/\.tools\//d' \
|
||||
-e '/\/\.travis\.yml$/d' \
|
||||
-e '/\/jenkins\//d' \
|
||||
"$TDIR"/list.1 > "$TDIR"/list.2
|
||||
|
||||
if ! diff -U 0 "$TDIR"/list.1 "$TDIR"/list.2
|
||||
|
||||
@@ -27,16 +27,16 @@ RANLIB = $(GNU_BIN)/$(CMPLR_PREFIX)ranlib$(CMPLR_SUFFIX)
|
||||
ASAN_FLAGS_YES = -fsanitize=address
|
||||
ASAN_LDFLAGS_YES = $(ASAN_FLAGS_YES)
|
||||
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
PROF_CFLAGS_YES = -p
|
||||
GPROF_CFLAGS_YES = -pg
|
||||
CODE_CFLAGS = $(PROF_CFLAGS_$(PROFILE)) $(GPROF_CFLAGS_$(GPROF))
|
||||
CODE_CFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
|
||||
WARN_CFLAGS_YES = -Wall -Werror-implicit-function-declaration
|
||||
WARN_CFLAGS_NO = -w
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES = -O3 -g
|
||||
OPT_CFLAGS_NO = -g
|
||||
|
||||
|
||||
@@ -48,11 +48,11 @@ EPICS_VERSION = 7
|
||||
EPICS_REVISION = 0
|
||||
|
||||
# EPICS_MODIFICATION must be a number >=0 and <256
|
||||
EPICS_MODIFICATION = 7
|
||||
EPICS_MODIFICATION = 8
|
||||
|
||||
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
|
||||
# Not included in the official EPICS version number if zero
|
||||
EPICS_PATCH_LEVEL = 1
|
||||
EPICS_PATCH_LEVEL = 2
|
||||
|
||||
# Immediately after an official release the EPICS_PATCH_LEVEL is incremented
|
||||
# and the -DEV suffix is added (similar to the Maven -SNAPSHOT versions)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
EPICS_CA_MAJOR_VERSION = 4
|
||||
EPICS_CA_MINOR_VERSION = 14
|
||||
EPICS_CA_MAINTENANCE_VERSION = 3
|
||||
EPICS_CA_MAINTENANCE_VERSION = 4
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
|
||||
@@ -422,9 +422,9 @@ INSTALL_LIB_INSTALLS = $(addprefix $(INSTALL_LIB)/,$(notdir $(LIB_INSTALLS)))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Installed file permissions
|
||||
BIN_PERMISSIONS = 555
|
||||
LIB_PERMISSIONS = 444
|
||||
SHRLIB_PERMISSIONS = 555
|
||||
BIN_PERMISSIONS = 755
|
||||
LIB_PERMISSIONS = 644
|
||||
SHRLIB_PERMISSIONS = 755
|
||||
INSTALL_PERMISSIONS = 444
|
||||
|
||||
#---------------------------------------------------------------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Version number for the database APIs and shared library
|
||||
|
||||
EPICS_DATABASE_MAJOR_VERSION = 3
|
||||
EPICS_DATABASE_MINOR_VERSION = 22
|
||||
EPICS_DATABASE_MINOR_VERSION = 23
|
||||
EPICS_DATABASE_MAINTENANCE_VERSION = 1
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Version number for the libcom APIs and shared library
|
||||
|
||||
EPICS_LIBCOM_MAJOR_VERSION = 3
|
||||
EPICS_LIBCOM_MINOR_VERSION = 22
|
||||
EPICS_LIBCOM_MINOR_VERSION = 23
|
||||
EPICS_LIBCOM_MAINTENANCE_VERSION = 1
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
@@ -34,5 +34,9 @@ CFG += TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
ifeq ($(GNU),YES)
|
||||
# Pass compiler flags to preprocessor to enable _FORTIFY_SOURCE
|
||||
TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A): CPPFLAGS += $(CFLAGS)
|
||||
endif
|
||||
TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A): toolchain.c
|
||||
$(PREPROCESS.cpp)
|
||||
|
||||
@@ -514,6 +514,13 @@ ifneq (,$(strip $(SHRLIB_VERSION)))
|
||||
@$(RM) $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
|
||||
ln -s $< $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
|
||||
endif # SHRLIB_VERSION
|
||||
else # SHRLIB_SUFFIX
|
||||
ifeq ($(BUILD_CLASS),HOST)
|
||||
ifneq (,$(strip $(SHRLIB_VERSION)))
|
||||
@$(RM) $@.$(SHRLIB_VERSION)
|
||||
ln -s $< $@.$(SHRLIB_VERSION)
|
||||
endif # HOST
|
||||
endif # SHRLIB_VERSION
|
||||
endif # SHRLIB_SUFFIX
|
||||
|
||||
ifneq ($(INSTALL_TCLLIB),$(INSTALL_BIN))
|
||||
@@ -545,11 +552,11 @@ endif # LOADABLE_SHRLIB_SUFFIX
|
||||
ifneq ($(INSTALL_CONFIGS),)
|
||||
$(INSTALL_CONFIG)/%: %
|
||||
$(ECHO) "Installing config file $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $(abspath $< $(@D))
|
||||
|
||||
$(INSTALL_CONFIG)/%: ../%
|
||||
$(ECHO) "Installing config file $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $(abspath $< $(@D))
|
||||
endif
|
||||
|
||||
$(INSTALL_INCLUDE)/%: $(COMMON_DIR)/%
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
BUILD_CLASS = HOST
|
||||
|
||||
TOOLSET_LOCATION = /opt/rh
|
||||
TOOLSET = devtoolset-12
|
||||
STD_CXXFLAGS = -std=c++20
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
|
||||
BUILD_CLASS = HOST
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
BUILD_CLASS = HOST
|
||||
|
||||
TOOLSET_LOCATION = /opt/rh
|
||||
TOOLSET = gcc-toolset-12
|
||||
STD_CXXFLAGS = -std=c++20
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
|
||||
BUILD_CLASS = HOST
|
||||
|
||||
STD_CXXFLAGS = -std=c++2a
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
BUILD_CLASS = HOST
|
||||
|
||||
TOOLSET_LOCATION = /opt/rh
|
||||
TOOLSET = gcc-toolset-12
|
||||
STD_CXXFLAGS = -std=c++20
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
|
||||
BUILD_CLASS = HOST
|
||||
|
||||
STD_CXXFLAGS = -std=c++2a
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Unix valid build types
|
||||
VALID_BUILDS = Host Ioc Command
|
||||
VALID_BUILDS = $(if $(filter HOST,$(BUILD_CLASS)),Host) Ioc Command
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Unix prefix and suffix definitions
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc32
|
||||
VXWORKS_VERSION = 6.9
|
||||
#export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
|
||||
#export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH:%=%:)$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.9
|
||||
#export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
|
||||
#export LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH:%=%:)($(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
|
||||
|
||||
# -fno-implicit-fp causes error: "unable to find a register to spill in class 'FLOAT_REGS'"
|
||||
ARCH_DEP_CFLAGS = -mcpu=604 -mstrict-align
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
# Cross Debian 10 with gcc 8.3
|
||||
# Debian 10
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
ARCH_CLASS = x86_64
|
||||
|
||||
LDLIBS_SHARED_YES=LDLIBS
|
||||
|
||||
SDK = gcc
|
||||
SDK_DIR = /opt/xgcc/gcc-8.3.0-deb10
|
||||
GNU_ARCH = x86_64-deb10-linux-gnu
|
||||
SDKTARGETSYSROOT=$(SDK_DIR)/$(GNU_ARCH)/sys-root/
|
||||
GNU_DIR = $(SDK_DIR)
|
||||
GNU_BIN = $(GNU_DIR)/bin
|
||||
GNU_TARGET_INCLUDE_DIR =
|
||||
GNU_TARGET=x86_64-deb10-linux-gnu
|
||||
|
||||
ARCH_DEP_CPPFLAGS =
|
||||
AS=$(GNU_BIN)/$(GNU_TARGET)-as
|
||||
BUILD_CLASS = HOST
|
||||
|
||||
STD_CXXFLAGS = -std=c++17
|
||||
|
||||
ifneq ($(EPICS_HOST_ARCH),$(T_A))
|
||||
# Cross compile
|
||||
GNU_DIR = /opt/xgcc/gcc-8.3.0-deb10
|
||||
GNU_TARGET = x86_64-deb10-linux-gnu
|
||||
SYSROOT = $(GNU_DIR)/$(GNU_TARGET)/sys-root
|
||||
CMPLR_PREFIX = $(GNU_TARGET)-
|
||||
endif
|
||||
|
||||
17
configure/os/CONFIG.Common.deb12-x86_64
Normal file
17
configure/os/CONFIG.Common.deb12-x86_64
Normal file
@@ -0,0 +1,17 @@
|
||||
# Debian 12
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
BUILD_CLASS = HOST
|
||||
|
||||
STD_CXXFLAGS = -std=c++17
|
||||
|
||||
ifneq ($(EPICS_HOST_ARCH),$(T_A))
|
||||
# Cross compile
|
||||
GNU_DIR = /opt/xgcc/gcc-12.2.0-deb12
|
||||
GNU_TARGET = x86_64-deb12-linux-gnu
|
||||
SYSROOT = $(GNU_DIR)/$(GNU_TARGET)/sys-root
|
||||
CMPLR_PREFIX = $(GNU_TARGET)-
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(SYSROOT)/lib/x86_64-linux-gnu
|
||||
endif
|
||||
@@ -5,17 +5,10 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = gcc
|
||||
SDK_DIR = /opt/xgcc/gcc-8.5.0
|
||||
GNU_ARCH = powerpc-ppmac-linux-gnu
|
||||
SDKTARGETSYSROOT=$(SDK_DIR)/$(GNU_ARCH)/sys-root/
|
||||
GNU_DIR = $(SDK_DIR)
|
||||
GNU_BIN = $(GNU_DIR)/bin/
|
||||
GNU_TARGET_INCLUDE_DIR =
|
||||
GNU_TARGET=powerpc-ppmac-linux-gnu
|
||||
GNU_DIR = /opt/xgcc/gcc-8.5.0
|
||||
GNU_TARGET = powerpc-ppmac-linux-gnu
|
||||
|
||||
ARCH_DEP_CPPFLAGS = -m32 -mcpu=440fp -mhard-float
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath,/opt/xgcc/gcc-8.5.0/$(GNU_ARCH)/lib
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(SDKTARGETSYSROOT)/lib/powerpc-linux-gnu/
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(SDKTARGETSYSROOT)/usr/lib/powerpc-linux-gnu/
|
||||
AS=$(GNU_BIN)/$(GNU_TARGET)-as
|
||||
ARCH_DEP_CPPFLAGS = -m32 -mcpu=440fp -mhard-float
|
||||
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(GNU_DIR)/$(GNU_TARGET)/sys-root/lib/powerpc-linux-gnu
|
||||
|
||||
STD_CXXFLAGS = -std=c++17
|
||||
|
||||
@@ -42,12 +42,6 @@ ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
|
||||
OP_SYS_CFLAGS += -isysroot $(SDK_DIR)
|
||||
OP_SYS_LDFLAGS += -isysroot $(SDK_DIR)
|
||||
|
||||
#--------------------------------------------------
|
||||
# Always compile in debugging symbol table information
|
||||
#
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Compiler definitions:
|
||||
|
||||
|
||||
@@ -24,23 +24,17 @@ STATIC_LDFLAGS_NO=
|
||||
STATIC_LDLIBS_YES= -Wl,-Bdynamic
|
||||
|
||||
# Set runtime path for shared libraries if LINKER_USE_RPATH=YES
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%))
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)) $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
|
||||
SHRLIBDIR_RPATH_LDFLAGS_ORIGIN = $(shell $(MAKERPATH) -O '\$$ORIGIN' -F $(FINAL_DIR) -R $(LINKER_ORIGIN_ROOT) $(SHRLIB_DEPLIB_DIRS))
|
||||
SHRLIBDIR_LDFLAGS += \
|
||||
$(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
|
||||
# Set runtime path for products if LINKER_USE_RPATH=YES
|
||||
PRODDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%))
|
||||
PRODDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)) $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
|
||||
PRODDIR_RPATH_LDFLAGS_ORIGIN = $(shell $(MAKERPATH) -O '\$$ORIGIN' -F $(FINAL_DIR) -R $(LINKER_ORIGIN_ROOT) $(PROD_DEPLIB_DIRS))
|
||||
PRODDIR_LDFLAGS += \
|
||||
$(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
|
||||
ifneq ($(LINKER_USE_RPATH:NO=),)
|
||||
ifeq ($(T_A),$(EPICS_HOST_ARCH))
|
||||
LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH:%=%:)$(INSTALL_LIB)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Link libraries controlled by COMMANDLINE_LIBRARY
|
||||
# The newest Linux versions only need readline, older ones need both
|
||||
# readline and ncurses, and the oldest need readline and curses
|
||||
|
||||
@@ -6,7 +6,6 @@ include $(CONFIG)/os/CONFIG.Common.linux-arm
|
||||
GNU_DIR=/opt/moxa/arm-linux-4.4.2-v4
|
||||
GNU_TARGET=arm
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(GNU_DIR)/arm-none-linux-gnueabi/lib
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(INSTALL_LIB)
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ GNU_TARGET = arm-linux-gnu
|
||||
|
||||
SYSROOT = /opt/LabVIEW-RT-19.5.1/arm/sysroots/armv7a-vfp-neon-nilrt-linux-gnueabi
|
||||
GNU_BIN = /opt/RHEL7/bin
|
||||
LD_LIBRARY_PATH=/usr/$$LIB:/opt/RHEL7/$$LIB
|
||||
|
||||
# Needed on RHEL9:
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)/usr/$$LIB:/opt/RHEL7/$$LIB
|
||||
|
||||
ARCH_DEP_CPPFLAGS += -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon
|
||||
ARCH_DEP_CXXFLAGS += -I=/usr/include/c++/4.7.2/arm-nilrt-linux-gnueabi
|
||||
|
||||
@@ -37,5 +37,8 @@ SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian-x64
|
||||
# SDK_TARGET = arm-bcm2708hardfp-linux-gnueabi
|
||||
# SDK_TARGET = arm-bcm2708-linux-gnueabi
|
||||
|
||||
# gcc 4.9.3 for 64 bit hosts
|
||||
# arm-rpi-4.9.3-linux-gnueabihf
|
||||
|
||||
GNU_DIR = $(SDK_DIR)/$(SDK_TARGET)
|
||||
GNU_TARGET = $(if $(filter arm-bcm2708%,SDK_TARGET),$(SDK_TARGET),arm-linux-gnueabihf)
|
||||
|
||||
@@ -12,7 +12,10 @@ include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
SYSROOT = /opt/RHEL7
|
||||
|
||||
# "Cross" TOOLSET progs need to find their libraries
|
||||
LD_LIBRARY_PATH = $(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB)
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)$(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB)
|
||||
|
||||
# The linker has problems to find indirectly referenced libraries
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(INSTALL_LIB)
|
||||
|
||||
# These programs have library problems when using them
|
||||
# from SYSROOT but without TOOLSET.
|
||||
|
||||
@@ -12,7 +12,7 @@ include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
SYSROOT = /opt/RHEL7
|
||||
|
||||
# "Cross" TOOLSET progs need to find their libraries
|
||||
LD_LIBRARY_PATH = $(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB:)/usr/$$LIB:$(SYSROOT)/usr/$$LIB
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)$(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB:)/usr/$$LIB:$(SYSROOT)/usr/$$LIB
|
||||
|
||||
# The linker has problems to find indirectly referenced libraries
|
||||
PROD_LDLIBS += $(LDLIBS)
|
||||
|
||||
@@ -15,7 +15,6 @@ SYSROOT = /opt/RHEL8
|
||||
# Thus only wrap the compiler.
|
||||
WRAPPER = -wrapper env,LD_LIBRARY_PATH=$(TOOLSET_DIR:%=$(SYSROOT)%/usr/lib64:)/usr/lib64:$(SYSROOT)/usr/lib64
|
||||
TARGET_CPPFLAGS += $(WRAPPER)
|
||||
TARGET_PROD_LDFLAGS += $(WRAPPER)
|
||||
|
||||
# These programs as cross tools would also need LD_LIBRARY_PATH.
|
||||
# But but our host versions work just fine.
|
||||
|
||||
@@ -39,12 +39,6 @@ OP_SYS_CFLAGS += -fno-common
|
||||
#
|
||||
OP_SYS_CPPFLAGS += -Ddarwin
|
||||
|
||||
#
|
||||
# Always compile in debugging symbol table information
|
||||
#
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
|
||||
#
|
||||
# Libraries for command-line editing.
|
||||
#
|
||||
|
||||
3
configure/os/CONFIG.deb10-x86_64.Common
Normal file
3
configure/os/CONFIG.deb10-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
include $(CONFIG)/os/CONFIG.linux-x86_64.Common
|
||||
3
configure/os/CONFIG.deb10-x86_64.deb10-x86_64
Normal file
3
configure/os/CONFIG.deb10-x86_64.deb10-x86_64
Normal file
@@ -0,0 +1,3 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
GNU_DIR=/usr
|
||||
3
configure/os/CONFIG.deb12-x86_64.Common
Normal file
3
configure/os/CONFIG.deb12-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
include $(CONFIG)/os/CONFIG.linux-x86_64.Common
|
||||
3
configure/os/CONFIG.deb12-x86_64.deb12-x86_64
Normal file
3
configure/os/CONFIG.deb12-x86_64.deb12-x86_64
Normal file
@@ -0,0 +1,3 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
GNU_DIR=/usr
|
||||
2
configure/os/CONFIG_SITE.Common.deb12-x86_64
Normal file
2
configure/os/CONFIG_SITE.Common.deb12-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Debian 10
|
||||
COMMANDLINE_LIBRARY=READLINE
|
||||
@@ -18,6 +18,8 @@ GNU_DIR = $(SYSROOT)$(TOOLSET_DIR)
|
||||
TARGET_CPPFLAGS += $(SYSROOT:%=--sysroot=%)
|
||||
TARGET_LDFLAGS += $(SYSROOT:%=--sysroot=%)
|
||||
|
||||
ifeq ($(filter SL% RHEL%,$(T_A)),)
|
||||
VALID_BUILDS = Ioc Command
|
||||
endif
|
||||
# backward compatibility: Keep unversioned libs
|
||||
# in order to prevent dynamic linking problems
|
||||
# when minor changes increment *_MAINTENANCE_VERSION
|
||||
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
|
||||
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
|
||||
|
||||
@@ -92,6 +92,9 @@ WIND_BASE = /opt/VxWorks/VxWorks$(VXWORKS_VERSION)
|
||||
#--------------------------------------------------
|
||||
# Modules we cannot build with old compiler
|
||||
|
||||
# For the license counter
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
|
||||
|
||||
PV_MODULES = pv% normativeTypes
|
||||
SKIP_BUILDS_5 = $(PV_MODULES)
|
||||
SKIP_BUILDS_OLD = $(PV_MODULES)
|
||||
|
||||
5
configure/os/CONFIG_SITE.UnixCommon.Common
Normal file
5
configure/os/CONFIG_SITE.UnixCommon.Common
Normal file
@@ -0,0 +1,5 @@
|
||||
# Make sure hosts tools find their libraries during build
|
||||
# even if FINAL_LOCATION differs from INSTALL_LOCATION
|
||||
ifneq ($(FINAL_LOCATION:$(INSTALL_LOCATION)=),)
|
||||
export LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH:%=%:)$(INSTALL_HOST_LIB)
|
||||
endif
|
||||
@@ -6,11 +6,3 @@
|
||||
# GNU_DIR used when COMMANDLINE_LIBRARY is READLINE
|
||||
#GNU_DIR=C:/cygwin
|
||||
|
||||
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
|
||||
|
||||
@@ -3,10 +3,3 @@
|
||||
# Site specific definitions for native linux-aarch64 builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
|
||||
|
||||
@@ -11,10 +11,6 @@ INSTALL_LOCATION=/usr/local/epics/base-$(EPICS_VERSION).$(EPICS_REVISION).$(EPIC
|
||||
GNU_HOST_ARCH=i686
|
||||
GNU_HOST_OS=linux
|
||||
|
||||
# set LD_LIBRARY_PATH may cause problems for eldk53-ppc4xxFP
|
||||
# not exported LD_LIBRARY_PATH causes problem for RHEL7 cross compilation
|
||||
export LD_LIBRARY_PATH=
|
||||
|
||||
# vxWorks for MVxxxx boards
|
||||
#CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V67-ppc604
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Needed by gcc
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(RTEMS_BASE)/lib
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)$(RTEMS_BASE)/lib
|
||||
|
||||
|
||||
@@ -21,8 +21,9 @@ CROSS_COMPILER_TARGET_ARCHS += windows-x64
|
||||
#CROSS_COMPILER_TARGET_ARCHS += yocto21-aarch64
|
||||
CROSS_COMPILER_TARGET_ARCHS += yocto40-aarch64
|
||||
|
||||
# Debian 10
|
||||
# Debian
|
||||
CROSS_COMPILER_TARGET_ARCHS += deb10-x86_64
|
||||
CROSS_COMPILER_TARGET_ARCHS += deb12-x86_64
|
||||
|
||||
# Newer DeltaTau PowerPMAC
|
||||
CROSS_COMPILER_TARGET_ARCHS += gcc8-ppc4xxFP
|
||||
|
||||
@@ -47,3 +47,8 @@ COMMANDLINE_LIBRARY ?= EPICS
|
||||
#else
|
||||
COMMANDLINE_LIBRARY ?= $(strip $(if $(wildcard $(if $(GNU_DIR),$(GNU_DIR)/include/readline/readline.h)), READLINE, EPICS))
|
||||
#endif
|
||||
|
||||
#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE>2
|
||||
OP_SYS_CPPFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,7 +20,139 @@ should also be read to understand what has changed since earlier releases:
|
||||
|
||||
**This version of EPICS has not been released yet.**
|
||||
|
||||
## Changes made on the 7.0 branch since 7.0.7
|
||||
## Changes made on the 7.0 branch since 7.0.8.1
|
||||
|
||||
### DBE_PROPERTY event rate changed
|
||||
|
||||
Updating property fields now only post DBE_PROPERTY events if the
|
||||
field actually changed.
|
||||
|
||||
### Allow to load the same alias multiple times
|
||||
|
||||
Aliases can now be defined multiple times as long as they still refer to the
|
||||
same record, unless the shell variable dbRecordsOnceOnly is set.
|
||||
This allows to load database files multiple times, even if they contain
|
||||
alias definitions.
|
||||
|
||||
### Allow users to delete previously created records from the database
|
||||
|
||||
From this release, record instances and aliases that have already been loaded
|
||||
by an IOC can be removed from the database again before the call to iocInit
|
||||
by loading a second instance of the named records but using `"#"` in place of
|
||||
the record type. Values for the fields are not required or advised, just use
|
||||
an empty record body { }. This is useful when a template defines records that
|
||||
are not wanted in some IOCs, without having to split or duplicate the original
|
||||
template.
|
||||
|
||||
For example this will remove the record named "unwanted":
|
||||
|
||||
```
|
||||
record("#", "unwanted") { }
|
||||
```
|
||||
|
||||
-----
|
||||
|
||||
## EPICS Release 7.0.8.1
|
||||
|
||||
### Limit to `_FORTIFY_SOURCE=2`
|
||||
|
||||
GCC versions 12 and beyond and glibc have added some aggressive runtime
|
||||
checks for buffer overflows in libc functions at runtime, and the
|
||||
[Ubuntu 2024.04](https://wiki.ubuntu.com/ToolChain/CompilerFlags) release
|
||||
increased their default gcc fortification level from 2 to 3.
|
||||
This has started causing EPICS Base builds to fail on that version, and
|
||||
other OS releases may make that configuration change with similar results.
|
||||
This release detects a compiler configured with `_FORTIFY_SOURCE=3` and
|
||||
overrides it to 2.
|
||||
Later releases of Base will adjust the code, providing information to the
|
||||
compiler to avoid triggering these incorrect protections.
|
||||
|
||||
### Fix issue with compress record
|
||||
|
||||
In Base 7.0.8, an update to the compress record was added to allow for certain
|
||||
algorithms to use partially filled buffers in their computations. Unfortunately,
|
||||
this broke the behaviour of the records in certain cases. This has been fixed.
|
||||
|
||||
### Various minor changes
|
||||
|
||||
These included fixing minor memory leaks and documentation corrections. The
|
||||
`SIZV` field of lsi, lso and printf record VAL fields now can't exceed 32767
|
||||
characters, to match an internal limit.
|
||||
|
||||
### `epicsSocketAccept()` now returns `SOCKET`, not `int`
|
||||
|
||||
This might have some effect on downstream modules still using `int`, but the
|
||||
OS-specific osdSock.h headers which osiSock.h includes have all declared
|
||||
`SOCKET` (in most casese as a typedef for `int`) for many releases.
|
||||
This change removes a compiler warning on WIN32.
|
||||
Further details and the discussion about this change can be found
|
||||
[here](https://github.com/epics-base/epics-base/pull/458).
|
||||
|
||||
### `dbLoadRecords` allows macros with default values
|
||||
|
||||
Previously the parser assumed that files containing macro substitutions were
|
||||
bad if no macro definitions were provided; that assumption was made incorrect
|
||||
once macro substitutions were allowed to provide a default value.
|
||||
|
||||
### Hostname length limit in CA removed
|
||||
|
||||
Before this release, the CA client library only handled hostnames in address
|
||||
list environment variables up to 255 characters long.
|
||||
This limit has been removed.
|
||||
|
||||
-----
|
||||
|
||||
## EPICS Release 7.0.8
|
||||
|
||||
### bi "Raw Soft Channel" use MASK
|
||||
|
||||
If MASK is non-zero, The raw device support will now apply MASK to the
|
||||
value read into RVAL.
|
||||
eg. allows extraction of a bit from an input integer.
|
||||
|
||||
```
|
||||
record(longin, "integer") {
|
||||
field(VAL, "0xff")
|
||||
}
|
||||
record(bi, "bit1") {
|
||||
field(DESC, "extract bit 1")
|
||||
field(DTYP, "Raw Soft Channel")
|
||||
field(INP , "integer")
|
||||
field(MASK, "0x2")
|
||||
field(ZNAM, "Clear")
|
||||
field(ONAM, "Set")
|
||||
}
|
||||
```
|
||||
|
||||
### ANSI escapes in stderr
|
||||
|
||||
ANSI escape charactor sequences may now be printed to the stderr stream.
|
||||
These escapes will appear in logs captured from that stream.
|
||||
Tools which parse and/or render these logs may need to be adjusted to
|
||||
either strip out the escapes, or to translate them into markup.
|
||||
(see [ansi2html](https://pypi.org/project/ansi2html/) for example)
|
||||
|
||||
### Allow explicit append with `dbRecordsOnceOnly!=0`
|
||||
|
||||
Previously setting `dbRecordsOnceOnly!=0` prevented any further changes to a record via a .db file. eg.
|
||||
|
||||
```
|
||||
record(ai, "myrec") {}
|
||||
```
|
||||
|
||||
`dbRecordsOnceOnly!=0` previously disallowed appending fields with either form:
|
||||
|
||||
```
|
||||
record("*", "myrec") {} # error
|
||||
record(ai, "myrec") {} # error
|
||||
```
|
||||
|
||||
Beginning with this release, `dbRecordsOnceOnly!=0` allows appending when explicitly intended (when record type is `"*"`).
|
||||
|
||||
```
|
||||
record("*", "myrec") {} # allowed
|
||||
record(ai, "myrec") {} # error
|
||||
```
|
||||
|
||||
### PROC field changed to ASL0
|
||||
|
||||
|
||||
@@ -48,14 +48,14 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<p>The following roles are used below:</p>
|
||||
|
||||
<dl>
|
||||
<dt><strong>Release Manager</strong> ()</dt>
|
||||
<dt><strong>Release Manager</strong></dt>
|
||||
<dd>Responsible for managing and tagging the release</dd>
|
||||
<dt><strong>Platform Developers</strong> (informal)</dt>
|
||||
<dd>Responsible for individual operating system platforms</dd>
|
||||
<dt><strong>Core Developers</strong></dt>
|
||||
<dd>Responsible for maintaining the EPICS software</dd>
|
||||
<dt><strong>Application Developers</strong></dt>
|
||||
<dd>Responsible for support modules that depend on EPICS Base.</dd>
|
||||
<dt><strong>APS Website Editor</strong> (Andrew Johnson)</dt>
|
||||
<dd>Responsible for the APS EPICS website</dd>
|
||||
<dt><strong>Website Editors</strong></dt>
|
||||
<dd>Responsible for the EPICS websites</dd>
|
||||
</dl>
|
||||
|
||||
<form>
|
||||
@@ -72,23 +72,22 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>Release Manager</td>
|
||||
<td>Email all developers about the upcoming release and ask for a list
|
||||
of remaining tasks that must be finished.</td>
|
||||
<td>Notify core developers about the upcoming release and ask about any
|
||||
remaining tasks that must be finished.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>All developers</td>
|
||||
<td>Check the bug tracker for any outstanding items and handle
|
||||
appropriately. All bugs that have been fixed should have been marked
|
||||
as Fix Committed.</td>
|
||||
appropriately.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>Release Manager</td>
|
||||
<td>Set the Feature Freeze date, by which time all Git commits for
|
||||
enhancements and new functionality should have been completed. After
|
||||
this date, commits should only be made to fix problems that show up
|
||||
during testing.</td>
|
||||
<td>Set a Feature Freeze date, by which time all Git branches for
|
||||
enhancements and new functionality should have been merged. After this
|
||||
date, commits and merges should only be made to fix problems that show
|
||||
up during testing.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -97,6 +96,7 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<td>Ensure that documentation will be updated before the release date:
|
||||
<ul>
|
||||
<li>Release Notes</li>
|
||||
<li>Doxygen annotations</li>
|
||||
<li>Other documents</li>
|
||||
</ul>
|
||||
</td>
|
||||
@@ -104,13 +104,8 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>Release Manager</td>
|
||||
<td>Review and update this checklist for the upcoming release.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>Release Manager</td>
|
||||
<td>Create a release milestone on Launchpad. If a target release date is
|
||||
known set "Date Targeted" to the expected release date.</td>
|
||||
<td>Review and update this checklist for the upcoming release.
|
||||
Update the release version number in the tags and messages below.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3">Testing</th>
|
||||
@@ -118,7 +113,7 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>Platform Developers</td>
|
||||
<td>Run the built-in test programs on all available host platforms using
|
||||
<td>Run the internal test programs on all available host platforms using
|
||||
<blockquote><tt>
|
||||
make -s runtests
|
||||
</tt></blockquote></td>
|
||||
@@ -156,6 +151,7 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<td>Check that documentation has been updated:
|
||||
<ul>
|
||||
<li>Release Notes</li>
|
||||
<li>Doxygen annotations</li>
|
||||
<li>Other documents</li>
|
||||
</ul>
|
||||
</td>
|
||||
@@ -167,8 +163,8 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td>Release Manager</td>
|
||||
<td>Obtain a positive <q>Ok to release</q> from developers.</td>
|
||||
<td>Core Developers</td>
|
||||
<td>Reach a consensus that the software is ready to release.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3">Creating the final release version</th>
|
||||
@@ -183,35 +179,56 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<li><tt>git grep UNRELEASED</tt> and insert the module version to any
|
||||
doxygen annotations that have a <tt>@since UNRELEASED</tt> comment.
|
||||
Commit (don't push yet).</li>
|
||||
|
||||
<li>Check that the module's Release Notes have been updated to cover
|
||||
all changes; add items as necessary, and set the module version
|
||||
number and release date if appropriate. Convert to HTML and view in
|
||||
a browser to check the formatting:
|
||||
<blockquote><tt>
|
||||
cd base-7.0/modules/<module>/documentation<br />
|
||||
pandoc -f gfm -t html -o RELEASE_NOTES.html RELEASE_NOTES.md
|
||||
</tt></blockquote>
|
||||
Commit changes (don't push).</li>
|
||||
number and release date if appropriate.
|
||||
Commit these changes (don't push).</li>
|
||||
|
||||
<li>Edit the module's release version file
|
||||
<tt>configure/CONFIG_<i>module</i>_VERSION</tt> and its top-level
|
||||
<tt>Doxyfile</tt>; set the <tt>DEVELOPMENT_FLAG</tt> value to 0 and
|
||||
remove <tt>-dev</tt> from the <tt>PROJECT_NUMBER</tt> string.
|
||||
Commit changes (don't push).</li>
|
||||
|
||||
<li>Tag the module:
|
||||
<tt>configure/CONFIG_<i>module</i>_VERSION</tt> and the
|
||||
<tt>Doxyfile</tt>s in the top-level and/or documentation
|
||||
directories. In these, set <tt>DEVELOPMENT_FLAG</tt> to 0 and remove
|
||||
<tt>-dev</tt> from the <tt>PROJECT_NUMBER</tt> string. Commit these
|
||||
changes (don't push):
|
||||
<blockquote><tt>
|
||||
git tag -m 'ANJ: Tag for EPICS 7.0.7' <module-version>
|
||||
git ci -m 'Final commit for <module-version>'
|
||||
</tt></blockquote>
|
||||
</li>
|
||||
|
||||
<li>Tag the module:
|
||||
<blockquote><tt>
|
||||
git tag -m 'ANJ: Tag for EPICS 7.0.8.2' <module-version>
|
||||
</tt></blockquote>
|
||||
</li>
|
||||
|
||||
<li>Generate documentation or Release Notes using one of these:
|
||||
<ul>
|
||||
<li>For older modules with a RELEASE_NOTES.md file convert it to
|
||||
HTML and view in a browser to check the formatting as follows:
|
||||
<blockquote><tt>
|
||||
cd base-7.0/modules/<module>/documentation<br />
|
||||
pandoc -f gfm -t html -o RELEASE_NOTES.html RELEASE_NOTES.md
|
||||
</tt></blockquote>
|
||||
|
||||
<li>For newer modules with release_notes.dox file, generate the
|
||||
new github-pages website as follows:
|
||||
<blockquote><tt>
|
||||
cd base-7.0/modules/<module>/documentation<br />
|
||||
make commit
|
||||
git push --force upstream gh-pages
|
||||
</tt></blockquote>
|
||||
<i>Q: Delay this <tt>git push</tt> until later?</i></li>
|
||||
</ul></li>
|
||||
|
||||
<li>Update the git submodule on the Base-7.0 branch to the
|
||||
newly-tagged version, but don't commit yet:
|
||||
newly-tagged version, check the module's status matches the tag:
|
||||
<blockquote><tt>
|
||||
cd base-7.0/modules<br />
|
||||
git add <module><br />
|
||||
git submodule status --cached
|
||||
</tt></blockquote>
|
||||
Don't commit the submodule updates yet.
|
||||
</li>
|
||||
|
||||
<li>Edit the module's release version file
|
||||
@@ -221,7 +238,8 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<tt>PROJECT_NUMBER</tt> string, appending <tt>-dev</tt> to the new
|
||||
module version number. Commit changes.</li>
|
||||
|
||||
<li>Push commits and the new tag to the submodule's GitHub repository:
|
||||
<li>Push commits and the new tag to the submodule's GitHub repository
|
||||
(assumed to be the <tt>upstream</tt> remote):
|
||||
<blockquote><tt>
|
||||
cd base-7.0/modules/<module><br />
|
||||
git push --follow-tags upstream master
|
||||
@@ -270,10 +288,9 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<td>Tag the epics-base module in Git:
|
||||
<blockquote><tt>
|
||||
cd base-7.0<br />
|
||||
git tag -m 'ANJ: Tagged for release' R7.0.7
|
||||
git tag -m 'ANJ: Tagged for release' R7.0.8.2
|
||||
</tt></blockquote>
|
||||
<p>Don't push anything to the Launchpad repository
|
||||
yet.</p>
|
||||
<p>Don't push to GitHub yet.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -305,12 +322,12 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
files and directories that are only used for continuous integration:
|
||||
<blockquote><tt>
|
||||
cd base-7.0<br />
|
||||
./.tools/make-tar.sh R7.0.7 ../base-7.0.7.tar.gz base-7.0.7/
|
||||
./.tools/make-tar.sh R7.0.8.2 ../base-7.0.8.2.tar.gz base-7.0.8.2/
|
||||
</tt></blockquote>
|
||||
Create a GPG signature file of the tarfile as follows:
|
||||
<blockquote><tt>
|
||||
cd ..<br />
|
||||
gpg --armor --sign --detach-sig base-7.0.7.tar.gz
|
||||
gpg --armor --sign --detach-sig base-7.0.8.2.tar.gz
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -318,8 +335,9 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<td><input type="checkbox"></td>
|
||||
<td>Release Manager</td>
|
||||
<td>Test the tar file by extracting its contents and building it on at
|
||||
least one supported platform. When this succeeds the commits and new git
|
||||
tag can be pushed to the Launchpad repository:
|
||||
least one supported platform. If this succeeds the commits and new git
|
||||
tag can be pushed to the GitHub repository's 7.0 branch (assumed to be
|
||||
the <tt>upstream</tt> remote):
|
||||
<blockquote><tt>
|
||||
git push --follow-tags upstream 7.0
|
||||
</tt></blockquote>
|
||||
@@ -367,7 +385,7 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="3">Publish to epics-controls</th>
|
||||
<th colspan="3">Publish to epics-controls.org</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
@@ -375,7 +393,7 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<td>Upload the tar file and its <tt>.asc</tt> signature file to the
|
||||
epics-controls web-server.
|
||||
<blockquote><tt>
|
||||
scp base-7.0.7.tar.gz base-7.0.7.tar.gz.asc epics-controls:download/base<br />
|
||||
scp base-7.0.8.2.tar.gz base-7.0.8.2.tar.gz.asc epics-controls:download/base<br />
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -392,22 +410,22 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="3">Publish to Launchpad</th>
|
||||
<th colspan="3">Publish to GitHub</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td>Release Manager</td>
|
||||
<td>Go to the Launchpad milestone for this release. Click the Create
|
||||
release button and add the release date. Put a URL for the release page
|
||||
in the Release notes box, and click the Create release button. Upload
|
||||
the tar file and its <tt>.asc</tt> signature file to the new Launchpad
|
||||
release page.</td>
|
||||
<td>Go to the GitHub
|
||||
<a href="https://github.com/epics-base/epics-base/releases/new?tag=R7.0.8.2">
|
||||
Create release from tag R7.0.8.2</a> page.
|
||||
Upload the tar file and its <tt>.asc</tt> signature file to the new
|
||||
GitHub release page.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td>Release Manager</td>
|
||||
<td>Find all Launchpad bug reports with the status Fix Committed which
|
||||
have been fixed in this release and mark them Fix Released.</td>
|
||||
<td>We used to close out bug reports in Launchpad at release-time, this
|
||||
would be the time to do that if we have an equivalent on GitHub.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
_OLD_EXTGLOB=$(shopt -p extglob)
|
||||
shopt -s extglob
|
||||
test -n "$EPICS_BASE" || export EPICS_BASE=$(ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/ | head -n1)
|
||||
test -n "$EPICS_HOST_ARCH" || export EPICS_HOST_ARCH=$(/bin/sed "s%cpe:/o:redhat:enterprise_linux:\([0-9]*\).*%RHEL\1-`/bin/uname -m`%" /etc/system-release-cpe)
|
||||
PATH=${PATH//\/usr\/local\/epics\/base-+([0-9]).+([0-9]).+([0-9])\/bin\/$EPICS_HOST_ARCH}:$(echo $(ls -dvr /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/$EPICS_HOST_ARCH) | tr ' ' :)
|
||||
PATH=${PATH//?(:)\/usr\/local\/epics\/base-+([0-9]).+([0-9]).+([0-9])\/bin\/$EPICS_HOST_ARCH}:$EPICS_BASE/bin/$EPICS_HOST_ARCH
|
||||
eval $_OLD_EXTGLOB
|
||||
unset _OLD_EXTGLOB
|
||||
|
||||
|
||||
269
epics-base.spec
269
epics-base.spec
@@ -1,19 +1,22 @@
|
||||
# Always make sure EpicsVersion.Version-Release matches the git tag!
|
||||
|
||||
%define EpicsVersion 7.0.7
|
||||
%define EpicsVersion 7.0.8
|
||||
|
||||
Name: epics-base-%{EpicsVersion}
|
||||
Summary: EPICS Base %{EpicsVersion}
|
||||
Version: 1
|
||||
Release: 3%{?dist}
|
||||
Version: 2
|
||||
Release: 2%{?dist}
|
||||
License: EPICS Open License
|
||||
Group: Development/Languages
|
||||
URL: https://git.psi.ch/epics_base/base-7.0
|
||||
|
||||
Obsoletes: caRepeater = 1
|
||||
|
||||
%define module_name %{name}
|
||||
%define prog_folder /usr/local/epics/base-%{EpicsVersion}
|
||||
|
||||
%define debug_package %{nil}
|
||||
%define _build_id_links none
|
||||
|
||||
# do not strip libraries
|
||||
%global __strip /bin/true
|
||||
@@ -26,6 +29,7 @@ URL: https://git.psi.ch/epics_base/base-7.0
|
||||
%if %{defined rhel}
|
||||
%global epics_host_arch RHEL%{rhel}-%{_host_cpu}
|
||||
%endif
|
||||
# else define epics_host_arch as suitable
|
||||
|
||||
%description
|
||||
EPICS is a set of Open Source software tools, libraries and applications
|
||||
@@ -39,6 +43,12 @@ This RPM is a binary-only package.
|
||||
%package host-devel
|
||||
Requires: make >= 3.80
|
||||
BuildRequires: make >= 3.80
|
||||
BuildRequires: gfa-cross-compiler-links
|
||||
%if %{?rhel} >= 9
|
||||
BuildRequires: gfa-wine
|
||||
%else
|
||||
BuildRequires: wine
|
||||
%endif
|
||||
|
||||
Summary: Minimal stuff needed to build EPICS host apps
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
@@ -73,11 +83,9 @@ Requires: perl-File-Find perl-File-Basename perl-File-Copy perl-FindBin pe
|
||||
BuildRequires: perl-File-Find perl-File-Basename perl-File-Copy perl-FindBin perl-Getopt-Std perl-POSIX
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} == 7
|
||||
# Perl auto-detection is broken
|
||||
# It does not find all EPICS internal packages
|
||||
%global __requires_exclude_from ^%{prog_folder}/bin/.*\\.pl$
|
||||
%endif
|
||||
|
||||
%description host-devel
|
||||
Contains headers etc to build EPICS host applications.
|
||||
@@ -97,8 +105,11 @@ Contains EPICS binaries that run on other RHEL versions.
|
||||
%package wine
|
||||
Summary: EPICS base %{EpicsVersion} for wine
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%if %{?rhel} >= 9
|
||||
Requires: gfa-wine
|
||||
%else
|
||||
Requires: wine
|
||||
BuildRequires: wine
|
||||
%endif
|
||||
|
||||
%description wine
|
||||
Allows to run EPICS in wine.
|
||||
@@ -121,7 +132,6 @@ This package can be relocated.
|
||||
Summary: EPICS base %{EpicsVersion} for development environments
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}-host-devel = %{version}-%{release}
|
||||
Requires: %{name}-boot = %{version}-%{release}
|
||||
Requires: gfa-cross-compiler-links
|
||||
BuildArch: noarch
|
||||
AutoReqProv: no
|
||||
@@ -168,7 +178,7 @@ The documentation of EPICS base %{EpicsVersion}.
|
||||
|
||||
# Our sources are locally in this directory
|
||||
# and here we also build
|
||||
# RPMS and SRPMS will be stored here, too
|
||||
# RPMS will be stored here, too
|
||||
%define _topdir %(pwd)
|
||||
%define _sourcedir %{_topdir}
|
||||
%define _builddir %{_topdir}
|
||||
@@ -176,72 +186,83 @@ The documentation of EPICS base %{EpicsVersion}.
|
||||
%prep
|
||||
%{__rm} -rf %{buildroot}/usr/lib
|
||||
%{__rm} -f modules/RELEASE.*.local
|
||||
git submodule update --init modules
|
||||
git submodule update --init --recursive modules
|
||||
%{__mkdir_p} RPMS
|
||||
|
||||
%build
|
||||
%if %{defined epics_host_arch}
|
||||
export EPICS_HOST_ARCH=%{epics_host_arch}
|
||||
%endif
|
||||
%{__make} -j $RPM_BUILD_NCPUS INSTALL_LOCATION=%{buildroot}/%{prog_folder} FINAL_LOCATION=%{prog_folder}
|
||||
%{__make} INSTALL_LOCATION=%{buildroot}/%{prog_folder} copysrc
|
||||
%{__make} INSTALL_LOCATION=%{buildroot}%{prog_folder} FINAL_LOCATION=%{prog_folder}
|
||||
%{__make} INSTALL_LOCATION=%{buildroot}%{prog_folder} copysrc
|
||||
|
||||
# remove files we do not need
|
||||
shopt -s extglob
|
||||
%{__rm} -f %{buildroot}/%{prog_folder}/bin/{V,RTEMS}*/{*Harness,softIoc,softIocPVA}
|
||||
%{__rm} -f %{buildroot}/%{prog_folder}/bin/RTEMS*/TEMP.*
|
||||
%{__rm} -f %{buildroot}%{prog_folder}/bin/{V,RTEMS}*/{*Harness,softIoc,softIocPVA}
|
||||
%{__rm} -f %{buildroot}%{prog_folder}/bin/RTEMS*/TEMP.*
|
||||
|
||||
# fix permissions of caRepeater.service
|
||||
%{__chmod} 644 %{buildroot}%{prog_folder}/bin/*/caRepeater.service
|
||||
|
||||
# install the profile script
|
||||
%{__install} epics-base.sh %{buildroot}/%{prog_folder}/bin
|
||||
/bin/sed 's!\$EPICS_BASE!%{prog_folder}!' epics-base.sh > %{buildroot}%{prog_folder}/bin/epics-base.sh
|
||||
|
||||
# copy over old libraries for compatibility
|
||||
%if %{?rhel} > 7
|
||||
%{__cp} /opt/RHEL7/lib64/libreadline.so.6 %{buildroot}%{prog_folder}/lib/RHEL7-x86_64
|
||||
%endif
|
||||
%if %{?rhel} > 8
|
||||
%{__cp} /opt/RHEL7/lib64/libtinfo.so.5 %{buildroot}%{prog_folder}/lib/RHEL7-x86_64
|
||||
%{__cp} /opt/RHEL8/lib64/libreadline.so.7 %{buildroot}%{prog_folder}/lib/RHEL8-x86_64
|
||||
%endif
|
||||
|
||||
# Do not use install section because build already installed
|
||||
# and install will delete our buildroot!
|
||||
|
||||
%clean
|
||||
%{__make} realclean
|
||||
%{__make} INSTALL_LOCATION=%{buildroot}%{prog_folder} realclean
|
||||
%{__rm} -f modules/RELEASE.*.local
|
||||
%{__rm} -rf %{buildroot}
|
||||
%{__cp} %{_rpmdir}/*/%{name}*%{version}-%{release}.*.rpm %{_sourcedir}
|
||||
|
||||
# Link caRepeater and profile script to highest installed EPICS version after install and uninstall
|
||||
%post
|
||||
shopt -s extglob
|
||||
|
||||
if [ -e /etc/profile.d/epics-base.sh ]
|
||||
then
|
||||
%{__rm} -f /etc/profile.d/epics-base.sh
|
||||
fi
|
||||
%{__rm} -f /etc/profile.d/epics-base.sh
|
||||
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/epics-base.sh | /usr/bin/head -n1)" /etc/profile.d/
|
||||
|
||||
SYSTEMD_DIR=$(pkg-config systemd --variable=systemdsystemunitdir)
|
||||
if [ -n "$SYSTEMD_DIR" ]
|
||||
then
|
||||
systemctl is-enabled caRepeater.service 2>/dev/null && systemctl disable --now caRepeater.service
|
||||
test -e $SYSTEMD_DIR/caRepeater.service && %{__rm} $SYSTEMD_DIR/caRepeater.service
|
||||
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service | /usr/bin/head -n1)" $SYSTEMD_DIR/
|
||||
%{__rm} -f $SYSTEMD_DIR/caRepeater.service
|
||||
LATEST_REPEATER=$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service | /usr/bin/head -n1)
|
||||
%{__ln_s} $LATEST_REPEATER $SYSTEMD_DIR/
|
||||
systemctl daemon-reload
|
||||
killall caRepeater 2>/dev/null
|
||||
systemctl enable --now caRepeater.service
|
||||
systemctl reenable caRepeater.service
|
||||
systemctl start caRepeater.service
|
||||
fi
|
||||
|
||||
%postun
|
||||
shopt -s extglob
|
||||
|
||||
if [ -e /etc/profile.d/epics-base.sh ]
|
||||
then
|
||||
%{__rm} -f /etc/profile.d/epics-base.sh
|
||||
fi
|
||||
%{__rm} -f /etc/profile.d/epics-base.sh
|
||||
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/epics-base.sh 2>/dev/null | /usr/bin/head -n1)" /etc/profile.d/ 2>/dev/null
|
||||
|
||||
SYSTEMD_DIR=$(pkg-config systemd --variable=systemdsystemunitdir)
|
||||
if [ -n "$SYSTEMD_DIR" ]
|
||||
then
|
||||
systemctl disable --now caRepeater.service
|
||||
%{__rm} -f $SYSTEMD_DIR/caRepeater.service
|
||||
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service 2>/dev/null | /usr/bin/head -n1)" $SYSTEMD_DIR/ 2>/dev/null
|
||||
systemctl daemon-reload
|
||||
if [ -e $SYSTEMD_DIR/caRepeater.service ]
|
||||
LATEST_REPEATER=$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service 2>/dev/null | /usr/bin/head -n1)
|
||||
if [ -z "$LATEST_REPEATER" ]
|
||||
then
|
||||
killall caRepeater 2>/dev/null
|
||||
systemctl enable --now caRepeater.service
|
||||
systemctl disable caRepeater.service
|
||||
# Do not stop or restart caRepeater.service
|
||||
# because EPICS clients cannot handle that.
|
||||
# Next reboot will take care of this.
|
||||
fi
|
||||
%{__rm} -f $SYSTEMD_DIR/caRepeater.service
|
||||
if [ -n "$LATEST_REPEATER" ]
|
||||
then
|
||||
%{__ln_s} $LATEST_REPEATER $SYSTEMD_DIR/ 2>/dev/null
|
||||
systemctl reenable caRepeater.service
|
||||
fi
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
%files
|
||||
@@ -258,36 +279,49 @@ fi
|
||||
%{prog_folder}/db
|
||||
|
||||
%{prog_folder}/bin/epics-base.sh
|
||||
%{prog_folder}/lib/perl/EpicsHostArch.pl
|
||||
%{prog_folder}/lib/perl/CA.pm
|
||||
%dir %{prog_folder}/lib/perl
|
||||
%dir %{prog_folder}/lib/perl/*
|
||||
%dir %{prog_folder}/lib/perl/*/*-linux-thread-multi
|
||||
%{prog_folder}/lib/perl/*/*-linux-thread-multi/libCap5.so
|
||||
|
||||
# Install host binaries but avoid installing *.pl scripts
|
||||
# and other development tools
|
||||
|
||||
%if %{defined rhel}
|
||||
%dir %{prog_folder}/bin/RHEL%{rhel}*
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/[Scips]*[^.]??
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/p2p
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/msi
|
||||
%dir %{prog_folder}/lib/RHEL%{rhel}*
|
||||
%{prog_folder}/lib/RHEL%{rhel}*/*.so*
|
||||
%endif
|
||||
%dir %{prog_folder}/bin/%{epics_host_arch}*
|
||||
%{prog_folder}/bin/%{epics_host_arch}*/[Scips]*[^.]??
|
||||
%{prog_folder}/bin/%{epics_host_arch}*/p2p
|
||||
%{prog_folder}/bin/%{epics_host_arch}*/msi
|
||||
%dir %{prog_folder}/lib/%{epics_host_arch}*
|
||||
%{prog_folder}/lib/%{epics_host_arch}*/*.so*
|
||||
|
||||
###########################################
|
||||
|
||||
%files compat
|
||||
%if %{?rhel} > 7
|
||||
%{prog_folder}/bin/RHEL7*
|
||||
%dir %{prog_folder}/bin/RHEL7*
|
||||
%{prog_folder}/bin/RHEL7*/[Scips]*[^.]??
|
||||
%{prog_folder}/bin/RHEL7*/p2p
|
||||
%{prog_folder}/bin/RHEL7*/msi
|
||||
%dir %{prog_folder}/lib/RHEL7*
|
||||
%{prog_folder}/lib/RHEL7*/*.so*
|
||||
%endif
|
||||
|
||||
%if %{?rhel} > 8
|
||||
%{prog_folder}/bin/RHEL8*
|
||||
%dir %{prog_folder}/bin/RHEL8*
|
||||
%{prog_folder}/bin/RHEL8*/[Scips]*[^.]??
|
||||
%{prog_folder}/bin/RHEL8*/p2p
|
||||
%{prog_folder}/bin/RHEL8*/msi
|
||||
%dir %{prog_folder}/lib/RHEL8*
|
||||
%{prog_folder}/lib/RHEL8*/*.so*
|
||||
%endif
|
||||
|
||||
%if %{?rhel} > 9
|
||||
%{prog_folder}/bin/RHEL9*
|
||||
%dir %{prog_folder}/bin/RHEL9*
|
||||
%{prog_folder}/bin/RHEL9*/[Scips]*[^.]??
|
||||
%{prog_folder}/bin/RHEL9*/p2p
|
||||
%{prog_folder}/bin/RHEL9*/msi
|
||||
%dir %{prog_folder}/lib/RHEL9*
|
||||
%{prog_folder}/lib/RHEL9*/*.so*
|
||||
%endif
|
||||
@@ -300,18 +334,52 @@ fi
|
||||
###########################################
|
||||
|
||||
%files boot
|
||||
# including files to build on some Linux cross archs
|
||||
# hence some configure/* and lib/perl/* listed twice
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{prog_folder}
|
||||
%dir %{prog_folder}/configure
|
||||
%{prog_folder}/configure/CONFIG_BASE_VERSION
|
||||
%{prog_folder}/configure/RELEASE
|
||||
%{prog_folder}/configure/CONFIG*
|
||||
%{prog_folder}/configure/RULES*
|
||||
%dir %{prog_folder}/configure/os
|
||||
%{prog_folder}/configure/os/CONFIG.Common.UnixCommon
|
||||
%{prog_folder}/configure/os/CONFIG.Common.linuxCommon
|
||||
%{prog_folder}/configure/os/CONFIG.Common.linux-clang
|
||||
%{prog_folder}/configure/os/CONFIG.Common.linux-%{_host_cpu}*
|
||||
%{prog_folder}/configure/os/CONFIG.Common.[a-z]*-*
|
||||
%{prog_folder}/configure/os/CONFIG.UnixCommon.Common
|
||||
%{prog_folder}/configure/os/CONFIG.[a-z]*-*.Common
|
||||
%{prog_folder}/configure/os/CONFIG.[a-z]*-*.[a-z]*-*
|
||||
%{prog_folder}/configure/os/CONFIG.linux-*.Common
|
||||
%{prog_folder}/configure/os/CONFIG.linux-*.linux-*
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.Common.linuxCommon
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.Common.linux-*
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.[a-z]*-*.Common
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.linux-*.Common
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.linux-*.UnixCommon
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.linux-*.linux-*
|
||||
|
||||
%dir %{prog_folder}/include
|
||||
%{prog_folder}/include/*.h
|
||||
%{prog_folder}/include/compiler
|
||||
%dir %{prog_folder}/include/os
|
||||
%{prog_folder}/include/os/Linux/
|
||||
%{prog_folder}/include/pv/
|
||||
%{prog_folder}/include/pva/
|
||||
%{prog_folder}/include/valgrind/
|
||||
%{prog_folder}/include/flex.skel.static
|
||||
|
||||
%dir %{prog_folder}/dbd
|
||||
%{prog_folder}/dbd/softIoc*.dbd
|
||||
%{prog_folder}/db
|
||||
|
||||
%dir %{prog_folder}/lib
|
||||
# avoid pulling in pkgconfig and perl
|
||||
%dir %{prog_folder}/lib/[a-z]*-*
|
||||
%{prog_folder}/lib/[a-z]*-*/*.so*
|
||||
%dir %{prog_folder}/lib/perl
|
||||
%{prog_folder}/lib/perl/EPICS
|
||||
%{prog_folder}/lib/perl/DBD*
|
||||
|
||||
%dir %{prog_folder}/bin
|
||||
# avoid pulling in host files again
|
||||
@@ -319,8 +387,11 @@ fi
|
||||
# including all Windows dlls (hence listed twice: here and in wine)
|
||||
%dir %{prog_folder}/bin/[a-z]*
|
||||
%{prog_folder}/bin/[a-z]*/[Scips]*[^.]??
|
||||
%{prog_folder}/bin/[a-z]*/p2p
|
||||
%{prog_folder}/bin/[a-z]*/msi*
|
||||
%{prog_folder}/bin/[a-z]*/acctst*
|
||||
%{prog_folder}/bin/[a-z]*/*.dll
|
||||
%{prog_folder}/bin/[a-z]*/registerRecordDeviceDriver*
|
||||
|
||||
# vxWorks and RTEMS
|
||||
%dir %{prog_folder}/bin/V*
|
||||
@@ -333,29 +404,95 @@ fi
|
||||
|
||||
%files host-devel
|
||||
%defattr(-,root,root,-)
|
||||
%{prog_folder}/configure
|
||||
%{prog_folder}/cfg
|
||||
%{prog_folder}/include
|
||||
%dir %{prog_folder}/include
|
||||
%{prog_folder}/include/*.h
|
||||
%{prog_folder}/include/compiler
|
||||
%dir %{prog_folder}/include/os
|
||||
%{prog_folder}/include/os/Linux/
|
||||
%{prog_folder}/include/os/WIN32/
|
||||
%{prog_folder}/include/pv/
|
||||
%{prog_folder}/include/pva/
|
||||
%{prog_folder}/include/valgrind/
|
||||
%{prog_folder}/include/flex.skel.static
|
||||
%{prog_folder}/templates
|
||||
%if %{defined rhel}
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/[^Scips]*[^.]??
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/*.??
|
||||
%endif
|
||||
%{prog_folder}/lib/pkgconfig
|
||||
%{prog_folder}/lib/perl
|
||||
%{prog_folder}/lib/win*
|
||||
%{prog_folder}/lib/RTEMS*
|
||||
%dir %{prog_folder}/cfg
|
||||
%{prog_folder}/cfg/CONFIG*
|
||||
%{prog_folder}/cfg/TOOLCHAIN.%{epics_host_arch}*.%{epics_host_arch}*
|
||||
%{prog_folder}/cfg/TOOLCHAIN.%{epics_host_arch}*.win*
|
||||
%dir %{prog_folder}/configure
|
||||
%{prog_folder}/configure/RELEASE
|
||||
%{prog_folder}/configure/CONFIG*
|
||||
%{prog_folder}/configure/RULES*
|
||||
%dir %{prog_folder}/configure/os
|
||||
%{prog_folder}/configure/os/CONFIG.Common.UnixCommon
|
||||
%{prog_folder}/configure/os/CONFIG.Common.linuxCommon
|
||||
%{prog_folder}/configure/os/CONFIG.Common.linux-clang
|
||||
%{prog_folder}/configure/os/CONFIG.Common.linux-%{_host_cpu}*
|
||||
%{prog_folder}/configure/os/CONFIG.Common.%{epics_host_arch}*
|
||||
%{prog_folder}/configure/os/CONFIG.UnixCommon.Common
|
||||
%{prog_folder}/configure/os/CONFIG.%{epics_host_arch}*.Common
|
||||
%{prog_folder}/configure/os/CONFIG.%{epics_host_arch}*.%{epics_host_arch}*
|
||||
%{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.Common
|
||||
%{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.linux-%{__isa_name}*
|
||||
%{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.win*
|
||||
%{prog_folder}/configure/os/CONFIG.Linux.win*
|
||||
%{prog_folder}/configure/os/CONFIG.win*.win*
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.Common.linuxCommon
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.Common.linux-%{__isa_name}*
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.%{epics_host_arch}*.Common
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.Common
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.UnixCommon
|
||||
%{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.linux-%{__isa_name}*
|
||||
%{prog_folder}/bin/%{epics_host_arch}*/[^Scips]*[^.]??
|
||||
%{prog_folder}/bin/%{epics_host_arch}*/*.??
|
||||
%dir %{prog_folder}/lib/pkgconfig
|
||||
%{prog_folder}/lib/pkgconfig/epics-base.pc
|
||||
%{prog_folder}/lib/pkgconfig/epics-base-%{epics_host_arch}*.pc
|
||||
%{prog_folder}/lib/perl/EPICS
|
||||
%{prog_folder}/lib/perl/DBD*
|
||||
%{prog_folder}/dbd
|
||||
|
||||
###########################################
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%{prog_folder}/bin/[a-z]*/[^Scips]*[^.]??
|
||||
%{prog_folder}/include/os/vxWorks/
|
||||
%{prog_folder}/include/os/RTEMS/
|
||||
%exclude %{prog_folder}/cfg/TOOLCHAIN.%{epics_host_arch}*.%{epics_host_arch}*
|
||||
%exclude %{prog_folder}/cfg/TOOLCHAIN.%{epics_host_arch}*.win*
|
||||
%{prog_folder}/cfg/TOOLCHAIN.*
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.Common.%{epics_host_arch}*
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.Common.UnixCommon
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.Common.linuxCommon
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.Common.linux-clang
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.Common.linux-%{_host_cpu}*
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.UnixCommon.Common
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.%{epics_host_arch}*.Common
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.%{epics_host_arch}*.%{epics_host_arch}*
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.Common
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.linux-%{__isa_name}*
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.win*
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.Linux.win*
|
||||
%exclude %{prog_folder}/configure/os/CONFIG.win*.win*
|
||||
%exclude %{prog_folder}/configure/os/CONFIG_SITE.Common.linuxCommon
|
||||
%exclude %{prog_folder}/configure/os/CONFIG_SITE.Common.linux-%{__isa_name}*
|
||||
%exclude %{prog_folder}/configure/os/CONFIG_SITE.%{epics_host_arch}*.Common
|
||||
%exclude %{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.Common
|
||||
%exclude %{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.UnixCommon
|
||||
%exclude %{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.linux-%{__isa_name}*
|
||||
%{prog_folder}/configure/os/
|
||||
%exclude %{prog_folder}/lib/pkgconfig/epics-base.pc
|
||||
%exclude %{prog_folder}/lib/pkgconfig/epics-base-%{epics_host_arch}*.pc
|
||||
%{prog_folder}/lib/pkgconfig/
|
||||
%exclude %{prog_folder}/bin/%{epics_host_arch}*/[^Scips]*[^.]??
|
||||
%exclude %{prog_folder}/bin/%{epics_host_arch}*/*.??
|
||||
%exclude %{prog_folder}/bin/*/[^Scips]*[^.]??
|
||||
%exclude %{prog_folder}/bin/*/*.??
|
||||
|
||||
# VxWorks and RTEMS need static libs
|
||||
%{prog_folder}/lib/V*
|
||||
%{prog_folder}/lib/RTEMS*
|
||||
%{prog_folder}/lib/win*
|
||||
|
||||
###########################################
|
||||
|
||||
@@ -363,7 +500,9 @@ fi
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
# Install bulky static libs for Linux targets only on request
|
||||
%dir %{prog_folder}/lib/RHEL*
|
||||
%{prog_folder}/lib/RHEL*/*.a
|
||||
%dir %{prog_folder}/lib/[a-z]*
|
||||
%{prog_folder}/lib/[a-z]*/*.a
|
||||
|
||||
###########################################
|
||||
|
||||
@@ -34,12 +34,6 @@ pvDatabase_DEPEND_DIRS = pvAccess
|
||||
SUBMODULES += pva2pva
|
||||
pva2pva_DEPEND_DIRS = pvAccess
|
||||
|
||||
SUBMODULES += example
|
||||
example_DEPEND_DIRS = pva2pva pvaClient
|
||||
|
||||
SUBMODULES += pcas
|
||||
pcas_DEPEND_DIRS = ca
|
||||
|
||||
# Allow sites to add extra submodules
|
||||
-include Makefile.local
|
||||
|
||||
|
||||
2
modules/Makefile.local
Normal file
2
modules/Makefile.local
Normal file
@@ -0,0 +1,2 @@
|
||||
SUBMODULES += pcas
|
||||
pcas_DEPEND_DIRS = ca
|
||||
@@ -118,7 +118,6 @@ EXPAND_VARS = INSTALL_BIN=$(FINAL_LOCATION)/bin/$(T_A)
|
||||
SRC_DIRS += $(CURDIR)/test
|
||||
PROD_HOST += ca_test
|
||||
ca_test_SRCS = ca_test_main.c ca_test.c
|
||||
ca_test_LIBS = ca Com
|
||||
ca_test_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
|
||||
|
||||
OBJS_vxWorks += ca_test
|
||||
|
||||
@@ -2575,7 +2575,8 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
|
||||
SEVCHK ( ca_get ( DBR_FLOAT, chan, &temp ), NULL );
|
||||
SEVCHK ( ca_pend_io ( timeoutToPendIO ), NULL );
|
||||
|
||||
/* printf ( "flow control bypassed %u events\n", flowCtrlCount ); */
|
||||
if (0)
|
||||
printf ( "flow control bypassed %u events\n", flowCtrlCount );
|
||||
|
||||
showProgressEnd ( interestLevel );
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <stdexcept>
|
||||
#include <string> // vxWorks 6.0 requires this include
|
||||
|
||||
#include "epicsStdio.h"
|
||||
#include "dbDefs.h"
|
||||
#include "epicsGuard.h"
|
||||
#include "epicsVersion.h"
|
||||
@@ -1008,7 +1009,7 @@ bool cac::defaultExcep (
|
||||
char buf[512];
|
||||
char hostName[64];
|
||||
iiu.getHostName ( guard, hostName, sizeof ( hostName ) );
|
||||
sprintf ( buf, "host=%s ctx=%.400s", hostName, pCtx );
|
||||
epicsSnprintf( buf, sizeof(buf), "host=%s ctx=%.400s", hostName, pCtx );
|
||||
this->notify.exception ( guard, status, buf, 0, 0u );
|
||||
return true;
|
||||
}
|
||||
@@ -1312,7 +1313,7 @@ void cac::pvMultiplyDefinedNotify ( msgForMultiplyDefinedPV & mfmdpv,
|
||||
const char * pChannelName, const char * pAcc, const char * pRej )
|
||||
{
|
||||
char buf[256];
|
||||
sprintf ( buf, "Channel: \"%.64s\", Connecting to: %.64s, Ignored: %.64s",
|
||||
epicsSnprintf( buf, sizeof(buf), "Channel: \"%.64s\", Connecting to: %.64s, Ignored: %.64s",
|
||||
pChannelName, pAcc, pRej );
|
||||
{
|
||||
callbackManager mgr ( this->notify, this->cbMutex );
|
||||
|
||||
@@ -676,7 +676,7 @@ union db_access_val{
|
||||
(type)%(LAST_TYPE+1) == DBR_DOUBLE)
|
||||
|
||||
#define dbf_type_to_text(type) \
|
||||
( ((type) >= -1 && (type) < dbf_text_dim-2) ? \
|
||||
( ((type+1) >= 0 && (type) < dbf_text_dim-2) ? \
|
||||
dbf_text[type+1] : dbf_text_invalid )
|
||||
|
||||
#define dbf_text_to_type(text, type) \
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
#include <vector>
|
||||
#include <exception>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -28,6 +31,7 @@
|
||||
|
||||
#include "envDefs.h"
|
||||
#include "epicsAssert.h"
|
||||
#include "epicsString.h"
|
||||
#include "epicsStdioRedirect.h"
|
||||
#include "errlog.h"
|
||||
#include "osiWireFormat.h"
|
||||
@@ -35,39 +39,6 @@
|
||||
#include "addrList.h"
|
||||
#include "iocinf.h"
|
||||
|
||||
/*
|
||||
* getToken()
|
||||
*/
|
||||
static char *getToken ( const char **ppString, char *pBuf, unsigned bufSIze )
|
||||
{
|
||||
bool tokenFound = false;
|
||||
const char *pToken;
|
||||
unsigned i;
|
||||
|
||||
pToken = *ppString;
|
||||
while ( isspace (*pToken) && *pToken ){
|
||||
pToken++;
|
||||
}
|
||||
|
||||
for ( i=0u; i<bufSIze; i++ ) {
|
||||
if ( isspace (pToken[i]) || pToken[i]=='\0' ) {
|
||||
pBuf[i] = '\0';
|
||||
*ppString = &pToken[i];
|
||||
if ( i != 0 ) {
|
||||
tokenFound = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
pBuf[i] = pToken[i];
|
||||
}
|
||||
|
||||
if ( tokenFound ) {
|
||||
pBuf[bufSIze-1] = '\0';
|
||||
return pBuf;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* addAddrToChannelAccessAddressList ()
|
||||
*/
|
||||
@@ -77,9 +48,7 @@ extern "C" int epicsStdCall addAddrToChannelAccessAddressList
|
||||
{
|
||||
osiSockAddrNode *pNewNode;
|
||||
const char *pStr;
|
||||
const char *pToken;
|
||||
struct sockaddr_in addr;
|
||||
char buf[256u]; /* large enough to hold an IP address or hostname */
|
||||
int status, ret = -1;
|
||||
|
||||
pStr = envGetConfigParamPtr (pEnv);
|
||||
@@ -87,31 +56,45 @@ extern "C" int epicsStdCall addAddrToChannelAccessAddressList
|
||||
return ret;
|
||||
}
|
||||
|
||||
while ( ( pToken = getToken (&pStr, buf, sizeof (buf) ) ) ) {
|
||||
status = aToIPAddr ( pToken, port, &addr );
|
||||
if (status<0) {
|
||||
fprintf ( stderr, "%s: Parsing '%s'\n", __FILE__, pEnv->name);
|
||||
fprintf ( stderr, "\tBad internet address or host name: '%s'\n", pToken);
|
||||
continue;
|
||||
try {
|
||||
std::vector<char> scratch(pStr, pStr+strlen(pStr)+1); // copy chars and trailing nil
|
||||
|
||||
char *save = NULL;
|
||||
for(const char *pToken = epicsStrtok_r(&scratch[0], " \t\n\r", &save);
|
||||
pToken;
|
||||
pToken = epicsStrtok_r(NULL, " \t\n\r", &save))
|
||||
{
|
||||
if(!pToken[0]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
status = aToIPAddr ( pToken, port, &addr );
|
||||
if (status<0) {
|
||||
fprintf ( stderr, "%s: Parsing '%s'\n", __FILE__, pEnv->name);
|
||||
fprintf ( stderr, "\tBad internet address or host name: '%s'\n", pToken);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ignoreNonDefaultPort && ntohs ( addr.sin_port ) != port ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
pNewNode = (osiSockAddrNode *) calloc (1, sizeof(*pNewNode));
|
||||
if (pNewNode==NULL) {
|
||||
fprintf ( stderr, "addAddrToChannelAccessAddressList(): no memory available for configuration\n");
|
||||
break;
|
||||
}
|
||||
|
||||
pNewNode->addr.ia = addr;
|
||||
|
||||
/*
|
||||
* LOCK applied externally
|
||||
*/
|
||||
ellAdd (pList, &pNewNode->node);
|
||||
ret = 0; /* success if anything is added to the list */
|
||||
}
|
||||
|
||||
if ( ignoreNonDefaultPort && ntohs ( addr.sin_port ) != port ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
pNewNode = (osiSockAddrNode *) calloc (1, sizeof(*pNewNode));
|
||||
if (pNewNode==NULL) {
|
||||
fprintf ( stderr, "addAddrToChannelAccessAddressList(): no memory available for configuration\n");
|
||||
break;
|
||||
}
|
||||
|
||||
pNewNode->addr.ia = addr;
|
||||
|
||||
/*
|
||||
* LOCK applied externally
|
||||
*/
|
||||
ellAdd (pList, &pNewNode->node);
|
||||
ret = 0; /* success if anything is added to the list */
|
||||
} catch(std::exception&) { // only bad_alloc currently possible
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2003 Argonne National Laboratory
|
||||
#
|
||||
# SPDX-License-Identifier: EPICS
|
||||
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/* SPDX-FileCopyrightText: 1998 Argonne National Laboratory */
|
||||
|
||||
/* SPDX-License-Identifier: EPICS */
|
||||
|
||||
/*caExample.c*/
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/* SPDX-FileCopyrightText: 2000 Argonne National Laboratory */
|
||||
|
||||
/* SPDX-License-Identifier: EPICS */
|
||||
|
||||
/*caMonitor.c*/
|
||||
|
||||
/* This example accepts the name of a file containing a list of pvs to monitor.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2018 Argonne National Laboratory
|
||||
#
|
||||
# SPDX-License-Identifier: EPICS
|
||||
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
|
||||
#
|
||||
# SPDX-License-Identifier: EPICS
|
||||
|
||||
use strict;
|
||||
|
||||
# This construct sets @INC to search lib/perl of all RELEASE entries
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
|
||||
#
|
||||
# SPDX-License-Identifier: EPICS
|
||||
|
||||
use strict;
|
||||
|
||||
# This construct sets @INC to search lib/perl of all RELEASE entries
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
|
||||
#
|
||||
# SPDX-License-Identifier: EPICS
|
||||
|
||||
use strict;
|
||||
|
||||
# This construct sets @INC to search lib/perl of all RELEASE entries
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
|
||||
#
|
||||
# SPDX-License-Identifier: EPICS
|
||||
|
||||
use strict;
|
||||
|
||||
# This construct sets @INC to search lib/perl of all RELEASE entries
|
||||
|
||||
@@ -343,6 +343,7 @@ static int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
|
||||
default :
|
||||
break;
|
||||
}
|
||||
free(pvs[n].value);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -388,7 +389,7 @@ int main (int argc, char *argv[])
|
||||
int digits = 0; /* getopt() no. of float digits */
|
||||
|
||||
int nPvs; /* Number of PVs */
|
||||
pv* pvs; /* Array of PV structures */
|
||||
pv* pvs = NULL; /* Array of PV structures */
|
||||
|
||||
LINE_BUFFER(stdout); /* Configure stdout buffering */
|
||||
|
||||
@@ -556,6 +557,7 @@ int main (int argc, char *argv[])
|
||||
result = caget(pvs, nPvs, request, format, type, count);
|
||||
|
||||
/* Shut down Channel Access */
|
||||
free(pvs);
|
||||
ca_context_destroy();
|
||||
|
||||
return result;
|
||||
|
||||
@@ -23,4 +23,4 @@ dbCore_SRCS += asIocRegister.c
|
||||
|
||||
PROD_HOST += ascheck
|
||||
ascheck_SRCS = ascheck.c
|
||||
ascheck_LIBS = dbCore ca Com
|
||||
ascheck_LIBS = dbCore ca
|
||||
|
||||
@@ -225,6 +225,11 @@ static void asCaTask(void)
|
||||
if(asCaDebug) printf("asCaTask has cleared all channels\n");
|
||||
epicsEventSignal(asCaTaskWait);
|
||||
}
|
||||
|
||||
/* ATM never reached, just a placeholder */
|
||||
cantProceed("Unreachable. Perpetual thread.");
|
||||
|
||||
taskwdRemove(0);
|
||||
}
|
||||
|
||||
void asCaStart(void)
|
||||
|
||||
@@ -90,7 +90,7 @@ static const iocshFuncDef asprulesFuncDef = {
|
||||
"asprules",1,asprulesArgs,
|
||||
"List rules of an Access Security Group.\n"
|
||||
"If no Group is specified then list the rules for all groups\n"
|
||||
"Example: asprules mygroup"
|
||||
"Example: asprules mygroup\n"
|
||||
};
|
||||
static void asprulesCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
|
||||
@@ -224,6 +224,8 @@ got_header:
|
||||
fprintf(outFile,"}\n");
|
||||
fclose(inFile);
|
||||
fclose(outFile);
|
||||
free(outFilename);
|
||||
free(pname);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ void dbSpcAsRegisterCallback(SPC_ASCALLBACK func)
|
||||
|
||||
long dbPutSpecial(DBADDR *paddr,int pass)
|
||||
{
|
||||
long int (*pspecial)()=NULL;
|
||||
long int (*pspecial)(struct dbAddr *, int)=NULL;
|
||||
rset *prset;
|
||||
dbCommon *precord = paddr->precord;
|
||||
long status=0;
|
||||
@@ -145,63 +145,66 @@ long dbPutSpecial(DBADDR *paddr,int pass)
|
||||
}
|
||||
|
||||
static void get_enum_strs(DBADDR *paddr, char **ppbuffer,
|
||||
rset *prset,long *options)
|
||||
rset *prset, long *options)
|
||||
{
|
||||
short field_type=paddr->field_type;
|
||||
dbFldDes *pdbFldDes = paddr->pfldDes;
|
||||
dbMenu *pdbMenu;
|
||||
dbDeviceMenu *pdbDeviceMenu;
|
||||
char **papChoice;
|
||||
unsigned long no_str;
|
||||
char *ptemp;
|
||||
struct dbr_enumStrs *pdbr_enumStrs=(struct dbr_enumStrs*)(*ppbuffer);
|
||||
unsigned int i;
|
||||
struct dbr_enumStrs *penum=(struct dbr_enumStrs*)(*ppbuffer);
|
||||
/* advance output buffer on success or failure for next option */
|
||||
*ppbuffer = dbr_enumStrs_size + (char*)penum;
|
||||
|
||||
memset(pdbr_enumStrs,'\0',dbr_enumStrs_size);
|
||||
switch(field_type) {
|
||||
case DBF_ENUM:
|
||||
if( prset && prset->get_enum_strs ) {
|
||||
(*prset->get_enum_strs)(paddr,pdbr_enumStrs);
|
||||
} else {
|
||||
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
|
||||
}
|
||||
break;
|
||||
case DBF_MENU:
|
||||
pdbMenu = (dbMenu *)pdbFldDes->ftPvt;
|
||||
no_str = pdbMenu->nChoice;
|
||||
papChoice= pdbMenu->papChoiceValue;
|
||||
goto choice_common;
|
||||
case DBF_DEVICE:
|
||||
pdbDeviceMenu = (dbDeviceMenu *)pdbFldDes->ftPvt;
|
||||
if(!pdbDeviceMenu) {
|
||||
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
|
||||
break;
|
||||
}
|
||||
no_str = pdbDeviceMenu->nChoice;
|
||||
papChoice = pdbDeviceMenu->papChoice;
|
||||
goto choice_common;
|
||||
choice_common:
|
||||
i = sizeof(pdbr_enumStrs->strs)/
|
||||
sizeof(pdbr_enumStrs->strs[0]);
|
||||
if(i<no_str) no_str = i;
|
||||
pdbr_enumStrs->no_str = no_str;
|
||||
ptemp = &(pdbr_enumStrs->strs[0][0]);
|
||||
for (i=0; i<no_str; i++) {
|
||||
if(papChoice[i]==NULL) *ptemp=0;
|
||||
else {
|
||||
strncpy(ptemp,papChoice[i],
|
||||
sizeof(pdbr_enumStrs->strs[0]));
|
||||
*(ptemp+sizeof(pdbr_enumStrs->strs[0])-1) = 0;
|
||||
}
|
||||
ptemp += sizeof(pdbr_enumStrs->strs[0]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
|
||||
break;
|
||||
memset(penum, 0, dbr_enumStrs_size);
|
||||
|
||||
/* from this point
|
||||
* on success, return early
|
||||
* on failure, jump or fall through to clear *options bit.
|
||||
*/
|
||||
|
||||
if(paddr->field_type == DBF_ENUM) {
|
||||
if( prset && prset->get_enum_strs ) {
|
||||
(*prset->get_enum_strs)(paddr,penum);
|
||||
return;
|
||||
}
|
||||
|
||||
} else if(paddr->field_type == DBF_MENU || paddr->field_type == DBF_DEVICE) {
|
||||
char **ppchoices;
|
||||
epicsUInt32 i, nchoices = 0;
|
||||
|
||||
if(paddr->field_type == DBF_MENU) {
|
||||
dbMenu *pmenu = paddr->pfldDes->ftPvt;
|
||||
nchoices = pmenu->nChoice;
|
||||
ppchoices= pmenu->papChoiceValue;
|
||||
|
||||
} else if(paddr->field_type == DBF_DEVICE) {
|
||||
dbDeviceMenu *pdevs = paddr->pfldDes->ftPvt;
|
||||
if(!pdevs)
|
||||
goto nostrs;
|
||||
|
||||
nchoices = pdevs->nChoice;
|
||||
ppchoices = pdevs->papChoice;
|
||||
}
|
||||
|
||||
if(nchoices > NELEMENTS(penum->strs))
|
||||
nchoices = NELEMENTS(penum->strs); /* availible > capacity, truncated list */
|
||||
|
||||
penum->no_str = nchoices;
|
||||
|
||||
for(i=0; i<nchoices; i++) {
|
||||
if(ppchoices[i]) {
|
||||
strncpy(penum->strs[i], ppchoices[i],
|
||||
sizeof(penum->strs[i]));
|
||||
/* strs[i][] allowed to omit trailing nil */
|
||||
} else {
|
||||
penum->strs[i][0] = '\0';
|
||||
}
|
||||
}
|
||||
*ppbuffer = ((char *)*ppbuffer) + dbr_enumStrs_size;
|
||||
return;
|
||||
|
||||
} else {
|
||||
/* other DBF_* fall through to error */
|
||||
}
|
||||
|
||||
nostrs:
|
||||
/* indicate option data not available. distinct from no_str==0 */
|
||||
*options = (*options)^DBR_ENUM_STRS;
|
||||
}
|
||||
|
||||
static void get_graphics(DBADDR *paddr, char **ppbuffer,
|
||||
@@ -1350,6 +1353,7 @@ long dbPut(DBADDR *paddr, short dbrType,
|
||||
long status = 0;
|
||||
dbFldDes *pfldDes;
|
||||
int isValueField;
|
||||
int propertyUpdate = paddr->pfldDes->prop && precord->mlis.count;
|
||||
|
||||
if (special == SPC_ATTRIBUTE)
|
||||
return S_db_noMod;
|
||||
@@ -1394,12 +1398,31 @@ long dbPut(DBADDR *paddr, short dbrType,
|
||||
if (nRequest < 1) {
|
||||
recGblSetSevr(precord, LINK_ALARM, INVALID_ALARM);
|
||||
} else {
|
||||
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
|
||||
paddr->pfield, paddr);
|
||||
if (propertyUpdate && paddr->field_size <= MAX_STRING_SIZE) {
|
||||
char propBuffer[MAX_STRING_SIZE];
|
||||
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
|
||||
&propBuffer, paddr);
|
||||
if (!status) {
|
||||
if (memcmp(paddr->pfield, &propBuffer, paddr->field_size) != 0) {
|
||||
memcpy(paddr->pfield, &propBuffer, paddr->field_size);
|
||||
} else {
|
||||
/* suppress DBE_PROPERTY event if property did not change */
|
||||
propertyUpdate = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
|
||||
paddr->pfield, paddr);
|
||||
}
|
||||
nRequest = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Post property updates before second dbPutSpecial */
|
||||
/* which may post DBE_VALUE and/or DBE_LOG events */
|
||||
if (propertyUpdate && !status)
|
||||
db_post_events(precord, NULL, DBE_PROPERTY);
|
||||
|
||||
/* Always do special processing if needed */
|
||||
if (special) {
|
||||
long status2 = dbPutSpecial(paddr, 1);
|
||||
@@ -1416,12 +1439,6 @@ long dbPut(DBADDR *paddr, short dbrType,
|
||||
if (precord->mlis.count &&
|
||||
!(isValueField && pfldDes->process_passive))
|
||||
db_post_events(precord, pfieldsave, DBE_VALUE | DBE_LOG);
|
||||
/* If this field is a property (metadata) field,
|
||||
* then post a property change event (even if the field
|
||||
* didn't change).
|
||||
*/
|
||||
if (precord->mlis.count && pfldDes->prop)
|
||||
db_post_events(precord, NULL, DBE_PROPERTY);
|
||||
done:
|
||||
paddr->pfield = pfieldsave;
|
||||
return status;
|
||||
|
||||
@@ -225,6 +225,7 @@ void testdbCaWaitForEvent(DBLINK *plink, unsigned long cnt, enum testEvent event
|
||||
|
||||
assert(plink->type==CA_LINK);
|
||||
pca = (caLink *)plink->value.pv_link.pvt;
|
||||
caLinkInc(pca);
|
||||
|
||||
epicsMutexMustLock(pca->lock);
|
||||
assert(!pca->monitor && !pca->connect && !pca->userPvt);
|
||||
@@ -239,6 +240,8 @@ void testdbCaWaitForEvent(DBLINK *plink, unsigned long cnt, enum testEvent event
|
||||
dbScanUnlock(plink->precord);
|
||||
|
||||
epicsEventMustWait(evt);
|
||||
/* ensure worker has finished executing */
|
||||
dbCaSync();
|
||||
|
||||
dbScanLock(plink->precord);
|
||||
epicsMutexMustLock(pca->lock);
|
||||
@@ -250,6 +253,7 @@ void testdbCaWaitForEvent(DBLINK *plink, unsigned long cnt, enum testEvent event
|
||||
|
||||
epicsEventDestroy(evt);
|
||||
epicsMutexUnlock(pca->lock);
|
||||
caLinkDec(pca);
|
||||
dbScanUnlock(plink->precord);
|
||||
}
|
||||
|
||||
@@ -287,16 +291,15 @@ void dbCaSync(void)
|
||||
|
||||
epicsEventMustWait(wake);
|
||||
/* Worker holds workListLock when calling epicsEventMustTrigger()
|
||||
* we cycle through workListLock to ensure worker call to
|
||||
* we hold workListLock to ensure worker call to
|
||||
* epicsEventMustTrigger() returns before we destroy the event.
|
||||
*/
|
||||
epicsMutexMustLock(workListLock);
|
||||
epicsMutexUnlock(workListLock);
|
||||
|
||||
assert(templink.refcount==1);
|
||||
|
||||
epicsMutexDestroy(templink.lock);
|
||||
epicsEventDestroy(wake);
|
||||
epicsMutexUnlock(workListLock);
|
||||
}
|
||||
|
||||
void dbCaCallbackProcess(void *userPvt)
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#define USE_TYPED_DBEVENT
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -165,7 +167,7 @@ unsigned long dbChannelIO::nativeElementCount (
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
long elements = dbChannelElements ( this->dbch );
|
||||
if ( elements >= 0u ) {
|
||||
if ( elements >= 0 ) {
|
||||
return static_cast < unsigned long > ( elements );
|
||||
}
|
||||
return 0u;
|
||||
|
||||
@@ -15,13 +15,21 @@ typedef struct dbCommonPvt {
|
||||
/* Thread which is currently processing this record */
|
||||
struct epicsThreadOSD* procThread;
|
||||
|
||||
struct dbCommon common;
|
||||
/* actually followed by:
|
||||
* struct dbCommon common;
|
||||
*/
|
||||
} dbCommonPvt;
|
||||
|
||||
static EPICS_ALWAYS_INLINE
|
||||
dbCommonPvt* dbRec2Pvt(struct dbCommon *prec)
|
||||
{
|
||||
return CONTAINER(prec, dbCommonPvt, common);
|
||||
return (dbCommonPvt*)((char*)prec - sizeof(dbCommonPvt));
|
||||
}
|
||||
|
||||
static EPICS_ALWAYS_INLINE
|
||||
dbCommon* dbPvt2Rec(struct dbCommonPvt *pvt)
|
||||
{
|
||||
return (dbCommon*)&pvt[1];
|
||||
}
|
||||
|
||||
#endif // DBCOMMONPVT_H
|
||||
|
||||
@@ -94,7 +94,7 @@ static long cvt_st_UInt32(const char *from, void *pfield, const dbAddr *paddr)
|
||||
status = epicsParseFloat64(from, &dval, &end);
|
||||
if (!status &&
|
||||
dval >=0 &&
|
||||
dval <= ULONG_MAX)
|
||||
dval <= UINT_MAX)
|
||||
*to = dval;
|
||||
}
|
||||
return status;
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#define USE_TYPED_DBEVENT
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "epicsMutex.h"
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
* Author Jeff Hill
|
||||
*/
|
||||
|
||||
#define USE_TYPED_DBEVENT
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "epicsMutex.h"
|
||||
|
||||
@@ -302,7 +302,7 @@ static long getStringUlong(const dbAddr *paddr,
|
||||
epicsFloat64 dval;
|
||||
|
||||
status = epicsParseFloat64(psrc, &dval, &end);
|
||||
if (!status && 0 <= dval && dval <= ULONG_MAX)
|
||||
if (!status && 0 <= dval && dval <= UINT_MAX)
|
||||
*pdst = dval;
|
||||
}
|
||||
if (status)
|
||||
@@ -1052,7 +1052,7 @@ static long putStringUlong(dbAddr *paddr,
|
||||
epicsFloat64 dval;
|
||||
|
||||
status = epicsParseFloat64(psrc, &dval, &end);
|
||||
if (!status && 0 <= dval && dval <= ULONG_MAX)
|
||||
if (!status && 0 <= dval && dval <= UINT_MAX)
|
||||
*pdst = dval;
|
||||
}
|
||||
if (status)
|
||||
|
||||
@@ -7,20 +7,38 @@
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* dbConvertFast.h */
|
||||
/** @file dbConvertFast.h
|
||||
* @brief Data conversion for scalar values
|
||||
*
|
||||
* The typedef FASTCONVERTFUNC is defined in link.h as:
|
||||
* @code
|
||||
* long convert(const void *from, void *to, const struct dbAddr *paddr);
|
||||
* @endcode
|
||||
*
|
||||
* The arrays declared here provide pointers to the fast conversion
|
||||
* routine where the first array index is the data type for the first
|
||||
* "from" pointer arg, and the second array index is the data type for
|
||||
* the second "to" pointer arg. The array index values are a subset of
|
||||
* the DBF_ enum values defined in dbFldTypes.h
|
||||
*/
|
||||
|
||||
#ifndef INCdbConvertFasth
|
||||
#define INCdbConvertFasth
|
||||
|
||||
#include "dbFldTypes.h"
|
||||
#include "dbCoreAPI.h"
|
||||
#include "link.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
DBCORE_API extern long (*dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1])();
|
||||
DBCORE_API extern long (*dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1])();
|
||||
/** Function pointers for get conversions */
|
||||
DBCORE_API extern const FASTCONVERTFUNC
|
||||
dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1];
|
||||
/** Function pointers for put conversions */
|
||||
DBCORE_API extern const FASTCONVERTFUNC
|
||||
dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include "dbConvertFast.h"
|
||||
#include "dbConvertJSON.h"
|
||||
|
||||
typedef long (*FASTCONVERT)();
|
||||
|
||||
typedef struct parseContext {
|
||||
int depth;
|
||||
short dbrType;
|
||||
@@ -42,7 +40,7 @@ static int dbcj_boolean(void *ctx, int val) {
|
||||
static int dbcj_integer(void *ctx, long long num) {
|
||||
parseContext *parser = (parseContext *) ctx;
|
||||
epicsInt64 val64 = num;
|
||||
FASTCONVERT conv = dbFastPutConvertRoutine[DBF_INT64][parser->dbrType];
|
||||
FASTCONVERTFUNC conv = dbFastPutConvertRoutine[DBF_INT64][parser->dbrType];
|
||||
|
||||
if (parser->elems > 0) {
|
||||
conv(&val64, parser->pdest, NULL);
|
||||
@@ -54,7 +52,7 @@ static int dbcj_integer(void *ctx, long long num) {
|
||||
|
||||
static int dbcj_double(void *ctx, double num) {
|
||||
parseContext *parser = (parseContext *) ctx;
|
||||
FASTCONVERT conv = dbFastPutConvertRoutine[DBF_DOUBLE][parser->dbrType];
|
||||
FASTCONVERTFUNC conv = dbFastPutConvertRoutine[DBF_DOUBLE][parser->dbrType];
|
||||
|
||||
if (parser->elems > 0) {
|
||||
conv(&num, parser->pdest, NULL);
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
*/
|
||||
|
||||
#define EPICS_PRIVATE_API
|
||||
#define USE_TYPED_DBEVENT
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -98,8 +100,8 @@ struct event_user {
|
||||
unsigned char extra_labor; /* if set call extra labor func */
|
||||
unsigned char flowCtrlMode; /* replace existing monitor */
|
||||
unsigned char extraLaborBusy;
|
||||
void (*init_func)();
|
||||
epicsThreadId init_func_arg;
|
||||
void (*init_func)(void *);
|
||||
void *init_func_arg;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -32,6 +32,15 @@ struct dbChannel;
|
||||
struct db_field_log;
|
||||
struct evSubscrip;
|
||||
|
||||
#ifdef USE_TYPED_DBEVENT
|
||||
struct dbEventContext; // use dbEventCtx
|
||||
typedef struct evSubscrip* dbEventSubscription;
|
||||
typedef struct dbEventContext* dbEventCtx;
|
||||
#else
|
||||
typedef void * dbEventSubscription;
|
||||
typedef void * dbEventCtx;
|
||||
#endif
|
||||
|
||||
DBCORE_API int db_event_list (
|
||||
const char *name, unsigned level);
|
||||
DBCORE_API int dbel (
|
||||
@@ -39,8 +48,6 @@ DBCORE_API int dbel (
|
||||
DBCORE_API int db_post_events (
|
||||
void *pRecord, void *pField, unsigned caEventMask );
|
||||
|
||||
typedef void * dbEventCtx;
|
||||
|
||||
typedef void EXTRALABORFUNC (void *extralabor_arg);
|
||||
DBCORE_API dbEventCtx db_init_events (void);
|
||||
DBCORE_API int db_start_events (
|
||||
@@ -63,7 +70,6 @@ DBCORE_API void db_init_event_freelists (void);
|
||||
typedef void EVENTFUNC (void *user_arg, struct dbChannel *chan,
|
||||
int eventsRemaining, struct db_field_log *pfl);
|
||||
|
||||
typedef void * dbEventSubscription;
|
||||
DBCORE_API dbEventSubscription db_add_event (
|
||||
dbEventCtx ctx, struct dbChannel *chan,
|
||||
EVENTFUNC *user_sub, void *user_arg, unsigned select);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -133,7 +133,7 @@ void dbInitLink(struct link *plink, short dbfType)
|
||||
plink->value.pv_link.pvlMask |= pvlOptFWD;
|
||||
}
|
||||
else {
|
||||
errlogPrintf("Forward-link uses Channel Access "
|
||||
errlogPrintf(ERL_WARNING ": Forward-link uses Channel Access "
|
||||
"without pointing to PROC field\n"
|
||||
" %s.%s => %s\n",
|
||||
precord->name, dbLinkFieldName(plink),
|
||||
|
||||
@@ -307,7 +307,7 @@ typedef struct lset {
|
||||
*
|
||||
* @param plink the link
|
||||
* @param dbrType data type code
|
||||
* @param pbuffer where to put the value
|
||||
* @param pbuffer where the data is
|
||||
* @param nRequest number of elements to send
|
||||
* @returns status value
|
||||
*/
|
||||
@@ -324,7 +324,7 @@ typedef struct lset {
|
||||
*
|
||||
* @param plink the link
|
||||
* @param dbrType data type code
|
||||
* @param pbuffer where to put the value
|
||||
* @param pbuffer where the data is
|
||||
* @param nRequest number of elements to send
|
||||
* @returns status value
|
||||
*/
|
||||
|
||||
@@ -918,7 +918,7 @@ long dblsr(char *recordname,int level)
|
||||
pdbFldDes = pdbRecordType->papFldDes[pdbRecordType->link_ind[link]];
|
||||
plink = (DBLINK *)((char *)precord + pdbFldDes->offset);
|
||||
if(plink->type != DB_LINK) continue;
|
||||
pdbAddr = (DBADDR *)(plink->value.pv_link.pvt);
|
||||
pdbAddr = &((dbChannel *)(plink->value.pv_link.pvt))->addr;
|
||||
printf("\t%s",pdbFldDes->name);
|
||||
if(pdbFldDes->field_type==DBF_INLINK) {
|
||||
printf("\t INLINK");
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#define USE_TYPED_DBEVENT
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ void scanStop(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (scanCtl == ctlExit) return;
|
||||
if (scanCtl == ctlInit || scanCtl == ctlExit) return;
|
||||
scanCtl = ctlExit;
|
||||
|
||||
interruptAccept = FALSE;
|
||||
@@ -264,7 +264,7 @@ void scanAdd(struct dbCommon *precord)
|
||||
} else if (scan == menuScanI_O_Intr) {
|
||||
ioscan_head *piosh = NULL;
|
||||
int prio;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
long (*get_ioint_info)(int, struct dbCommon *, IOSCANPVT*);
|
||||
|
||||
if (precord->dset == NULL){
|
||||
recGblRecordError(-1, (void *)precord,
|
||||
@@ -332,7 +332,7 @@ void scanDelete(struct dbCommon *precord)
|
||||
} else if (scan == menuScanI_O_Intr) {
|
||||
ioscan_head *piosh = NULL;
|
||||
int prio;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
long (*get_ioint_info)(int, struct dbCommon *, IOSCANPVT*);
|
||||
|
||||
if (precord->dset==NULL) {
|
||||
recGblRecordError(-1, (void *)precord,
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#define USE_TYPED_DBEVENT
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
|
||||
@@ -680,7 +680,7 @@ long dbtpf(const char *pname, const char *pvalue)
|
||||
long dbior(const char *pdrvName,int interest_level)
|
||||
{
|
||||
drvSup *pdrvSup;
|
||||
struct drvet *pdrvet;
|
||||
drvet *pdrvet;
|
||||
dbRecordType *pdbRecordType;
|
||||
|
||||
if (!pdbbase) {
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#define EPICS_PRIVATE_API
|
||||
#define USE_TYPED_DBEVENT
|
||||
|
||||
#include "dbmf.h"
|
||||
#include "epicsUnitTest.h"
|
||||
@@ -50,6 +51,7 @@ void testdbPrepare(void)
|
||||
{
|
||||
if(!testEvtLock)
|
||||
testEvtLock = epicsMutexMustCreate();
|
||||
initHookAnnounce(initHookAfterPrepareDatabase);
|
||||
}
|
||||
|
||||
void testdbReadDatabase(const char* file,
|
||||
@@ -94,6 +96,7 @@ void testIocShutdownOk(void)
|
||||
|
||||
void testdbCleanup(void)
|
||||
{
|
||||
initHookAnnounce(initHookBeforeCleanupDatabase);
|
||||
dbFreeBase(pdbbase);
|
||||
db_cleanup_events();
|
||||
initHookFree();
|
||||
|
||||
@@ -62,7 +62,7 @@ void recGblRecordError(long status, void *pdbc,
|
||||
dbCommon *precord = pdbc;
|
||||
char errMsg[256] = "";
|
||||
|
||||
if (status)
|
||||
if ( status>0 )
|
||||
errSymLookup(status, errMsg, sizeof(errMsg));
|
||||
|
||||
errlogPrintf("recGblRecordError: %s %s PV: %s\n",
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
SRC_DIRS += $(IOCDIR)/dbStatic
|
||||
|
||||
USR_CFLAGS += -DUSE_TYPED_DRVET
|
||||
|
||||
INC += dbBase.h
|
||||
INC += dbFldTypes.h
|
||||
INC += dbStaticLib.h
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "dbDefs.h"
|
||||
#include "recSup.h"
|
||||
#include "devSup.h"
|
||||
#include "drvSup.h"
|
||||
|
||||
typedef struct dbMenu {
|
||||
ELLNODE node;
|
||||
@@ -33,7 +34,7 @@ typedef struct dbMenu {
|
||||
typedef struct drvSup {
|
||||
ELLNODE node;
|
||||
char *name;
|
||||
struct drvet *pdrvet;
|
||||
drvet *pdrvet;
|
||||
}drvSup;
|
||||
|
||||
typedef struct devSup {
|
||||
@@ -118,6 +119,10 @@ typedef struct dbRecordNode {
|
||||
char *recordname;
|
||||
ELLLIST infoList; /*LIST head of info nodes*/
|
||||
int flags;
|
||||
/** Parse order of this record()
|
||||
* @since 7.0.8.1
|
||||
*/
|
||||
unsigned order;
|
||||
struct dbRecordNode *aliasedRecnode; /* NULL unless flags|DBRN_FLAGS_ISALIAS */
|
||||
}dbRecordNode;
|
||||
|
||||
@@ -184,5 +189,9 @@ typedef struct dbBase {
|
||||
struct gphPvt *pgpHash;
|
||||
short ignoreMissingMenus;
|
||||
short loadCdefs;
|
||||
/** Total number of records.
|
||||
* @since 7.0.8.1
|
||||
*/
|
||||
unsigned no_records;
|
||||
}dbBase;
|
||||
#endif
|
||||
|
||||
@@ -225,7 +225,7 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp,
|
||||
char **macPairs;
|
||||
|
||||
if (ellCount(&tempList)) {
|
||||
epicsPrintf("dbReadCOM: Parser stack dirty %d\n", ellCount(&tempList));
|
||||
fprintf(stderr, ERL_WARNING ": dbReadCOM: Parser stack dirty %d\n", ellCount(&tempList));
|
||||
}
|
||||
|
||||
if (getIocState() != iocVoid) {
|
||||
@@ -247,23 +247,23 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp,
|
||||
}
|
||||
my_buffer = dbCalloc(MY_BUFFER_SIZE,sizeof(char));
|
||||
freeListInitPvt(&freeListPvt,sizeof(tempListNode),100);
|
||||
if(substitutions) {
|
||||
if(macCreateHandle(&macHandle,NULL)) {
|
||||
epicsPrintf("macCreateHandle error\n");
|
||||
status = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
macParseDefns(macHandle,(char *)substitutions,&macPairs);
|
||||
if(macPairs ==NULL) {
|
||||
macDeleteHandle(macHandle);
|
||||
macHandle = NULL;
|
||||
} else {
|
||||
macInstallMacros(macHandle,macPairs);
|
||||
free((void *)macPairs);
|
||||
mac_input_buffer = dbCalloc(MY_BUFFER_SIZE,sizeof(char));
|
||||
}
|
||||
macSuppressWarning(macHandle,dbQuietMacroWarnings);
|
||||
if (substitutions == NULL)
|
||||
substitutions = "";
|
||||
if(macCreateHandle(&macHandle,NULL)) {
|
||||
fprintf(stderr, ERL_ERROR ": macCreateHandle failed\n");
|
||||
status = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
macParseDefns(macHandle,substitutions,&macPairs);
|
||||
if(macPairs == NULL) {
|
||||
macDeleteHandle(macHandle);
|
||||
macHandle = NULL;
|
||||
} else {
|
||||
macInstallMacros(macHandle,macPairs);
|
||||
free(macPairs);
|
||||
mac_input_buffer = dbCalloc(MY_BUFFER_SIZE,sizeof(char));
|
||||
}
|
||||
macSuppressWarning(macHandle,dbQuietMacroWarnings);
|
||||
pinputFile = dbCalloc(1,sizeof(inputFile));
|
||||
if (filename) {
|
||||
pinputFile->filename = macEnvExpand(filename);
|
||||
@@ -294,7 +294,7 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp,
|
||||
status = pvt_yy_parse();
|
||||
|
||||
if (ellCount(&tempList) && !yyAbort)
|
||||
epicsPrintf("dbReadCOM: Parser stack dirty w/o error. %d\n", ellCount(&tempList));
|
||||
fprintf(stderr, ERL_WARNING ": dbReadCOM: Parser stack dirty w/o error. %d\n", ellCount(&tempList));
|
||||
while (ellCount(&tempList))
|
||||
popFirstTemp(); /* Memory leak on parser failure */
|
||||
|
||||
@@ -401,15 +401,15 @@ static void dbIncludePrint(void)
|
||||
inputFile *pinputFile = pinputFileNow;
|
||||
|
||||
while (pinputFile) {
|
||||
epicsPrintf(" in");
|
||||
fprintf(stderr, " in");
|
||||
if (pinputFile->path)
|
||||
epicsPrintf(" path \"%s\" ",pinputFile->path);
|
||||
fprintf(stderr, " path \"%s\" ",pinputFile->path);
|
||||
if (pinputFile->filename) {
|
||||
epicsPrintf(" file \"%s\"",pinputFile->filename);
|
||||
fprintf(stderr, " file \"%s\"",pinputFile->filename);
|
||||
} else {
|
||||
epicsPrintf(" standard input");
|
||||
fprintf(stderr, " standard input");
|
||||
}
|
||||
epicsPrintf(" line %d\n",pinputFile->line_num);
|
||||
fprintf(stderr, " line %d\n",pinputFile->line_num);
|
||||
pinputFile = (inputFile *)ellPrevious(&pinputFile->node);
|
||||
}
|
||||
return;
|
||||
@@ -434,7 +434,7 @@ static void dbIncludeNew(char *filename)
|
||||
pinputFile->filename = macEnvExpand(filename);
|
||||
pinputFile->path = dbOpenFile(savedPdbbase, pinputFile->filename, &fp);
|
||||
if (!fp) {
|
||||
epicsPrintf("Can't open include file \"%s\"\n", filename);
|
||||
fprintf(stderr, "Can't open include file \"%s\"\n", filename);
|
||||
yyerror(NULL);
|
||||
free((void *)pinputFile->filename);
|
||||
free((void *)pinputFile);
|
||||
@@ -696,7 +696,7 @@ static void dbRecordtypeEmpty(void)
|
||||
|
||||
ptempListNode = (tempListNode *)ellFirst(&tempList);
|
||||
pdbRecordType = ptempListNode->item;
|
||||
epicsPrintf("Declaration of recordtype(%s) preceeded full definition.\n",
|
||||
fprintf(stderr, "Declaration of recordtype(%s) preceeded full definition.\n",
|
||||
pdbRecordType->name);
|
||||
yyerrorAbort(NULL);
|
||||
}
|
||||
@@ -801,7 +801,7 @@ static void dbDevice(char *recordtype,char *linktype,
|
||||
int i,link_type;
|
||||
pgphentry = gphFind(savedPdbbase->pgpHash,recordtype,&savedPdbbase->recordTypeList);
|
||||
if(!pgphentry) {
|
||||
epicsPrintf("Record type \"%s\" not found for device \"%s\"\n",
|
||||
fprintf(stderr, "Record type \"%s\" not found for device \"%s\"\n",
|
||||
recordtype, choicestring);
|
||||
yyerror(NULL);
|
||||
return;
|
||||
@@ -814,7 +814,7 @@ static void dbDevice(char *recordtype,char *linktype,
|
||||
}
|
||||
}
|
||||
if(link_type==-1) {
|
||||
epicsPrintf("Bad link type \"%s\" for device \"%s\"\n",
|
||||
fprintf(stderr, "Bad link type \"%s\" for device \"%s\"\n",
|
||||
linktype, choicestring);
|
||||
yyerror(NULL);
|
||||
return;
|
||||
@@ -1077,16 +1077,16 @@ int dbRecordNameValidate(const char *name)
|
||||
if(i==0) {
|
||||
/* first character restrictions */
|
||||
if(c=='-' || c=='+' || c=='[' || c=='{') {
|
||||
errlogPrintf("Warning: Record/Alias name '%s' should not begin with '%c'\n", name, c);
|
||||
fprintf(stderr, "Warning: Record/Alias name '%s' should not begin with '%c'\n", name, c);
|
||||
}
|
||||
}
|
||||
/* any character restrictions */
|
||||
if(c < ' ') {
|
||||
errlogPrintf("Warning: Record/Alias name '%s' should not contain non-printable 0x%02x\n",
|
||||
fprintf(stderr, "Warning: Record/Alias name '%s' should not contain non-printable 0x%02x\n",
|
||||
name, c);
|
||||
|
||||
} else if(c==' ' || c=='\t' || c=='"' || c=='\'' || c=='.' || c=='$') {
|
||||
epicsPrintf(ERL_ERROR ": Bad character '%c' in Record/Alias name \"%s\"\n",
|
||||
fprintf(stderr, ERL_ERROR ": Bad character '%c' in Record/Alias name \"%s\"\n",
|
||||
c, name);
|
||||
yyerrorAbort(NULL);
|
||||
return 1;
|
||||
@@ -1113,15 +1113,29 @@ static void dbRecordHead(char *recordType, char *name, int visible)
|
||||
status = dbFindRecord(pdbentry, name);
|
||||
if (status == 0)
|
||||
return; /* done */
|
||||
epicsPrintf(ERL_ERROR ": Record \"%s\" not found\n", name);
|
||||
fprintf(stderr, ERL_ERROR ": Record \"%s\" not found\n", name);
|
||||
yyerror(NULL);
|
||||
duplicate = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (recordType[0] == '#' && recordType[1] == 0) {
|
||||
status = dbFindRecord(pdbentry, name);
|
||||
if (status == 0) {
|
||||
dbDeleteRecord(pdbentry);
|
||||
} else {
|
||||
fprintf(stderr, ERL_WARNING ": Unable to delete record \"%s\". Not found.\n"
|
||||
" at file %s line %d\n",
|
||||
name, pinputFileNow->filename, pinputFileNow->line_num);
|
||||
}
|
||||
popFirstTemp();
|
||||
dbFreeEntry(pdbentry);
|
||||
duplicate = TRUE;
|
||||
return;
|
||||
}
|
||||
status = dbFindRecordType(pdbentry, recordType);
|
||||
if (status) {
|
||||
epicsPrintf("Record \"%s\" is of unknown type \"%s\"\n",
|
||||
fprintf(stderr, "Record \"%s\" is of unknown type \"%s\"\n",
|
||||
name, recordType);
|
||||
yyerrorAbort(NULL);
|
||||
return;
|
||||
@@ -1132,14 +1146,14 @@ static void dbRecordHead(char *recordType, char *name, int visible)
|
||||
status = dbCreateRecord(pdbentry,name);
|
||||
if (status == S_dbLib_recExists) {
|
||||
if (strcmp(recordType, dbGetRecordTypeName(pdbentry)) != 0) {
|
||||
epicsPrintf(ERL_ERROR ": Record \"%s\" of type \"%s\" redefined with new type "
|
||||
fprintf(stderr, ERL_ERROR ": Record \"%s\" of type \"%s\" redefined with new type "
|
||||
"\"%s\"\n", name, dbGetRecordTypeName(pdbentry), recordType);
|
||||
yyerror(NULL);
|
||||
duplicate = TRUE;
|
||||
return;
|
||||
}
|
||||
else if (dbRecordsOnceOnly) {
|
||||
epicsPrintf(ERL_ERROR ": Record \"%s\" already defined and dbRecordsOnceOnly set.\n"
|
||||
fprintf(stderr, ERL_ERROR ": Record \"%s\" already defined and dbRecordsOnceOnly set.\n"
|
||||
"Used record type \"*\" to append.\n",
|
||||
name);
|
||||
yyerror(NULL);
|
||||
@@ -1147,7 +1161,7 @@ static void dbRecordHead(char *recordType, char *name, int visible)
|
||||
}
|
||||
}
|
||||
else if (status) {
|
||||
epicsPrintf("Can't create record \"%s\" of type \"%s\"\n",
|
||||
fprintf(stderr, "Can't create record \"%s\" of type \"%s\"\n",
|
||||
name, recordType);
|
||||
yyerrorAbort(NULL);
|
||||
}
|
||||
@@ -1167,7 +1181,7 @@ static void dbRecordField(char *name,char *value)
|
||||
pdbentry = ptempListNode->item;
|
||||
status = dbFindField(pdbentry,name);
|
||||
if (status) {
|
||||
epicsPrintf("%s Record \"%s\" does not have a field \"%s\"\n",
|
||||
fprintf(stderr, "%s Record \"%s\" does not have a field \"%s\"\n",
|
||||
dbGetRecordTypeName(pdbentry), dbGetRecordName(pdbentry), name);
|
||||
if(dbGetRecordName(pdbentry)) {
|
||||
DBENTRY temp;
|
||||
@@ -1183,17 +1197,17 @@ static void dbRecordField(char *name,char *value)
|
||||
}
|
||||
dbFinishEntry(&temp);
|
||||
if(bestSim>0.0) {
|
||||
epicsPrintf(" Did you mean \"%s\"?", bestFld->name);
|
||||
fprintf(stderr, " Did you mean \"%s\"?", bestFld->name);
|
||||
if(bestFld->prompt)
|
||||
epicsPrintf(" (%s)", bestFld->prompt);
|
||||
epicsPrintf("\n");
|
||||
fprintf(stderr, " (%s)", bestFld->prompt);
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
}
|
||||
yyerror(NULL);
|
||||
return;
|
||||
}
|
||||
if (pdbentry->indfield == 0) {
|
||||
epicsPrintf("Can't set \"NAME\" field of record \"%s\"\n",
|
||||
fprintf(stderr, "Can't set \"NAME\" field of record \"%s\"\n",
|
||||
dbGetRecordName(pdbentry));
|
||||
yyerror(NULL);
|
||||
return;
|
||||
@@ -1211,7 +1225,7 @@ static void dbRecordField(char *name,char *value)
|
||||
char msg[128];
|
||||
|
||||
errSymLookup(status, msg, sizeof(msg));
|
||||
epicsPrintf("Can't set \"%s.%s\" to \"%s\" %s : %s\n",
|
||||
fprintf(stderr, "Can't set \"%s.%s\" to \"%s\" %s : %s\n",
|
||||
dbGetRecordName(pdbentry), name, value, pdbentry->message ? pdbentry->message : "", msg);
|
||||
dbPutStringSuggest(pdbentry, value);
|
||||
yyerror(NULL);
|
||||
@@ -1242,31 +1256,57 @@ static void dbRecordInfo(char *name, char *value)
|
||||
|
||||
status = dbPutInfo(pdbentry,name,value);
|
||||
if (status) {
|
||||
epicsPrintf("Can't set \"%s\" info \"%s\" to \"%s\"\n",
|
||||
fprintf(stderr, "Can't set \"%s\" info \"%s\" to \"%s\"\n",
|
||||
dbGetRecordName(pdbentry), name, value);
|
||||
yyerror(NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static long createAlias(DBENTRY *pdbentry, const char *alias)
|
||||
{
|
||||
DBENTRY tempEntry;
|
||||
long status;
|
||||
dbRecordNode *precnode = pdbentry->precnode;
|
||||
|
||||
if (precnode->aliasedRecnode) precnode = precnode->aliasedRecnode;
|
||||
dbInitEntry(pdbentry->pdbbase, &tempEntry);
|
||||
status = dbFindRecord(&tempEntry, alias);
|
||||
if (status == 0) {
|
||||
if (tempEntry.precnode->aliasedRecnode != precnode) {
|
||||
if (tempEntry.precnode->aliasedRecnode)
|
||||
fprintf(stderr, ERL_ERROR ": Alias \"%s\" for \"%s\": name already used by an alias for \"%s\"\n",
|
||||
alias, dbGetRecordName(pdbentry),
|
||||
tempEntry.precnode->aliasedRecnode->recordname);
|
||||
else
|
||||
fprintf(stderr, ERL_ERROR ": Alias \"%s\" for \"%s\": name already used by a record\n",
|
||||
alias, dbGetRecordName(pdbentry));
|
||||
status = S_dbLib_recExists;
|
||||
} else if (dbRecordsOnceOnly) {
|
||||
fprintf(stderr, ERL_ERROR ": Alias \"%s\" already defined and dbRecordsOnceOnly set.\n",
|
||||
alias);
|
||||
status = S_dbLib_recExists;
|
||||
}
|
||||
} else {
|
||||
status = dbCreateAlias(pdbentry, alias);
|
||||
}
|
||||
dbFinishEntry(&tempEntry);
|
||||
return status;
|
||||
}
|
||||
|
||||
static void dbRecordAlias(char *name)
|
||||
{
|
||||
DBENTRY *pdbentry;
|
||||
tempListNode *ptempListNode;
|
||||
long status;
|
||||
|
||||
if(dbRecordNameValidate(name))
|
||||
return;
|
||||
|
||||
if (duplicate) return;
|
||||
ptempListNode = (tempListNode *)ellFirst(&tempList);
|
||||
pdbentry = ptempListNode->item;
|
||||
status = dbCreateAlias(pdbentry, name);
|
||||
if (status) {
|
||||
epicsPrintf("Can't create alias \"%s\" for \"%s\"\n",
|
||||
name, dbGetRecordName(pdbentry));
|
||||
|
||||
if (createAlias(pdbentry, name) != 0) {
|
||||
yyerror(NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1280,13 +1320,11 @@ static void dbAlias(char *name, char *alias)
|
||||
|
||||
dbInitEntry(savedPdbbase, pdbEntry);
|
||||
if (dbFindRecord(pdbEntry, name)) {
|
||||
epicsPrintf("Alias \"%s\" refers to unknown record \"%s\"\n",
|
||||
fprintf(stderr, "Alias \"%s\" refers to unknown record \"%s\"\n",
|
||||
alias, name);
|
||||
yyerror(NULL);
|
||||
}
|
||||
else if (dbCreateAlias(pdbEntry, alias)) {
|
||||
epicsPrintf("Can't create alias \"%s\" referring to \"%s\"\n",
|
||||
alias, name);
|
||||
else if (createAlias(pdbEntry, alias) != 0) {
|
||||
yyerror(NULL);
|
||||
}
|
||||
dbFinishEntry(pdbEntry);
|
||||
|
||||
@@ -1219,7 +1219,9 @@ long dbNextRecordType(DBENTRY *pdbentry)
|
||||
|
||||
char * dbGetRecordTypeName(DBENTRY *pdbentry)
|
||||
{
|
||||
return(pdbentry->precordType->name);
|
||||
dbRecordType *pdbRecordType = pdbentry->precordType;
|
||||
if(!pdbRecordType) return NULL;
|
||||
return(pdbRecordType->name);
|
||||
}
|
||||
|
||||
int dbGetNRecordTypes(DBENTRY *pdbentry)
|
||||
@@ -1477,6 +1479,17 @@ long dbDeleteAliases(DBENTRY *pdbentry)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dbDeleteRecordLinks(dbRecordType *rtyp, struct dbCommon *prec)
|
||||
{
|
||||
short i;
|
||||
|
||||
for (i=0; i<rtyp->no_links; i++) {
|
||||
dbFldDes *pflddes = rtyp->papFldDes[rtyp->link_ind[i]];
|
||||
DBLINK *plink = (DBLINK *)(((char *)prec) + pflddes->offset);
|
||||
dbFreeLinkContents(plink);
|
||||
}
|
||||
}
|
||||
|
||||
long dbDeleteRecord(DBENTRY *pdbentry)
|
||||
{
|
||||
dbBase *pdbbase = pdbentry->pdbbase;
|
||||
@@ -1492,6 +1505,7 @@ long dbDeleteRecord(DBENTRY *pdbentry)
|
||||
preclist = &precordType->recList;
|
||||
ellDelete(preclist, &precnode->node);
|
||||
dbPvdDelete(pdbbase, precnode);
|
||||
dbDeleteRecordLinks(precordType, precnode->precord);
|
||||
while (!dbFirstInfo(pdbentry)) {
|
||||
dbDeleteInfo(pdbentry);
|
||||
}
|
||||
@@ -2204,12 +2218,12 @@ long dbInitRecordLinks(dbRecordType *rtyp, struct dbCommon *prec)
|
||||
*/
|
||||
|
||||
} else if(dbCanSetLink(plink, &link_info, devsup)!=0) {
|
||||
errlogPrintf(ERL_ERROR ": %s.%s: can't initialize link type %d with \"%s\" (type %s)\n",
|
||||
prec->name, pflddes->name, plink->type, plink->text, pamaplinkType[link_info.ltype].strvalue);
|
||||
errlogPrintf(ERL_ERROR ": %s.%s: can't initialize link type %s with \"%s\" (type %s)\n",
|
||||
prec->name, pflddes->name, pamaplinkType[plink->type].strvalue, plink->text, pamaplinkType[link_info.ltype].strvalue);
|
||||
|
||||
} else if(dbSetLink(plink, &link_info, devsup)) {
|
||||
errlogPrintf(ERL_ERROR ": %s.%s: failed to initialize link type %d with \"%s\" (type %s)\n",
|
||||
prec->name, pflddes->name, plink->type, plink->text, pamaplinkType[link_info.ltype].strvalue);
|
||||
errlogPrintf(ERL_ERROR ": %s.%s: failed to initialize link type %s with \"%s\" (type %s)\n",
|
||||
prec->name, pflddes->name, pamaplinkType[plink->type].strvalue, plink->text, pamaplinkType[link_info.ltype].strvalue);
|
||||
}
|
||||
free(plink->text);
|
||||
plink->text = NULL;
|
||||
|
||||
@@ -66,7 +66,17 @@ void devExtend(dsxt *pdsxt)
|
||||
pthisDevSup->pdsxt = pdsxt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Ensure that: sizeof(dbCommonPvt) + pdbRecordType->rec_size
|
||||
* accounts for necessary alignment of record type struct
|
||||
*/
|
||||
typedef struct {
|
||||
dbCommonPvt prefix;
|
||||
/* ensure no padding needed... */
|
||||
dbCommon suffix;
|
||||
} dbCommonPvtAlignmentTest;
|
||||
STATIC_ASSERT(offsetof(dbCommonPvtAlignmentTest, suffix)==sizeof(dbCommonPvt));
|
||||
|
||||
long dbAllocRecord(DBENTRY *pdbentry,const char *precordName)
|
||||
{
|
||||
dbRecordType *pdbRecordType = pdbentry->precordType;
|
||||
@@ -90,8 +100,8 @@ long dbAllocRecord(DBENTRY *pdbentry,const char *precordName)
|
||||
precordName, pdbRecordType->name, pdbRecordType->rec_size);
|
||||
return(S_dbLib_noRecSup);
|
||||
}
|
||||
ppvt = dbCalloc(1, offsetof(dbCommonPvt, common) + pdbRecordType->rec_size);
|
||||
precord = &ppvt->common;
|
||||
ppvt = dbCalloc(1, sizeof(dbCommonPvt) + pdbRecordType->rec_size);
|
||||
precord = dbPvt2Rec(ppvt);
|
||||
ppvt->recnode = precnode;
|
||||
precord->rdes = pdbRecordType;
|
||||
precnode->precord = precord;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user