Compare commits
109 Commits
R3.14.12.6
...
PSI-3.14.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 19c04ace1d | |||
| 538bc88760 | |||
| 0b6eb67137 | |||
| 5c080a64f9 | |||
|
|
b7d4609e57 | ||
|
|
c8a7e1597d | ||
|
|
ceaff61c09 | ||
|
|
6cc623a7b4 | ||
| 3f1a366291 | |||
| 0d332dbb41 | |||
| c1447d9cb4 | |||
| 76ba742563 | |||
| 6a75f3258b | |||
| a2bf0f3c66 | |||
| d2c4fd85d7 | |||
| 2772d57842 | |||
| c9a8a551e8 | |||
| 2718a0d706 | |||
| 1b9a104215 | |||
| c6a9818539 | |||
| f400e12743 | |||
|
|
ac4d5c95ac | ||
|
|
de442e9584 | ||
|
|
713c2d5080 | ||
|
|
734d16291f | ||
|
|
1454f42a27 | ||
|
|
c830a3a4ee | ||
|
|
8a1477ecab | ||
|
|
006ce1a240 | ||
|
|
276dee2c3e | ||
|
|
98a2871727 | ||
|
|
5ca1bb3bd5 | ||
|
|
f6be3c7f70 | ||
|
|
00924dcba0 | ||
|
|
5278799575 | ||
|
|
2af98c33c9 | ||
|
|
22debb3532 | ||
|
|
c441cdd5a4 | ||
|
|
13fa1e2722 | ||
|
|
fad89189da | ||
|
|
4ab56518a0 | ||
|
|
80dbc7aeef | ||
|
|
238f6772bd | ||
|
|
dc9859cee9 | ||
|
|
5d5f27a486 | ||
|
|
ad6a16d7c4 | ||
|
|
5c8e5c52ef | ||
|
|
546df1c1f0 | ||
|
|
603331e7a5 | ||
|
|
4b272cc0cf | ||
|
|
619a99bf99 | ||
|
|
1f8cb740f1 | ||
|
|
322f7a97de | ||
|
|
0fc770166c | ||
|
|
1a70855e25 | ||
|
|
6b5e7da4fd | ||
|
|
a1dc16848c | ||
|
|
2819d7ea3d | ||
|
|
6ef995525a | ||
|
|
18dee384ec | ||
|
|
b369aa67f1 | ||
|
|
c853234e01 | ||
|
|
9c859ffdca | ||
|
|
0dc850f4ec | ||
|
|
672fd16ec8 | ||
|
|
dcadeac903 | ||
|
|
b7b3dd2b37 | ||
|
|
82396ee3ef | ||
|
|
e430d097b7 | ||
|
|
38be82a154 | ||
|
|
27cd9fd051 | ||
|
|
1ffce72a38 | ||
|
|
dcac64d50f | ||
|
|
0bf789db4c | ||
|
|
57cbe61709 | ||
|
|
a2ab17a782 | ||
|
|
d825f87359 | ||
|
|
3184371e8d | ||
|
|
f2e54be965 | ||
|
|
c22670cbb0 | ||
|
|
c5decfbd12 | ||
|
|
e25a2964bc | ||
|
|
8382367495 | ||
|
|
64c16c0f6e | ||
|
|
9f01c47542 | ||
|
|
aca7b44a05 | ||
|
|
4f8fd545fa | ||
|
|
d4552af39b | ||
|
|
0c02c5cb30 | ||
|
|
1f90e98491 | ||
|
|
352fd32c45 | ||
|
|
e0af3e2af5 | ||
|
|
5726ca6964 | ||
|
|
f164b14ba1 | ||
|
|
214e9534cc | ||
|
|
2a0cd00958 | ||
|
|
d744b06a28 | ||
|
|
048b75304d | ||
|
|
aaafb1a5de | ||
|
|
5783823e25 | ||
|
|
faf691a5be | ||
|
|
3a0e52fc3f | ||
|
|
a105c6f538 | ||
|
|
3e58c59377 | ||
|
|
b9ae6c3308 | ||
|
|
7310d78057 | ||
|
|
49e0e23f76 | ||
|
|
20dda339cc | ||
|
|
260bc64b59 |
@@ -1,9 +0,0 @@
|
||||
./bin
|
||||
./lib
|
||||
./db
|
||||
./dbd
|
||||
./html
|
||||
./include
|
||||
./templates
|
||||
**/O.*
|
||||
./QtC-*
|
||||
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/cfg/
|
||||
/bin/
|
||||
/lib/
|
||||
/db/
|
||||
/dbd/
|
||||
/html/
|
||||
/include/
|
||||
/templates/
|
||||
O.*/
|
||||
/QtC-*
|
||||
*.orig
|
||||
*.log
|
||||
.*.swp
|
||||
31
.travis.yml
Normal file
31
.travis.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
sudo: false
|
||||
dist: trusty
|
||||
language: c
|
||||
compiler:
|
||||
- gcc
|
||||
env:
|
||||
- CMPLR=gcc
|
||||
- CMPLR=gcc EXTRA=CMD_CXXFLAGS=-std=c++11
|
||||
- CMPLR=gcc STATIC=YES
|
||||
- CMPLR=clang
|
||||
- CMPLR=clang STATIC=YES
|
||||
- WINE=32 TEST=NO STATIC=YES
|
||||
- RTEMS=4.10 TEST=NO
|
||||
- RTEMS=4.9 TEST=NO
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libreadline6-dev
|
||||
- libncurses5-dev
|
||||
- perl
|
||||
- clang
|
||||
- g++-mingw-w64-i686
|
||||
- bison
|
||||
- flex
|
||||
- texinfo
|
||||
- install-info
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache
|
||||
install: sh ci/travis-prepare.sh </dev/null
|
||||
script: sh ci/travis-build.sh </dev/null
|
||||
7
Makefile
7
Makefile
@@ -24,3 +24,10 @@ config_DEPEND_DIRS = src
|
||||
|
||||
include $(TOP)/configure/RULES_TOP
|
||||
|
||||
|
||||
UNINSTALL_DIRS += $(INSTALL_LOCATION)/src
|
||||
copysrc:
|
||||
tar cf - --exclude=CVS --exclude=O.* src | tar xf - -C $(INSTALL_LOCATION)
|
||||
|
||||
tar: install copysrc
|
||||
tar cfjP epics_base-3.14.12.tar.bz2 $(INSTALL_LOCATION) --exclude=*.o
|
||||
|
||||
2
README
2
README
@@ -20,5 +20,5 @@ Additional information about EPICS including mailing list
|
||||
archives and subscription instructions, documentation and
|
||||
training materials, additional components, links to other
|
||||
websites etc. is available on the EPICS home page at
|
||||
http://www.aps.anl.gov/epics/
|
||||
https://epics.anl.gov/
|
||||
|
||||
|
||||
85
appveyor.yml
Normal file
85
appveyor.yml
Normal file
@@ -0,0 +1,85 @@
|
||||
# AppVeyor configuration for EPICS Base
|
||||
|
||||
# Ralph Lange <ralph.lange@gmx.de>
|
||||
# Copyright (c) 2016-2017 ITER Organization
|
||||
|
||||
# Version format
|
||||
version: base-{branch}-{build}
|
||||
|
||||
#---------------------------------#
|
||||
# repository cloning #
|
||||
#---------------------------------#
|
||||
|
||||
# Called at very beginning, before repo cloning
|
||||
init:
|
||||
# Set autocrlf to make batch files work
|
||||
- git config --global core.autocrlf true
|
||||
|
||||
# Set clone depth (do not fetch complete history)
|
||||
clone_depth: 2
|
||||
|
||||
# Skipping commits affecting only specific files
|
||||
skip_commits:
|
||||
files:
|
||||
- 'documentation/*'
|
||||
- 'templates/*'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
|
||||
#---------------------------------#
|
||||
# build matrix configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# Build Configurations: dll/static, regular/debug
|
||||
configuration:
|
||||
- dynamic
|
||||
- static
|
||||
- dynamic-debug
|
||||
- static-debug
|
||||
|
||||
# Environment variables: compiler toolchain
|
||||
environment:
|
||||
matrix:
|
||||
- TOOLCHAIN: 10.0
|
||||
- TOOLCHAIN: 11.0
|
||||
- TOOLCHAIN: 12.0
|
||||
- TOOLCHAIN: 14.0
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLCHAIN: 2017
|
||||
- TOOLCHAIN: cygwin
|
||||
- TOOLCHAIN: mingw
|
||||
|
||||
# Platform: architecture
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
|
||||
# Matrix configuration: allow specific failing jobs
|
||||
matrix:
|
||||
exclude:
|
||||
# VS Express installs don't have the 64 bit compiler
|
||||
- platform: x64
|
||||
TOOLCHAIN: 10.0
|
||||
|
||||
#---------------------------------#
|
||||
# building & testing #
|
||||
#---------------------------------#
|
||||
|
||||
install:
|
||||
- cmd: ci/appveyor-prepare.bat
|
||||
|
||||
build_script:
|
||||
- cmd: ci/appveyor-make.bat
|
||||
|
||||
test_script:
|
||||
- cmd: ci/appveyor-make.bat runtests
|
||||
|
||||
#---------------------------------#
|
||||
# notifications #
|
||||
#---------------------------------#
|
||||
|
||||
notifications:
|
||||
|
||||
- provider: Slack
|
||||
incoming_webhook:
|
||||
secure: RYOm3FIUYeZGjWKaeTVKwq+C3fzK54AKwbmAoECED45mex3lN+8HmrC845a6mg9xPUJ/ND51RopWVaKDD9/UzaM0SO195RQLKqUTIUafiuM=
|
||||
137
ci/appveyor-make.bat
Normal file
137
ci/appveyor-make.bat
Normal file
@@ -0,0 +1,137 @@
|
||||
:: Universal build script for AppVeyor (https://ci.appveyor.com/)
|
||||
:: Environment:
|
||||
:: TOOLCHAIN - toolchain version [10.0/11.0/12.0/14.0/2017/cygwin/mingw]
|
||||
:: CONFIGURATION - determines EPICS build [dynamic/static]
|
||||
:: PLATFORM - architecture [x86/x64]
|
||||
::
|
||||
:: All command line args are passed to make
|
||||
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
set "ST="
|
||||
if /i "%CONFIGURATION%"=="static" set ST=-static
|
||||
|
||||
set OS=64BIT
|
||||
if "%PLATFORM%"=="x86" set OS=32BIT
|
||||
|
||||
echo [INFO] Platform: %OS%
|
||||
|
||||
:: Use parallel make, except for 3.14
|
||||
set "MAKEARGS=-j2 -Otarget"
|
||||
if "%APPVEYOR_REPO_BRANCH%"=="3.14" set MAKEARGS=
|
||||
|
||||
if "%TOOLCHAIN%"=="cygwin" (
|
||||
set "MAKE=make"
|
||||
if "%OS%"=="64BIT" (
|
||||
set "EPICS_HOST_ARCH=cygwin-x86_64"
|
||||
set "INCLUDE=C:\cygwin64\include;%INCLUDE%"
|
||||
set "PATH=C:\cygwin64\bin;%PATH%"
|
||||
echo [INFO] Cygwin Toolchain 64bit
|
||||
) else (
|
||||
set "EPICS_HOST_ARCH=cygwin-x86"
|
||||
set "INCLUDE=C:\cygwin\include;%INCLUDE%"
|
||||
set "PATH=C:\cygwin\bin;%PATH%"
|
||||
echo [INFO] Cygwin Toolchain 32bit
|
||||
)
|
||||
echo [INFO] Compiler Version
|
||||
gcc -v
|
||||
goto Finish
|
||||
)
|
||||
|
||||
if "%TOOLCHAIN%"=="mingw" (
|
||||
set "MAKE=mingw32-make"
|
||||
if "%OS%"=="64BIT" (
|
||||
set "EPICS_HOST_ARCH=windows-x64-mingw"
|
||||
set "INCLUDE=C:\tools\mingw64\include;%INCLUDE%"
|
||||
set "PATH=C:\tools\mingw64\bin;%PATH%"
|
||||
echo [INFO] MinGW Toolchain 64bit
|
||||
) else (
|
||||
set "EPICS_HOST_ARCH=win32-x86-mingw"
|
||||
set "INCLUDE=C:\tools\mingw32\include;%INCLUDE%"
|
||||
set "PATH=C:\tools\mingw32\bin;%PATH%"
|
||||
echo [INFO] MinGW Toolchain 32bit
|
||||
)
|
||||
echo [INFO] Compiler Version
|
||||
gcc -v
|
||||
goto Finish
|
||||
)
|
||||
|
||||
set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN%"
|
||||
if not exist "%VSINSTALL%\" set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio\%TOOLCHAIN%\Community"
|
||||
if not exist "%VSINSTALL%\" goto MSMissing
|
||||
|
||||
set "MAKE=C:\tools\make"
|
||||
|
||||
echo [INFO] APPVEYOR_BUILD_WORKER_IMAGE=%APPVEYOR_BUILD_WORKER_IMAGE%
|
||||
|
||||
if "%OS%"=="64BIT" (
|
||||
set EPICS_HOST_ARCH=windows-x64%ST%
|
||||
:: VS 2017
|
||||
if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\vcvarsall.bat" (
|
||||
call "%VSINSTALL%\VC\vcvarsall.bat" amd64
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 (
|
||||
call "%VSINSTALL%\VC\vcvarsall.bat" x86_amd64
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
)
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\bin\amd64\vcvars64.bat" (
|
||||
call "%VSINSTALL%\VC\bin\amd64\vcvars64.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
) else (
|
||||
set EPICS_HOST_ARCH=win32-x86%ST%
|
||||
:: VS 2017
|
||||
if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat" (
|
||||
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\vcvarsall.bat" (
|
||||
call "%VSINSTALL%\VC\vcvarsall.bat" x86
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\bin\vcvars32.bat" (
|
||||
call "%VSINSTALL%\VC\bin\vcvars32.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\Common7\Tools\vsvars32.bat" (
|
||||
call "%VSINSTALL%\Common7\Tools\vsvars32.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
)
|
||||
|
||||
:MSMissing
|
||||
echo [INFO] Installation for MSVC Toolchain %TOOLCHAIN% / %OS% seems to be missing
|
||||
exit 1
|
||||
|
||||
:MSFound
|
||||
echo [INFO] Microsoft Visual Studio Toolchain %TOOLCHAIN%
|
||||
echo [INFO] Compiler Version
|
||||
cl
|
||||
|
||||
:Finish
|
||||
echo [INFO] EPICS_HOST_ARCH: %EPICS_HOST_ARCH%
|
||||
echo [INFO] Make version
|
||||
%MAKE% --version
|
||||
echo [INFO] Perl version
|
||||
perl --version
|
||||
|
||||
%MAKE% %MAKEARGS% %*
|
||||
70
ci/appveyor-prepare.bat
Normal file
70
ci/appveyor-prepare.bat
Normal file
@@ -0,0 +1,70 @@
|
||||
:: Build script for AppVeyor (https://ci.appveyor.com/)
|
||||
:: Environment:
|
||||
:: TOOLCHAIN - Toolchain Version [9.0/10.0/11.0/12.0/14.0/cygwin/mingw]
|
||||
:: CONFIGURATION - determines EPICS build [dynamic/static, -debug]
|
||||
:: PLATFORM - "x86" -> use 32bit architecture
|
||||
::
|
||||
:: Prepares an Appveyor build by excuting the following steps
|
||||
:: - Set up configure\CONFIG_SITE for static vs. dynamic build
|
||||
:: - Install Cygwin / Mingw (TOOLCHAIN setting) in the in the appropriate flavor
|
||||
:: - Download and install Make-4.1 from EPICS download page
|
||||
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
set OS=64BIT
|
||||
if "%PLATFORM%"=="x86" set OS=32BIT
|
||||
|
||||
echo [INFO] Platform: %OS%
|
||||
|
||||
if "%TOOLCHAIN%"=="cygwin" (
|
||||
echo.%CONFIGURATION% | findstr /C:"static">nul && (
|
||||
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
|
||||
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for static build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for dynamic build
|
||||
)
|
||||
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
|
||||
echo HOST_OPT=NO>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for debug build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for optimized build
|
||||
)
|
||||
if "%OS%"=="64BIT" (
|
||||
echo [INFO] Installing Cygwin 64bit and dependencies
|
||||
@powershell -Command "(new-object net.webclient).DownloadFile('http://www.cygwin.com/setup-x86_64.exe', 'C:\cygwin64\setup-x86_64.exe')"
|
||||
C:\cygwin64\setup-x86_64.exe -q -P "libreadline-devel,libncursesw-devel"
|
||||
) else (
|
||||
echo [INFO] Installing Cygwin 32bit and dependencies
|
||||
@powershell -Command "(new-object net.webclient).DownloadFile('http://www.cygwin.com/setup-x86.exe', 'C:\cygwin\setup-x86.exe')"
|
||||
C:\cygwin\setup-x86.exe -q -P "libreadline-devel,libncursesw-devel"
|
||||
)
|
||||
)
|
||||
|
||||
if "%TOOLCHAIN%"=="mingw" (
|
||||
echo.%CONFIGURATION% | findstr /C:"static">nul && (
|
||||
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
|
||||
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for static build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for dynamic build
|
||||
)
|
||||
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
|
||||
echo HOST_OPT=NO>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for debug build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for optimized build
|
||||
)
|
||||
if "%OS%"=="64BIT" (
|
||||
echo [INFO] Installing MinGW 64bit
|
||||
cinst mingw || cinst mingw
|
||||
) else (
|
||||
echo [INFO] Installing MinGW 32bit
|
||||
cinst mingw --x86 || cinst mingw --x86
|
||||
)
|
||||
)
|
||||
|
||||
echo [INFO] Installing Make 4.1
|
||||
curl -fsS --retry 3 -o C:\tools\make-4.1.zip https://epics.anl.gov/download/tools/make-4.1-win64.zip
|
||||
cd \tools
|
||||
"C:\Program Files\7-Zip\7z" e make-4.1.zip
|
||||
90
ci/travis-build.sh
Normal file
90
ci/travis-build.sh
Normal file
@@ -0,0 +1,90 @@
|
||||
#!/bin/sh
|
||||
set -e -x
|
||||
|
||||
die() {
|
||||
echo "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
ticker() {
|
||||
while true
|
||||
do
|
||||
sleep 60
|
||||
date -R
|
||||
[ -r "$1" ] && tail -n10 "$1"
|
||||
done
|
||||
}
|
||||
|
||||
CACHEKEY=1
|
||||
|
||||
EPICS_HOST_ARCH=`sh startup/EpicsHostArch`
|
||||
|
||||
[ -e configure/os/CONFIG_SITE.Common.linux-x86 ] || die "Wrong location: $PWD"
|
||||
|
||||
case "$CMPLR" in
|
||||
clang)
|
||||
echo "Host compiler is clang"
|
||||
cat << EOF >> configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH
|
||||
GNU = NO
|
||||
CMPLR_CLASS = clang
|
||||
CC = clang
|
||||
CCC = clang++
|
||||
EOF
|
||||
;;
|
||||
*) echo "Host compiler is default";;
|
||||
esac
|
||||
|
||||
if [ "$STATIC" = "YES" ]
|
||||
then
|
||||
echo "Build static libraries/executables"
|
||||
cat << EOF >> configure/CONFIG_SITE
|
||||
SHARED_LIBRARIES=NO
|
||||
STATIC_BUILD=YES
|
||||
EOF
|
||||
fi
|
||||
|
||||
# requires wine and g++-mingw-w64-i686
|
||||
if [ "$WINE" = "32" ]
|
||||
then
|
||||
echo "Cross mingw32"
|
||||
sed -i -e '/CMPLR_PREFIX/d' configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
|
||||
cat << EOF >> configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
|
||||
CMPLR_PREFIX=i686-w64-mingw32-
|
||||
EOF
|
||||
cat << EOF >> configure/CONFIG_SITE
|
||||
CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw
|
||||
EOF
|
||||
fi
|
||||
|
||||
# set RTEMS to eg. "4.9" or "4.10"
|
||||
# requires qemu, bison, flex, texinfo, install-info
|
||||
if [ -n "$RTEMS" ]
|
||||
then
|
||||
echo "Cross RTEMS${RTEMS} for pc386"
|
||||
install -d /home/travis/.cache
|
||||
curl -L "https://github.com/mdavidsaver/rsb/releases/download/travis-20160306-2/rtems${RTEMS}-i386-trusty-20190306-2.tar.gz" \
|
||||
| tar -C /home/travis/.cache -xj
|
||||
|
||||
sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' configure/os/CONFIG_SITE.Common.RTEMS
|
||||
cat << EOF >> configure/os/CONFIG_SITE.Common.RTEMS
|
||||
RTEMS_VERSION=$RTEMS
|
||||
RTEMS_BASE=/home/travis/.cache/rtems${RTEMS}-i386
|
||||
EOF
|
||||
cat << EOF >> configure/CONFIG_SITE
|
||||
CROSS_COMPILER_TARGET_ARCHS+=RTEMS-pc386
|
||||
EOF
|
||||
|
||||
# find local qemu-system-i386
|
||||
export PATH="$HOME/.cache/qemu/usr/bin:$PATH"
|
||||
echo -n "Using QEMU: "
|
||||
type qemu-system-i386 || echo "Missing qemu"
|
||||
EXTRA=RTEMS_QEMU_FIXUPS=YES
|
||||
fi
|
||||
|
||||
make -j2 $EXTRA
|
||||
|
||||
if [ "$TEST" != "NO" ]
|
||||
then
|
||||
make tapfiles
|
||||
make -s test-results
|
||||
fi
|
||||
40
ci/travis-prepare.sh
Normal file
40
ci/travis-prepare.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
set -e -x
|
||||
|
||||
die() {
|
||||
echo "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
CURDIR="$PWD"
|
||||
|
||||
QDIR="$HOME/.cache/qemu"
|
||||
|
||||
if [ -n "$RTEMS" -a "$TEST" = "YES" ]
|
||||
then
|
||||
git clone --quiet --branch vme --depth 10 https://github.com/mdavidsaver/qemu.git "$HOME/.build/qemu"
|
||||
cd "$HOME/.build/qemu"
|
||||
|
||||
HEAD=`git log -n1 --pretty=format:%H`
|
||||
echo "HEAD revision $HEAD"
|
||||
|
||||
[ -e "$HOME/.cache/qemu/built" ] && BUILT=`cat "$HOME/.cache/qemu/built"`
|
||||
echo "Cached revision $BUILT"
|
||||
|
||||
if [ "$HEAD" != "$BUILT" ]
|
||||
then
|
||||
echo "Building QEMU"
|
||||
git submodule --quiet update --init
|
||||
|
||||
install -d "$HOME/.build/qemu/build"
|
||||
cd "$HOME/.build/qemu/build"
|
||||
|
||||
"$HOME/.build/qemu/configure" --prefix="$HOME/.cache/qemu/usr" --target-list=i386-softmmu --disable-werror
|
||||
make -j2
|
||||
make install
|
||||
|
||||
echo "$HEAD" > "$HOME/.cache/qemu/built"
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "$CURDIR"
|
||||
@@ -75,17 +75,17 @@ ifdef T_A
|
||||
#
|
||||
-include $(CONFIG)/os/CONFIG.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
# Site specific target and host-target definitions and overrides
|
||||
#
|
||||
-include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A)
|
||||
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
# RELEASE file specific definitions
|
||||
#
|
||||
ifneq ($(CONFIG),$(TOP)/configure)
|
||||
-include $(CONFIG)/CONFIG_APP_INCLUDE
|
||||
endif
|
||||
|
||||
# Site specific target and host-target definitions
|
||||
#
|
||||
-include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A)
|
||||
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
endif # ifdef T_A
|
||||
|
||||
|
||||
|
||||
@@ -17,14 +17,14 @@ BUILD_CLASS = CROSS
|
||||
# ifdef CROSS looks better than ifeq ($(BUILD_CLASS),CROSS)
|
||||
CROSS = YES
|
||||
|
||||
GNU_TARGET_INCLUDE_DIR = $(GNU_TARGET:%= $(GNU_DIR)/%/include)
|
||||
GNU_TARGET_LIB_DIR = $(GNU_TARGET:%= $(GNU_DIR)/%/lib)
|
||||
GNU_TARGET_INCLUDE_DIR = $(wildcard $(GNU_TARGET:%=$(GNU_DIR)/%/include))
|
||||
GNU_TARGET_LIB_DIR = $(wildcard $(GNU_TARGET:%=$(GNU_DIR)/%/lib))
|
||||
|
||||
CROSS_INCLUDES = $(addprefix -I,$(GNU_TARGET_INCLUDE_DIR))
|
||||
CROSS_LDFLAGS = $(addprefix -L,$(GNU_TARGET_LIB_DIR))
|
||||
CROSS_INCLUDES = $(GNU_TARGET_INCLUDE_DIR:%=-I%)
|
||||
CROSS_LDFLAGS = $(GNU_TARGET_LIB_DIR:%=-L%)
|
||||
|
||||
CMPLR_PREFIX_CROSS=$(addsuffix -,$(GNU_TARGET))
|
||||
CMPLR_PREFIX=$(CMPLR_PREFIX_$(BUILD_CLASS))
|
||||
CMPLR_PREFIX_CROSS = $(addsuffix -,$(GNU_TARGET))
|
||||
CMPLR_PREFIX = $(CMPLR_PREFIX_$(BUILD_CLASS))
|
||||
|
||||
# Cross builds usually use the gnu compiler
|
||||
include $(CONFIG)/CONFIG.gnuCommon
|
||||
|
||||
@@ -27,7 +27,7 @@ GPROF_CFLAGS_YES = -pg
|
||||
CODE_CFLAGS = $(PROF_CFLAGS_$(PROFILE)) $(GPROF_CFLAGS_$(GPROF))
|
||||
WARN_CFLAGS_YES = -Wall
|
||||
WARN_CFLAGS_NO = -w
|
||||
OPT_CFLAGS_YES = -O3
|
||||
OPT_CFLAGS_YES = -O3 -g
|
||||
OPT_CFLAGS_NO = -g
|
||||
|
||||
PROF_CXXFLAGS_YES = -p
|
||||
@@ -35,7 +35,7 @@ GPROF_CXXFLAGS_YES = -pg
|
||||
CODE_CXXFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
|
||||
WARN_CXXFLAGS_YES = -Wall
|
||||
WARN_CXXFLAGS_NO = -w
|
||||
OPT_CXXFLAGS_YES = -O3
|
||||
OPT_CXXFLAGS_YES = -O3 -g
|
||||
OPT_CXXFLAGS_NO = -g
|
||||
|
||||
CODE_LDFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
|
||||
|
||||
@@ -35,7 +35,7 @@ EPICS_BASE_HOST_LIBS += ca Com
|
||||
# Version number for base shared libraries (and win32 products)
|
||||
|
||||
ifdef BASE_TOP
|
||||
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
|
||||
#SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
|
||||
PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
|
||||
endif # BASE_TOP
|
||||
|
||||
@@ -66,6 +66,7 @@ DBTOMENUH = $(call PATH_FILTER, $(TOOLS)/dbToMenuH$(HOSTEXE))
|
||||
REGISTERRECORDDEVICEDRIVER = $(PERL) $(TOOLS)/registerRecordDeviceDriver.pl
|
||||
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
|
||||
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
|
||||
TAPTOJUNIT = $(PERL) $(TOOLS)/tap-to-junit-xml.pl
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tools for installing libraries and products
|
||||
|
||||
@@ -28,10 +28,10 @@ EPICS_MODIFICATION = 12
|
||||
|
||||
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
|
||||
# Not included if zero
|
||||
EPICS_PATCH_LEVEL = 6
|
||||
EPICS_PATCH_LEVEL = 7
|
||||
|
||||
# This will end in -DEV between official releases
|
||||
#EPICS_DEV_SNAPSHOT=-DEV
|
||||
EPICS_DEV_SNAPSHOT=-DEV
|
||||
#EPICS_DEV_SNAPSHOT=-pre1
|
||||
#EPICS_DEV_SNAPSHOT=-pre1-DEV
|
||||
#EPICS_DEV_SNAPSHOT=-pre2
|
||||
@@ -40,7 +40,7 @@ EPICS_PATCH_LEVEL = 6
|
||||
#EPICS_DEV_SNAPSHOT=-rc1-DEV
|
||||
#EPICS_DEV_SNAPSHOT=-rc2
|
||||
#EPICS_DEV_SNAPSHOT=-rc2-DEV
|
||||
EPICS_DEV_SNAPSHOT=
|
||||
#EPICS_DEV_SNAPSHOT=
|
||||
|
||||
# No changes should be needed below here
|
||||
|
||||
|
||||
@@ -121,11 +121,10 @@ CROSS_COMPILER_TARGET_ARCHS=
|
||||
#
|
||||
CROSS_COMPILER_HOST_ARCHS=
|
||||
|
||||
# The 'make runtests' and 'make tapfiles' build targets normally only run
|
||||
# The 'runtests', 'tapfiles' and 'junitfiles' make targets normally only run
|
||||
# self-tests for the EPICS_HOST_ARCH architecture. If the host can execute
|
||||
# the self-test programs for any other cross-built architectures such as
|
||||
# a -debug architecture, those architectures can be named here.
|
||||
#
|
||||
# a -debug architecture, those architectures must be named in this variable:
|
||||
CROSS_COMPILER_RUNTEST_ARCHS=
|
||||
|
||||
# Build shared libraries?
|
||||
@@ -171,7 +170,7 @@ CROSS_WARN=YES
|
||||
# NOTE: Set to YES only if you have existing R3.13 extensions to be
|
||||
# built with this base
|
||||
#
|
||||
#COMPAT_TOOLS_313=YES
|
||||
COMPAT_TOOLS_313=YES
|
||||
|
||||
# Create and/or install files for R3.13 ioc application and extension builds?
|
||||
# must be either YES or NO
|
||||
@@ -179,19 +178,20 @@ CROSS_WARN=YES
|
||||
# NOTE: Set to YES only if you have existing R3.13 ioc applications
|
||||
# and extensions to be built with this base
|
||||
#
|
||||
COMPAT_313=NO
|
||||
COMPAT_313=YES
|
||||
|
||||
# Installation directory
|
||||
# If you don't want to install into $(TOP) dir then
|
||||
# define INSTALL_LOCATION here
|
||||
#INSTALL_LOCATION=<fullpathname>
|
||||
INSTALL_LOCATION=/usr/local/epics/base-3.14.12
|
||||
|
||||
# Use POSIX thread priority scheduling (YES or NO)
|
||||
USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES
|
||||
|
||||
# Site version number, if set will append '-' and this string to the
|
||||
# EPICS version number string that is reported by many tools
|
||||
EPICS_SITE_VERSION =
|
||||
EPICS_SITE_VERSION := $(shell date +%Y-%m)
|
||||
|
||||
# For GNU compiler, use pipes rather than temporary files for communication
|
||||
# between the various stages of compilation.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#
|
||||
# CONFIG_SITE_ENV - EPICS Environment Parameter Site configuration file
|
||||
#
|
||||
# This file is read by the script base/src/libCom/env/bldEnvdata.pl
|
||||
# This file is read by the script base/src/libCom/env/bldEnvData.pl
|
||||
# Variable definitions must take the form
|
||||
# VAR = VALUE
|
||||
# or
|
||||
@@ -26,31 +26,42 @@
|
||||
|
||||
# Time service:
|
||||
# EPICS_TIMEZONE
|
||||
# local timezone info for vxWorks and RTEMS IOCs. The format is
|
||||
# <name>::<minutesWest>:<start daylight>:<end daylight>
|
||||
# where the start and end are mmddhh - that is month,day,hour
|
||||
# e.g. for ANL in 2016: EPICS_TIMEZONE=CUS::360:031302:110602
|
||||
# Local timezone info for vxWorks and RTEMS. The format is
|
||||
# <name>::<minutesWest>:<startDST>:<endDST>
|
||||
# where <name> is only used by strftime() for %Z conversions,
|
||||
# and <startDST> and <endDST> are mmddhh - that is month,day,hour
|
||||
# e.g. for ANL in 2018: EPICS_TIMEZONE=CUS::360:031102:110402
|
||||
# The future dates below assume the rules don't get changed;
|
||||
# see http://www.timeanddate.com/time/dst/2018.html to check.
|
||||
#
|
||||
# DST for 2016 US: Mar 13 - Nov 06
|
||||
# EU: Mar 27 - Oct 30
|
||||
# DST for 2017 US: Mar 12 - Nov 05
|
||||
# EU: Mar 26 - Oct 29
|
||||
# DST for 2018 US: Mar 11 - Nov 04
|
||||
# EU: Mar 25 - Oct 28
|
||||
EPICS_TIMEZONE = CUS::360:031102:110402
|
||||
#EPICS_TIMEZONE = MET::-60:032502:102803
|
||||
#
|
||||
# DST for 2019 US: Mar 10 - Nov 03
|
||||
# EU: Mar 31 - Oct 27
|
||||
#EPICS_TIMEZONE = CUS::360:031002:110302
|
||||
#EPICS_TIMEZONE = MET::-60:033102:102703
|
||||
#
|
||||
# DST for 2020 US: Mar 08 - Nov 01
|
||||
# EU: Mar 29 - Oct 25
|
||||
#EPICS_TIMEZONE = CUS::360:030802:110102
|
||||
#EPICS_TIMEZONE = MET::-60:032902:102503
|
||||
#
|
||||
# DST for 2021 US: Mar 14 - Nov 07
|
||||
# EU: Mar 28 - Oct 31
|
||||
# (see: http://www.timeanddate.com/time/dst/2016.html etc. )
|
||||
#EPICS_TIMEZONE = CUS::360:031402:110702
|
||||
#EPICS_TIMEZONE = MET::-60:032802:103103
|
||||
#
|
||||
# These values are for 2016:
|
||||
EPICS_TIMEZONE=CUS::360:031302:110602
|
||||
#EPICS_TIMEZONE=MET::-60:032702:103002
|
||||
# DST for 2022 US: Mar 13 - Nov 06
|
||||
# EU: Mar 27 - Oct 30
|
||||
#EPICS_TIMEZONE = CUS::360:031302:110602
|
||||
#EPICS_TIMEZONE = MET::-60:032702:103003
|
||||
|
||||
# EPICS_TS_NTP_INET
|
||||
# NTP time server ip address. Uses boot host if not set.
|
||||
# NTP time server ip address for VxWorks and RTEMS.
|
||||
# IOC will use its boot host if this is not set.
|
||||
EPICS_TS_NTP_INET=
|
||||
|
||||
# IOC Shell:
|
||||
|
||||
@@ -134,7 +134,7 @@ ACTIONS += build
|
||||
ACTIONS += install
|
||||
ACTIONS += buildInstall
|
||||
ACTIONS += browse
|
||||
ACTIONS += runtests tapfiles
|
||||
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
|
||||
|
||||
actionArchTargets = $(foreach x, $(ACTIONS),\ $(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
|
||||
|
||||
@@ -150,6 +150,7 @@ buildInstall : build
|
||||
rebuild: clean install
|
||||
|
||||
.PHONY: all inc build install clean rebuild buildInstall
|
||||
.PHONY: runtests tapfiles clean-tests test-results junitfiles
|
||||
|
||||
$(actionArchTargets) $(BUILD_ARCHS):install
|
||||
$(cleanArchTargets):clean
|
||||
@@ -300,6 +301,20 @@ $(foreach file, $(DBD_INSTALLS), $(eval $(call DBD_INSTALLS_template, $(file))))
|
||||
|
||||
.PRECIOUS: $(COMMON_DBDS) $(COMMON_DIR)/%Include.dbd
|
||||
|
||||
##################################################### HTML files
|
||||
|
||||
$(COMMON_DIR)/%.html: %.pm $(TOOLS)/podToHtml.pl
|
||||
@$(RM) $(notdir $@)
|
||||
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.html: ../%.pm $(TOOLS)/podToHtml.pl
|
||||
@$(RM) $(notdir $@)
|
||||
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
.PRECIOUS: $(COMMON_DIR)/%.html %.html
|
||||
|
||||
##################################################### DB files
|
||||
|
||||
$(COMMON_DIR)/%.db$(RAW): $(COMMON_DIR)/%.edf
|
||||
|
||||
@@ -14,7 +14,7 @@ build$(DIVIDER)$(ARCH) build: buildInstall
|
||||
install$(DIVIDER)$(ARCH) install: buildInstall
|
||||
$(ARCH): buildInstall
|
||||
|
||||
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(ARCH))
|
||||
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(strip $(ARCH)))
|
||||
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
|
||||
|
||||
clean$(DIVIDER)$(ARCH) clean:
|
||||
@@ -31,4 +31,3 @@ cdCommands envPaths dllPath.bat relPaths.sh: \
|
||||
|
||||
realclean:
|
||||
$(RM) cdCommands envPaths dllPath.bat relPaths.sh
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ ACTIONS += build
|
||||
ACTIONS += install
|
||||
ACTIONS += buildInstall
|
||||
ACTIONS += browse
|
||||
ACTIONS += runtests tapfiles
|
||||
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
|
||||
#ACTIONS += rebuild
|
||||
|
||||
actionArchTargets = $(foreach action, $(ACTIONS), \
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
#
|
||||
# Rules for making things specified in Makefile
|
||||
@@ -101,10 +101,11 @@ endif
|
||||
ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
|
||||
RUNTESTS_ENABLED = YES
|
||||
TAPFILES += $(TESTSCRIPTS:.t=.tap)
|
||||
JUNITFILES += $(TAPFILES:.tap=.xml)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Libraries
|
||||
# Libraries
|
||||
#
|
||||
|
||||
LIBTARGETS += $(LIBNAME) $(INSTALL_LIBS) \
|
||||
@@ -117,16 +118,16 @@ $(INSTALL_LIBS): $(INSTALL_SHRLIBS) $(INSTALL_DLL_LINK_LIBS) $(INSTALL_LOADABL
|
||||
|
||||
# Main targets
|
||||
|
||||
install: buildInstall
|
||||
install: buildInstall
|
||||
|
||||
buildInstall : build
|
||||
buildInstall: build
|
||||
|
||||
# Allows rebuild to work with parallel builds option, -j.
|
||||
install: $(patsubst rebuild,clean,$(filter rebuild,$(MAKECMDGOALS)))
|
||||
|
||||
rebuild: clean install
|
||||
|
||||
build : inc
|
||||
build: inc
|
||||
|
||||
build: $(OBJSNAME) $(LIBTARGETS) $(PRODTARGETS) $(TESTPRODNAME) \
|
||||
$(TARGETS) $(TESTSCRIPTS) $(INSTALL_LIB_INSTALLS)
|
||||
@@ -148,7 +149,7 @@ clean::
|
||||
$(INC) $(TARGETS) $(DLL_LINK_LIBNAME) $(TDS) \
|
||||
*.out MakefileInclude $(LOADABLE_SHRLIBNAME) *.manifest *.exp \
|
||||
$(COMMON_INC) $(HDEPENDS_FILES) $(PRODTARGETS) \
|
||||
$(TESTSCRIPTS) $(TAPFILES)
|
||||
$(TESTSCRIPTS) $(TAPFILES) $(JUNITFILES)
|
||||
ifdef RES
|
||||
@$(RM) *$(RES)
|
||||
endif
|
||||
@@ -176,7 +177,7 @@ warnRelease:
|
||||
-$(CONVERTRELEASE) checkRelease
|
||||
noCheckRelease:
|
||||
ifeq ($(EPICS_HOST_ARCH),$(T_A))
|
||||
@echo "Warning: RELEASE file consistency checks have been disabled"
|
||||
$(info Warning: RELEASE file consistency checks have been disabled)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -207,17 +208,18 @@ $(OBJLIBNAME):%$(OBJ):
|
||||
%.o : %.cc
|
||||
%.o : %.cpp
|
||||
|
||||
%$(OBJ): %.c $(COMMON_INC) $(INSTALL_INC)
|
||||
# Include files are order-only prerequisites for compilation:
|
||||
%$(OBJ): %.c | $(COMMON_INC) $(INSTALL_INC)
|
||||
@$(HDEPENDS_CMD)
|
||||
@$(RM) $@
|
||||
$(COMPILE.c) $(call PATH_FILTER,$<) $(COMPILE_FILTER.c)
|
||||
|
||||
%$(OBJ): %.cc $(COMMON_INC) $(INSTALL_INC)
|
||||
%$(OBJ): %.cc | $(COMMON_INC) $(INSTALL_INC)
|
||||
@$(HDEPENDS_CMD)
|
||||
@$(RM) $@
|
||||
$(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
|
||||
|
||||
%$(OBJ): %.cpp $(COMMON_INC) $(INSTALL_INC)
|
||||
%$(OBJ): %.cpp | $(COMMON_INC) $(INSTALL_INC)
|
||||
@$(HDEPENDS_CMD)
|
||||
@$(RM) $@
|
||||
$(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
|
||||
@@ -288,7 +290,7 @@ endif
|
||||
|
||||
$(LIBNAME): $(LIBRARY_OBJS)
|
||||
|
||||
$(DLL_LINK_LIBNAME): $(LIBRARY_OBJS) $(LIBRARY_RESS) $(SHRLIB_DEPLIBS)
|
||||
$(DLL_LINK_LIBNAME): $(LIBRARY_OBJS) $(LIBRARY_RESS) $(SHRLIB_DEPLIBS)
|
||||
|
||||
$(LIBNAME) $(DLL_LINK_LIBNAME): $(LIB_PREFIX)%$(LIB_SUFFIX):
|
||||
@$(RM) $@
|
||||
@@ -352,7 +354,23 @@ testspec: $(TESTSCRIPTS)
|
||||
$(if $^, @echo Tests: $^ >> $@)
|
||||
$(if $(TESTSPEC_$(OS_CLASS)), @echo "Harness: $(TESTSPEC_$(OS_CLASS))" >> $@)
|
||||
|
||||
test-results: tapfiles
|
||||
ifneq ($(TAPFILES),)
|
||||
ifdef RUNTESTS_ENABLED
|
||||
prove --failures --ext .tap --exec cat --color $(TAPFILES)
|
||||
endif
|
||||
endif
|
||||
|
||||
clean-tests:
|
||||
ifneq ($(TAPFILES),)
|
||||
$(RM) $(TAPFILES)
|
||||
endif
|
||||
ifneq ($(JUNITFILES),)
|
||||
$(RM) $(JUNITFILES)
|
||||
endif
|
||||
|
||||
tapfiles: $(TESTSCRIPTS) $(TAPFILES)
|
||||
junitfiles: $(JUNITFILES)
|
||||
|
||||
# A .tap file is the output from running the associated test script
|
||||
%.tap: %.t
|
||||
@@ -360,6 +378,9 @@ ifdef RUNTESTS_ENABLED
|
||||
-$(PERL) $< -tap > $@
|
||||
endif
|
||||
|
||||
%.xml: %.tap
|
||||
$(TAPTOJUNIT) --puretap --output $@ --input $< $*
|
||||
|
||||
# If there's a perl test script (.plt) available, use it
|
||||
%.t: ../%.plt
|
||||
@$(RM) $@
|
||||
@@ -417,6 +438,9 @@ ifneq (,$(strip $(SHRLIB_VERSION)))
|
||||
@$(RM) $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
|
||||
ln -s $< $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
|
||||
endif # SHRLIB_VERSION
|
||||
else
|
||||
@$(RM) $@.3.14
|
||||
ln -s $< $@.3.14
|
||||
endif # SHRLIB_SUFFIX
|
||||
|
||||
ifneq ($(INSTALL_TCLLIB),$(INSTALL_BIN))
|
||||
@@ -479,6 +503,10 @@ $(INSTALL_HTML)/$(HTMLS_DIR)/%: ../%
|
||||
$(ECHO) "Installing html $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
|
||||
$(INSTALL_HTML)/$(HTMLS_DIR)/%: $(COMMON_DIR)/%
|
||||
$(ECHO) "Installing generated html $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
|
||||
$(INSTALL_TEMPLATES_SUBDIR)/%: ../%
|
||||
$(ECHO) "Installing $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
@@ -493,7 +521,8 @@ $(INSTALL_TEMPLATES_SUBDIR)/%: %
|
||||
.PRECIOUS: $(COMMON_INC)
|
||||
|
||||
.PHONY: all inc build install clean rebuild buildInstall
|
||||
.PHONY: runtests checkRelease warnRelease noCheckRelease
|
||||
.PHONY: runtests tapfiles clean-tests test-results junitfiles
|
||||
.PHONY: checkRelease warnRelease noCheckRelease
|
||||
|
||||
endif # BASE_RULES_BUILD
|
||||
# EOF RULES_BUILD
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
ARCHS += $(BUILD_ARCHS)
|
||||
ACTIONS += inc build install buildInstall clean realclean archclean
|
||||
ACTIONS += runtests tapfiles
|
||||
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
|
||||
|
||||
dirActionArchTargets = $(foreach dir, $(DIRS), \
|
||||
$(foreach action, $(ACTIONS), \
|
||||
|
||||
@@ -58,6 +58,7 @@ help:
|
||||
@echo " Cannot be used within an O.<arch> dir"
|
||||
@echo " rebuild - Same as clean install"
|
||||
@echo " archclean - Removes O.<arch> dirs but not O.Common dir"
|
||||
@echo " runtests - Run self-tests, summarize results"
|
||||
@echo "\"Partial\" build targets supported by Makefiles:"
|
||||
@echo " inc$(DIVIDER)<arch> - Installs <arch> only header files."
|
||||
@echo " build$(DIVIDER)<arch> - Builds and installs <arch> only."
|
||||
|
||||
4
configure/os/CONFIG.Common.RHEL7-x86_64
Normal file
4
configure/os/CONFIG.Common.RHEL7-x86_64
Normal file
@@ -0,0 +1,4 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
3
configure/os/CONFIG.Common.RHEL7-x86_64-clang
Normal file
3
configure/os/CONFIG.Common.RHEL7-x86_64-clang
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
6
configure/os/CONFIG.Common.SL5-x86
Normal file
6
configure/os/CONFIG.Common.SL5-x86
Normal file
@@ -0,0 +1,6 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
ARCH_DEP_CFLAGS += -march=i686
|
||||
4
configure/os/CONFIG.Common.SL5-x86_64
Normal file
4
configure/os/CONFIG.Common.SL5-x86_64
Normal file
@@ -0,0 +1,4 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
7
configure/os/CONFIG.Common.SL6-x86
Normal file
7
configure/os/CONFIG.Common.SL6-x86
Normal file
@@ -0,0 +1,7 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
ARCH_DEP_CFLAGS += -march=i686
|
||||
ARCH_DEP_CXXFLAGS += -fno-strict-aliasing
|
||||
6
configure/os/CONFIG.Common.SL6-x86_64
Normal file
6
configure/os/CONFIG.Common.SL6-x86_64
Normal file
@@ -0,0 +1,6 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
ARCH_DEP_CXXFLAGS += -fno-strict-aliasing
|
||||
3
configure/os/CONFIG.Common.SL6-x86_64-clang
Normal file
3
configure/os/CONFIG.Common.SL6-x86_64-clang
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
8
configure/os/CONFIG.Common.T2-ppc604
Normal file
8
configure/os/CONFIG.Common.T2-ppc604
Normal file
@@ -0,0 +1,8 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 5.5.1
|
||||
WIND_BASE = /afs/psi.ch/project/vxworks/Tornado2.2.1
|
||||
|
||||
#there is a problem with our ccppc and optimization
|
||||
# -O0 works, -O and -O1 and higher are buggy
|
||||
OPT_CFLAGS_YES = -O0
|
||||
OPT_CXXFLAGS_YES = -O0
|
||||
2
configure/os/CONFIG.Common.V62-ppc604
Normal file
2
configure/os/CONFIG.Common.V62-ppc604
Normal file
@@ -0,0 +1,2 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.2
|
||||
5
configure/os/CONFIG.Common.V63-ppc603
Normal file
5
configure/os/CONFIG.Common.V63-ppc603
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
|
||||
VXWORKS_VERSION = 6.3
|
||||
|
||||
# Buggy "uninitialized variable" warning produces many false positives
|
||||
ARCH_DEP_CXXFLAGS += -Wno-uninitialized
|
||||
5
configure/os/CONFIG.Common.V63-ppc604
Normal file
5
configure/os/CONFIG.Common.V63-ppc604
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.3
|
||||
|
||||
# Buggy "uninitialized variable" warning produces many false positives
|
||||
ARCH_DEP_CXXFLAGS += -Wno-uninitialized
|
||||
2
configure/os/CONFIG.Common.V66-ppc603
Normal file
2
configure/os/CONFIG.Common.V66-ppc603
Normal file
@@ -0,0 +1,2 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
|
||||
VXWORKS_VERSION = 6.6
|
||||
2
configure/os/CONFIG.Common.V66-ppc604
Normal file
2
configure/os/CONFIG.Common.V66-ppc604
Normal file
@@ -0,0 +1,2 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.6
|
||||
5
configure/os/CONFIG.Common.V67-ppc604
Normal file
5
configure/os/CONFIG.Common.V67-ppc604
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.7
|
||||
|
||||
#needed when including memPartLib.h, e.g. through moduleLib.h or loadLib.h
|
||||
ARCH_DEP_CFLAGS += -D_VSB_CONFIG_FILE='<../lib/h/config/vsbConfig.h>'
|
||||
24
configure/os/CONFIG.Common.eldk42-ppc4xxFP
Normal file
24
configure/os/CONFIG.Common.eldk42-ppc4xxFP
Normal file
@@ -0,0 +1,24 @@
|
||||
# DeltaTau PowerPMAC with ELDK 4.2
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
ELDK=/opt/eldk-4.2
|
||||
GNU_TARGET=ppc_4xxFP
|
||||
GNU_DIR=$(ELDK)/usr
|
||||
|
||||
ARCH_DEP_CFLAGS += -fno-strict-aliasing
|
||||
|
||||
# This cross tool chain is installed in a somehow weired way
|
||||
# Without the following lines it does not work on RHEL7
|
||||
# but it worked on SL6
|
||||
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2
|
||||
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/powerpc-linux
|
||||
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/backward
|
||||
|
||||
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/lib
|
||||
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/usr/lib
|
||||
16
configure/os/CONFIG.Common.eldk51-ppc4xxSF
Normal file
16
configure/os/CONFIG.Common.eldk51-ppc4xxSF
Normal file
@@ -0,0 +1,16 @@
|
||||
# Virtex FPGA embedded Processor with ELDK 5.1
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = eldk
|
||||
SDK_DIR = /opt/eldk-5.1
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
|
||||
GNU_TARGET = powerpc-4xx-softfloat
|
||||
GNU_ARCH = ppc405-linux
|
||||
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
|
||||
17
configure/os/CONFIG.Common.eldk52-e500v2
Normal file
17
configure/os/CONFIG.Common.eldk52-e500v2
Normal file
@@ -0,0 +1,17 @@
|
||||
# IOxOS IFC1210 with ELDK 5.2
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = eldk
|
||||
SDK_DIR = /opt/eldk-5.2
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
|
||||
GNU_TARGET = powerpc-e500v2
|
||||
GNU_ARCH = ppce500v2-linux-gnuspe
|
||||
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
|
||||
GNU_TARGET_INCLUDE_DIR =
|
||||
25
configure/os/CONFIG.Common.fslqoriq20-e6500_64
Normal file
25
configure/os/CONFIG.Common.fslqoriq20-e6500_64
Normal file
@@ -0,0 +1,25 @@
|
||||
# IOxOS IFC1211 with Freescale QorIQ 2.0 toolchain
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = fslsdk
|
||||
SDK_DIR = /opt/fsl-qoriq/2.0
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
|
||||
SDK_TARGET = ppc64e6500-fsl-linux
|
||||
GNU_TARGET = powerpc64-fsl-linux
|
||||
SDKTARGETSYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
|
||||
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
|
||||
|
||||
ARCH_DEP_CPPFLAGS = --sysroot=$(SDKTARGETSYSROOT)
|
||||
ARCH_DEP_CFLAGS = -mcpu=e6500 -m64 -mhard-float
|
||||
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)
|
||||
|
||||
# warning -O2 and higher are broken!
|
||||
#OPT_CFLAGS_YES = -O1
|
||||
#OPT_CXXFLAGS_YES = -O1
|
||||
5
configure/os/CONFIG.Common.linux-clang
Normal file
5
configure/os/CONFIG.Common.linux-clang
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
GNU = NO
|
||||
CMPLR_CLASS = clang
|
||||
CC = clang
|
||||
CCC = clang++
|
||||
@@ -15,5 +15,14 @@ ARCH_CLASS = xscale
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
GNU_TARGET = xscale_be
|
||||
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
|
||||
CMPLR_PREFIX = $(GNU_TARGET:%=%-)
|
||||
|
||||
# Configure for readline if requested
|
||||
OP_SYS_INCLUDES += $(READLINE_DIR:%=-I%/include)
|
||||
READLINE_LDFLAGS = $(READLINE_DIR:%=-L%/lib)
|
||||
RUNTIME_LDFLAGS_READLINE_YES_NO = $(READLINE_DIR:%=-Wl,-rpath,%/lib)
|
||||
RUNTIME_LDFLAGS += \
|
||||
$(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
|
||||
SHRLIBDIR_LDFLAGS += $(READLINE_LDFLAGS)
|
||||
PRODDIR_LDFLAGS += $(READLINE_LDFLAGS)
|
||||
endif
|
||||
|
||||
@@ -21,13 +21,15 @@ STATIC_LDFLAGS_YES= -Wl,-Bstatic
|
||||
STATIC_LDFLAGS_NO=
|
||||
STATIC_LDLIBS_YES= -Wl,-Bdynamic
|
||||
|
||||
# Set runtime path for shared libraries
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
# Set runtime path for shared libraries if USE_RPATH=YES and STATIC_BUILD=NO
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES_NO = $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
SHRLIBDIR_LDFLAGS += \
|
||||
$(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
|
||||
|
||||
# Set runtime path for products
|
||||
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
# Set runtime path for products if USE_RPATH=YES and STATIC_BUILD=NO
|
||||
PRODDIR_RPATH_LDFLAGS_YES_NO = $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
PRODDIR_LDFLAGS += \
|
||||
$(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
|
||||
|
||||
# Link libraries controlled by COMMANDLINE_LIBRARY
|
||||
# The newest Linux versions only need readline, older ones need both
|
||||
|
||||
17
configure/os/CONFIG.Common.moxa42-armv6l
Normal file
17
configure/os/CONFIG.Common.moxa42-armv6l
Normal file
@@ -0,0 +1,17 @@
|
||||
# Moxa DA-66x with SDK 4.2 and ARM7 processor
|
||||
|
||||
# Include definitions common to all Linux ARM targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-arm
|
||||
|
||||
GNU_DIR=/afs/psi.ch/project/embeddedlinux/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
|
||||
|
||||
# suppress note "the mangling of 'va_list' has changed in GCC 4.4"
|
||||
ARCH_DEP_CXXFLAGS += -Wno-psabi
|
||||
|
||||
ARCH_DEP_CFLAGS += -funwind-tables
|
||||
ARCH_DEP_CXXFLAGS += -fno-strict-aliasing
|
||||
13
configure/os/CONFIG.Common.mvl40-xscale_be
Normal file
13
configure/os/CONFIG.Common.mvl40-xscale_be
Normal file
@@ -0,0 +1,13 @@
|
||||
# Moxa DA-66x with Montavista Linux 4.0
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
ARCH_CLASS = xscale
|
||||
|
||||
GNU_DIR=/afs/psi.ch/project/embeddedlinux/moxa/xscale_be/armv5teb-montavista-linuxeabi
|
||||
|
||||
ARCH_DEP_CFLAGS += -funwind-tables
|
||||
ARCH_DEP_CPPFLAGS += -fno-strict-aliasing
|
||||
@@ -122,20 +122,10 @@ GNU_DIR_6 = $(WIND_BASE)/gnu/$(VX_GNU_VERSION)-vxworks-$(VXWORKS_VERSION)/$(WIND
|
||||
GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
#--------------------------------------------------
|
||||
# Wind River moved nm out of GNU_BIN in some versions
|
||||
# This finds nm on any supported VxWorks version
|
||||
|
||||
WORKBENCH_BIN = $(WIND_BASE)/workbench-$(WORKBENCH_VERSION)/$(WIND_HOST_TYPE)/bin
|
||||
UTILITIES_BIN = $(WIND_BASE)/utilities-$(UTILITIES_VERSION)/$(WIND_HOST_TYPE)/bin
|
||||
|
||||
NM_DIR_6.4 = $(WORKBENCH_BIN)
|
||||
NM_DIR_6.5 = $(WORKBENCH_BIN)
|
||||
NM_DIR_6.6 = $(WORKBENCH_BIN)
|
||||
NM_DIR_6.7 = $(GNU_BIN)
|
||||
NM_DIR_6.8 = $(UTILITIES_BIN)
|
||||
NM_DIR_6.9 = $(UTILITIES_BIN)
|
||||
NM_DIR = $(firstword $(NM_DIR_$(VXWORKS_VERSION)) $(GNU_BIN))
|
||||
|
||||
NM = $(NM_DIR)/$(CMPLR_PREFIX)nm$(CMPLR_SUFFIX)$(HOSTEXE)
|
||||
NMPROG = $(CMPLR_PREFIX)nm$(CMPLR_SUFFIX)$(HOSTEXE)
|
||||
NM = $(firstword $(wildcard $(WIND_BASE)/*/$(WIND_HOST_TYPE)/bin/$(NMPROG)))
|
||||
|
||||
#--------------------------------------------------
|
||||
# A linker script is essential for munching from vxWorks 6.6 onwards
|
||||
@@ -146,14 +136,10 @@ MUNCH_LDFLAGS_6 = -T $(VX_DIR)/target/h/tool/gnu/ldscripts/link.OUT
|
||||
MUNCH_LDFLAGS = $(MUNCH_LDFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
#--------------------------------------------------
|
||||
# The follow 2 exports prevent gnu cross-compiler
|
||||
# from finding wrong assembler (as).
|
||||
# These are required by some of the Wind River tools
|
||||
export WIND_BASE
|
||||
export WIND_HOME = $(WIND_BASE)
|
||||
export WIND_HOST_TYPE
|
||||
|
||||
#--------------------------------------------------
|
||||
# Tornado2.2
|
||||
# The follow export allows vxWorks.h to include gnu header files
|
||||
export TOOL_FAMILY = GNU
|
||||
|
||||
#--------------------------------------------------
|
||||
@@ -175,7 +161,9 @@ OPT_CXXFLAGS_YES = -O2
|
||||
|
||||
#--------------------------------------------------
|
||||
# code flags
|
||||
CODE_CFLAGS =
|
||||
CODE_CPPFLAGS_6 = $(CODE_CPPFLAGS_$(VXWORKS_VERSION))
|
||||
CODE_CPPFLAGS_6 += -fno-strict-aliasing
|
||||
CODE_CPPFLAGS += $(CODE_CPPFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
#
|
||||
# For vxWorks versions before 6.3 we need this g++ compiler flag
|
||||
CODE_CXXFLAGS_5 = -fno-implicit-templates
|
||||
@@ -183,7 +171,7 @@ CODE_CXXFLAGS_6.0 = -fno-implicit-templates
|
||||
CODE_CXXFLAGS_6.1 = -fno-implicit-templates
|
||||
CODE_CXXFLAGS_6.2 = -fno-implicit-templates
|
||||
CODE_CXXFLAGS_6 = $(CODE_CXXFLAGS_$(VXWORKS_VERSION))
|
||||
CODE_CXXFLAGS = $(CODE_CXXFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
CODE_CXXFLAGS += $(CODE_CXXFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
#--------------------------------------------------
|
||||
# no shared libs for vxWorks
|
||||
@@ -196,6 +184,8 @@ OSITHREAD_USE_DEFAULT_STACK = NO
|
||||
|
||||
#--------------------------------------------------
|
||||
# Link definitions
|
||||
CROSS_LDFLAGS =
|
||||
#
|
||||
LINK.cpp = $(LD) -o $@ $(STATIC_LDFLAGS) $(PRODDIR_LDFLAGS) $(LDFLAGS)
|
||||
LINK.cpp += $(PROD_LDFLAGS) $(PROD_LD_OBJS) $(PROD_LD_RESS) $(PROD_LDLIBS)
|
||||
|
||||
|
||||
20
configure/os/CONFIG.Common.yocto21-aarch64
Normal file
20
configure/os/CONFIG.Common.yocto21-aarch64
Normal file
@@ -0,0 +1,20 @@
|
||||
# XILINX Zynq with Yocto 2.1 / Petalinux toolchain
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
ARCH_CLASS = arm64
|
||||
|
||||
SDK = petalinux
|
||||
SDK_DIR = /opt/petalinux-gfa/2017.2
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
|
||||
SDK_TARGET = aarch64-xilinx-linux
|
||||
GNU_TARGET = $(SDK_TARGET)
|
||||
SDKTARGETSYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
|
||||
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
|
||||
|
||||
ARCH_DEP_CPPFLAGS = --sysroot=$(SDKTARGETSYSROOT)
|
||||
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)
|
||||
3
configure/os/CONFIG.RHEL7-x86_64.Common
Normal file
3
configure/os/CONFIG.RHEL7-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
|
||||
2
configure/os/CONFIG.RHEL7-x86_64.RHEL7-x86_64
Normal file
2
configure/os/CONFIG.RHEL7-x86_64.RHEL7-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
14
configure/os/CONFIG.RHEL7-x86_64.SL6-x86
Normal file
14
configure/os/CONFIG.RHEL7-x86_64.SL6-x86
Normal file
@@ -0,0 +1,14 @@
|
||||
# "cross compile" for older Linux version
|
||||
# Use older compiler and older libraries
|
||||
# Used packages:
|
||||
# compat-gcc-44-c++-4.4
|
||||
# compat-gcc-44-4.4
|
||||
# compat-glibc-headers-2.12-4
|
||||
# It was neccessary to install 32 bit compatibility libraries manually
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc44
|
||||
CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++44
|
||||
TARGET_LDFLAGS = -L /usr/lib/x86_64-redhat-linux6E/lib
|
||||
LINK.cpp += --as-needed -lc -lm -lrt -lpthread -lreadline -ltinfo
|
||||
14
configure/os/CONFIG.RHEL7-x86_64.SL6-x86_64
Normal file
14
configure/os/CONFIG.RHEL7-x86_64.SL6-x86_64
Normal file
@@ -0,0 +1,14 @@
|
||||
# "cross compile" for older Linux version
|
||||
# Use older compiler and older libraries
|
||||
# Used packages:
|
||||
# compat-gcc-44-c++-4.4
|
||||
# compat-gcc-44-4.4
|
||||
# compat-glibc-headers-2.12-4
|
||||
# compat-glibc-2.12-4
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc44
|
||||
CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++44
|
||||
TARGET_LDFLAGS = -L /usr/lib/x86_64-redhat-linux6E/lib64
|
||||
LINK.cpp += --as-needed -lc -lm -lrt -lpthread -lreadline -ltinfo
|
||||
3
configure/os/CONFIG.SL5-x86.Common
Normal file
3
configure/os/CONFIG.SL5-x86.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.Common
|
||||
2
configure/os/CONFIG.SL5-x86.SL5-x86
Normal file
2
configure/os/CONFIG.SL5-x86.SL5-x86
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
3
configure/os/CONFIG.SL5-x86_64.Common
Normal file
3
configure/os/CONFIG.SL5-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
|
||||
2
configure/os/CONFIG.SL5-x86_64.SL5-x86_64
Normal file
2
configure/os/CONFIG.SL5-x86_64.SL5-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
2
configure/os/CONFIG.SL6-x86.Common
Normal file
2
configure/os/CONFIG.SL6-x86.Common
Normal file
@@ -0,0 +1,2 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
2
configure/os/CONFIG.SL6-x86.SL6-x86
Normal file
2
configure/os/CONFIG.SL6-x86.SL6-x86
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
3
configure/os/CONFIG.SL6-x86_64.Common
Normal file
3
configure/os/CONFIG.SL6-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
|
||||
2
configure/os/CONFIG.SL6-x86_64.SL6-x86
Normal file
2
configure/os/CONFIG.SL6-x86_64.SL6-x86
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
2
configure/os/CONFIG.SL6-x86_64.SL6-x86_64
Normal file
2
configure/os/CONFIG.SL6-x86_64.SL6-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
@@ -11,19 +11,14 @@ GNU_TARGET = arm-linux
|
||||
CMPLR_SUFFIX =
|
||||
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
|
||||
|
||||
# Provide a link-time path for shared libraries
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
|
||||
SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
|
||||
# Provide a link-time path for products
|
||||
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
|
||||
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
|
||||
# Provide a link-time path for readline
|
||||
RUNTIME_LDFLAGS_READLINE_YES = -Wl,-rpath-link,$(GNU_DIR)/lib
|
||||
RUNTIME_LDFLAGS_READLINE = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
|
||||
RUNTIME_LDFLAGS_READLINE_CURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
|
||||
RUNTIME_LDFLAGS_READLINE_NCURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
|
||||
# Provide a link-time path for readline if needed
|
||||
OP_SYS_INCLUDES += $(READLINE_DIR:%=-I%/include)
|
||||
READLINE_LDFLAGS = $(READLINE_DIR:%=-L%/lib)
|
||||
RUNTIME_LDFLAGS_READLINE_YES_NO = $(READLINE_DIR:%=-Wl,-rpath,%/lib)
|
||||
RUNTIME_LDFLAGS += \
|
||||
$(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
|
||||
SHRLIBDIR_LDFLAGS += $(READLINE_LDFLAGS)
|
||||
PRODDIR_LDFLAGS += $(READLINE_LDFLAGS)
|
||||
|
||||
# Library flags
|
||||
STATIC_LDFLAGS_YES= -Wl,-Bstatic
|
||||
|
||||
@@ -22,7 +22,7 @@ WINLINK = link
|
||||
|
||||
RCCMD = rc -l 0x409 $(INCLUDES) -fo $@ $<
|
||||
|
||||
ARCMD = lib /nologo /verbose /out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
|
||||
ARCMD = lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
|
||||
|
||||
BAFCMD = bscmake /nologo /o $@
|
||||
|
||||
@@ -67,21 +67,21 @@ OBJ_CFLAG = -Fo
|
||||
# vis c++ compiles the code (and includes
|
||||
# the header files)
|
||||
#
|
||||
# /MT static multithreaded C RTL
|
||||
# /MTd static multithreaded C RTL (debug version)
|
||||
# /MD multithreaded C RTL in DLL
|
||||
# /MDd multithreaded C RTL in DLL (debug version)
|
||||
# -MT static multithreaded C RTL
|
||||
# -MTd static multithreaded C RTL (debug version)
|
||||
# -MD multithreaded C RTL in DLL
|
||||
# -MDd multithreaded C RTL in DLL (debug version)
|
||||
VISC_DLL_NO = -DEPICS_DLL_NO
|
||||
VISC_DLL_YES =
|
||||
VISC_DLL = $(VISC_DLL_$(SHARED_LIBRARIES))
|
||||
VISC_STATIC_CFLAGS_DEBUG_NO = d
|
||||
VISC_STATIC_CFLAGS_DEBUG_YES =
|
||||
VISC_STATIC_CFLAGS_DEBUG = $(VISC_STATIC_CFLAGS_DEBUG_$(HOST_OPT))
|
||||
STATIC_CFLAGS_YES= /MT$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CFLAGS_NO= /MD$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CFLAGS_YES= -MT$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CFLAGS_NO= -MD$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
|
||||
# OS vendor c preprocessor
|
||||
CPP = cl /nologo /C /E
|
||||
CPP = cl -nologo -C -E
|
||||
|
||||
# Configure OS vendor C++ compiler
|
||||
#
|
||||
@@ -101,11 +101,12 @@ CODE_CPPFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
|
||||
# Compiler flags for C++ files
|
||||
|
||||
#
|
||||
# -W<N> use warning level N
|
||||
# (maximum lint level warnings at level 4)
|
||||
# -w44355 set "'this' used in the base initializer list" to be level 4
|
||||
# -W<n> disable warnings from levels > n
|
||||
# -w<n><m> set warning m to level n
|
||||
# -w44355 "'this' used in the base initializer list"
|
||||
# -w44344 "behavior change: use of explicit template arguments results in ..."
|
||||
WARN_CXXFLAGS_YES = -W3 -w44355 -w44344
|
||||
# -w44251 "class needs to have dll-interface to be used by clients of ..."
|
||||
WARN_CXXFLAGS_YES = -W3 -w44355 -w44344 -w44251
|
||||
WARN_CXXFLAGS_NO = -W1
|
||||
|
||||
#
|
||||
@@ -129,18 +130,29 @@ OBJ_CXXFLAG = -Fo
|
||||
# vis c++ compiles the code (and includes
|
||||
# the header files)
|
||||
#
|
||||
# /MT static multithreaded C RTL
|
||||
# /MTd static multithreaded C RTL (debug version)
|
||||
# /MD multithreaded C RTL in DLL
|
||||
# /MDd multithreaded C RTL in DLL (debug version)
|
||||
STATIC_CXXFLAGS_YES= /MT$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CXXFLAGS_NO= /MD$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
# -MT static multithreaded C RTL
|
||||
# -MTd static multithreaded C RTL (debug version)
|
||||
# -MD multithreaded C RTL in DLL
|
||||
# -MDd multithreaded C RTL in DLL (debug version)
|
||||
STATIC_CXXFLAGS_YES= -MT$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CXXFLAGS_NO= -MD$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
|
||||
STATIC_LDLIBS_YES=ws2_32.lib advapi32.lib user32.lib kernel32.lib winmm.lib
|
||||
STATIC_LDLIBS_NO=
|
||||
STATIC_LDFLAGS=
|
||||
RANLIB=
|
||||
|
||||
#
|
||||
# option needed for parallel builds with Visual Studio 2015 onward
|
||||
#
|
||||
# -FS Force Synchronous PDB Writes
|
||||
ifneq ($(VisualStudioVersion),)
|
||||
OPT_CXXFLAGS_NO += -FS
|
||||
OPT_CFLAGS_NO += -FS
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# add -profile here to run the ms profiler
|
||||
# -LTCG whole program optimization
|
||||
# -incremental:no full linking
|
||||
@@ -173,10 +185,10 @@ BAF=.bsc
|
||||
BOF=.sbr
|
||||
|
||||
# Problem: MS Visual C++ does not recognize *.cc as C++ source,
|
||||
# so we do C++ compiles using the global flag -TP
|
||||
COMPILER_CXXFLAGS = /TP
|
||||
# so we do C++ compiles using the global flag -TP
|
||||
COMPILER_CXXFLAGS = -TP
|
||||
|
||||
# Operating system flags
|
||||
# Operating system flags
|
||||
OP_SYS_CFLAGS =
|
||||
OP_SYS_CXXFLAGS = $(COMPILER_CXXFLAGS)
|
||||
|
||||
@@ -192,13 +204,13 @@ OP_SYS_CXXFLAGS = $(COMPILER_CXXFLAGS)
|
||||
# '-entry:_DllMainCRTStartup$(DLLENTRY)'
|
||||
DLLENTRY = @12
|
||||
|
||||
WIN32_DLLFLAGS = /subsystem:windows /dll $(OPT_LDFLAGS) \
|
||||
WIN32_DLLFLAGS = -subsystem:windows -dll $(OPT_LDFLAGS) \
|
||||
$(USR_LDFLAGS) $(CMD_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS)
|
||||
|
||||
#
|
||||
# specify dll .def file only if it exists
|
||||
#
|
||||
DLL_DEF_FLAG = $(addprefix /def:,$(wildcard ../$(addsuffix .def,$*)))
|
||||
DLL_DEF_FLAG = $(addprefix -def:,$(wildcard ../$(addsuffix .def,$*)))
|
||||
|
||||
#
|
||||
# A WIN32 dll has three parts:
|
||||
@@ -206,9 +218,9 @@ DLL_DEF_FLAG = $(addprefix /def:,$(wildcard ../$(addsuffix .def,$*)))
|
||||
# x.lib: what you link to progs that use the dll (DLL_LINK_LIBNAME)
|
||||
# x.exp: what you need to build the dll (in no variable)
|
||||
#
|
||||
LINK.shrlib = $(WINLINK) /nologo $(WIN32_DLLFLAGS) /implib:$*.lib /out:$*.dll $(DLL_DEF_FLAG)
|
||||
LINK.shrlib = $(WINLINK) -nologo $(WIN32_DLLFLAGS) -implib:$*.lib -out:$*.dll $(DLL_DEF_FLAG)
|
||||
LINK.shrlib += $(call PATH_FILTER, $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS))
|
||||
MUNCH_CMD = $(CCC) /Fo $@ $^
|
||||
MUNCH_CMD = $(CCC) -Fo $@ $^
|
||||
|
||||
|
||||
# adjust names of libraries to build
|
||||
@@ -222,7 +234,7 @@ SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
|
||||
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
|
||||
|
||||
#
|
||||
# When SHARED_LIBRARIES is YES we are building a DLL link library
|
||||
# When SHARED_LIBRARIES is YES we are building a DLL link library
|
||||
# and when SHARED_LIBRARIES is NO we are building an object library
|
||||
#
|
||||
DLL_LINK_LIBNAME_YES = $(BUILD_LIBRARY:%=%.lib)
|
||||
@@ -289,7 +301,7 @@ LINK.cpp = $(WINLINK) -nologo $(STATIC_LDFLAGS) $(LDFLAGS) $(PROD_LDFLAGS) \
|
||||
#--------------------------------------------------
|
||||
# UseManifestTool.pl checks MS Visual c++ compiler version number to
|
||||
# decide whether or not to use the Manifest Tool command to embed the
|
||||
# linker created .manifest file into a library or product target.
|
||||
# linker created .manifest file into a library or product target.
|
||||
# useManifestTool.pl returns 0(don't use) or 1(use).
|
||||
#
|
||||
MT.exe = mt.exe -nologo -manifest $@.manifest
|
||||
@@ -299,4 +311,3 @@ MT_EXE_COMMAND_NO = $(MT.exe) "-outputresource:$@;\#1"
|
||||
MT_EXE_COMMAND1 = $(MT_EXE_COMMAND_$(STATIC_BUILD))
|
||||
MT_DLL_COMMAND = $(MT_DLL_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl))
|
||||
MT_EXE_COMMAND = $(MT_EXE_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl))
|
||||
|
||||
|
||||
@@ -9,14 +9,13 @@ include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
|
||||
-include $(CONFIG)/os/CONFIG_SITE.win32-x86.win32-x86
|
||||
|
||||
# Modify CONFIG.win32-x86.win32-x86 settings:
|
||||
ARCH_DEP_CPPFLAGS += /favor:blend
|
||||
# /favor:blend both AMD64 and INTEL64
|
||||
# /favor:AMD64
|
||||
# /favor:INTEL64 (new value)
|
||||
# /favor:EN64T (old value)
|
||||
|
||||
OPT_LDFLAGS += /MACHINE:X64
|
||||
# /MACHINE:X64
|
||||
# /MACHINE:IA64 (Itanium)
|
||||
# /MACHINE:X86
|
||||
ARCH_DEP_CPPFLAGS += -favor:blend
|
||||
# -favor:blend both AMD64 and INTEL64
|
||||
# -favor:AMD64
|
||||
# -favor:INTEL64 (new value)
|
||||
# -favor:EN64T (old value)
|
||||
|
||||
OPT_LDFLAGS += -MACHINE:X64
|
||||
# -MACHINE:X64
|
||||
# -MACHINE:IA64 (Itanium)
|
||||
# -MACHINE:X86
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
# CONFIG_SITE.Common.linux-xscale_be
|
||||
#
|
||||
# Site specific definitions for linux-xscale_be target builds.
|
||||
# Site specific definitions for all linux-xscale_be target builds.
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Set GNU_DIR to point to directory containing the tool-chain
|
||||
|
||||
# APS:
|
||||
GNU_DIR = /usr/local/vw/xscale_be
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# Note: vxWorks 5.3 (Tornado 1.x) is not supported
|
||||
|
||||
#VXWORKS_VERSION = 5.4
|
||||
VXWORKS_VERSION = 5.5
|
||||
#VXWORKS_VERSION = 5.5
|
||||
#VXWORKS_VERSION = 6.0
|
||||
#VXWORKS_VERSION = 6.1
|
||||
#VXWORKS_VERSION = 6.2
|
||||
@@ -20,7 +20,7 @@ VXWORKS_VERSION = 5.5
|
||||
#VXWORKS_VERSION = 6.6
|
||||
#VXWORKS_VERSION = 6.7
|
||||
#VXWORKS_VERSION = 6.8
|
||||
#VXWORKS_VERSION = 6.9
|
||||
VXWORKS_VERSION = 6.9
|
||||
|
||||
|
||||
# Sites may override the following path for a particular host
|
||||
@@ -31,19 +31,7 @@ VXWORKS_VERSION = 5.5
|
||||
# Under vxWorks 6.x this is *not* the same as the old VX_DIR setting
|
||||
|
||||
#WIND_BASE = /usr/local/vw/tornado202p1
|
||||
WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
|
||||
#WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
|
||||
#WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
|
||||
#WIND_BASE = /ade/vxWorks/$(VXWORKS_VERSION)
|
||||
|
||||
|
||||
# WorkBench Version number, required for vxWorks 6.x
|
||||
|
||||
#WORKBENCH_VERSION = 2.6
|
||||
#WORKBENCH_VERSION = 3.0
|
||||
#WORKBENCH_VERSION = 3.2
|
||||
#WORKBENCH_VERSION = 3.3
|
||||
|
||||
|
||||
# Utilities Version number, required from vxWorks 6.8 and later
|
||||
|
||||
#UTILITIES_VERSION = 1.0
|
||||
WIND_BASE = /afs/psi.ch/project/vxworks/VxWorks$(VXWORKS_VERSION)
|
||||
|
||||
13
configure/os/CONFIG_SITE.RHEL7-x86_64.Common
Normal file
13
configure/os/CONFIG_SITE.RHEL7-x86_64.Common
Normal file
@@ -0,0 +1,13 @@
|
||||
# Build 32 bit version as a cross architecture
|
||||
#CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86
|
||||
|
||||
# Improved error checking with clang
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86_64-clang
|
||||
|
||||
# Build for old SL6 64 bit
|
||||
CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64
|
||||
|
||||
# Build for old SL6 32 bit
|
||||
CROSS_COMPILER_TARGET_ARCHS += SL6-x86
|
||||
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
|
||||
1
configure/os/CONFIG_SITE.SL5-x86.Common
Normal file
1
configure/os/CONFIG_SITE.SL5-x86.Common
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
|
||||
3
configure/os/CONFIG_SITE.SL5-x86_64.Common
Normal file
3
configure/os/CONFIG_SITE.SL5-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
|
||||
# Build 32 bit version as a cross architecture
|
||||
CROSS_COMPILER_TARGET_ARCHS += SL5-x86
|
||||
1
configure/os/CONFIG_SITE.SL6-x86.Common
Normal file
1
configure/os/CONFIG_SITE.SL6-x86.Common
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
|
||||
7
configure/os/CONFIG_SITE.SL6-x86_64.Common
Normal file
7
configure/os/CONFIG_SITE.SL6-x86_64.Common
Normal file
@@ -0,0 +1,7 @@
|
||||
# Build 32 bit version as a cross architecture
|
||||
CROSS_COMPILER_TARGET_ARCHS += SL6-x86
|
||||
|
||||
# Improved error checking with clang
|
||||
CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64-clang
|
||||
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
|
||||
@@ -7,3 +7,36 @@
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100 RTEMS-pc386 # RTEMS-mvme5500 RTEMS-mvme167
|
||||
|
||||
GNU_HOST_ARCH=i686
|
||||
GNU_HOST_OS=linux
|
||||
|
||||
# vxWorks 5 for MVxxxx boards
|
||||
CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
|
||||
|
||||
# vxWorks 6.7 for MVxxxx boards
|
||||
CROSS_COMPILER_TARGET_ARCHS += V67-ppc604
|
||||
|
||||
# NI compact RIO
|
||||
CROSS_COMPILER_TARGET_ARCHS += V63-ppc603
|
||||
|
||||
# MOXA montavista linux
|
||||
CROSS_COMPILER_TARGET_ARCHS += mvl40-xscale_be
|
||||
|
||||
# MOXA SDK 4.2
|
||||
CROSS_COMPILER_TARGET_ARCHS += moxa42-armv6l
|
||||
|
||||
# Virtex embedded PPC
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk51-ppc4xxSF
|
||||
|
||||
# IOxOS IFC1210
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk52-e500v2
|
||||
|
||||
# DeltaTau PowerPMAC
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk42-ppc4xxFP
|
||||
|
||||
# Test other vxWorks versions
|
||||
CROSS_COMPILER_TARGET_ARCHS += V66-ppc603
|
||||
CROSS_COMPILER_TARGET_ARCHS += V66-ppc604
|
||||
CROSS_COMPILER_TARGET_ARCHS += V63-ppc604
|
||||
CROSS_COMPILER_TARGET_ARCHS += V62-ppc604
|
||||
|
||||
@@ -7,8 +7,25 @@
|
||||
GNU_TARGET = arm-xilinx-linux-gnueabi
|
||||
|
||||
# Set GNU tools install path
|
||||
# This is the install path at APS:
|
||||
# Examples are installations at the APS:
|
||||
GNU_DIR = /usr/local/vw/zynq-2011.09
|
||||
#GNU_DIR = /usr/local/Xilinx/SDK/2016.3/gnu/arm/lin
|
||||
#GNU_DIR = /APSshare/XilinxSDK/2015.4/gnu/arm/lin
|
||||
|
||||
# If cross-building shared libraries and the paths on the target machine are
|
||||
# different than on the build host, you should uncomment the lines below to
|
||||
# disable putting runtime library paths in products and shared libraries.
|
||||
# You will also need to provide another way for programs to find their shared
|
||||
# libraries at runtime, such as by setting LD_LIBRARY_PATH or by using
|
||||
# mechanisms related to /etc/ld.so.conf
|
||||
#SHRLIBDIR_RPATH_LDFLAGS_YES_NO =
|
||||
#PRODDIR_RPATH_LDFLAGS_YES_NO =
|
||||
# Note: It may be simpler to just set STATIC_BUILD=YES here and not
|
||||
# try to use shared libraries at all in these circumstances.
|
||||
|
||||
# To use libreadline, point this to its install prefix
|
||||
#READLINE_DIR = $(GNU_DIR)
|
||||
#READLINE_DIR = /tools/cross/linux-x86.linux-arm/readline
|
||||
# See CONFIG_SITE.Common.linux-arm for other COMMANDLINE_LIBRARY values
|
||||
#COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
# With a Xilinx SDK, it'll be something like
|
||||
#GNU_DIR = /usr/local/zynq/Xilinx/SDK/2015.4/gnu/arm/lin
|
||||
|
||||
11
configure/os/CONFIG_SITE.linux-x86.linux-xscale_be
Normal file
11
configure/os/CONFIG_SITE.linux-x86.linux-xscale_be
Normal file
@@ -0,0 +1,11 @@
|
||||
# CONFIG_SITE.linux-x86.linux-xscale_be
|
||||
#
|
||||
# Site specific definitions for linux-x86 host - linux-xscale_be targets
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Set GNU_DIR to point to directory containing the tool-chain
|
||||
GNU_DIR = /usr/local/vw/xscale_be
|
||||
|
||||
# If readline is available, configure it
|
||||
READLINE_DIR = $(GNU_DIR)/target/usr
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
@@ -7,3 +7,12 @@
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100
|
||||
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
|
||||
|
||||
GNU_HOST_ARCH_64=x86_64
|
||||
|
||||
# IOxOS IFC1211
|
||||
CROSS_COMPILER_TARGET_ARCHS += fslqoriq20-e6500_64
|
||||
|
||||
# Zynq
|
||||
CROSS_COMPILER_TARGET_ARCHS += yocto21-aarch64
|
||||
|
||||
7
configure/os/CONFIG_SITE.linux-x86_64.linux-xscale_be
Normal file
7
configure/os/CONFIG_SITE.linux-x86_64.linux-xscale_be
Normal file
@@ -0,0 +1,7 @@
|
||||
# CONFIG_SITE.linux-x86_64.linux-xscale_be
|
||||
#
|
||||
# Site specific settings for linux-x86_64 host - linux-xscale_be target
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Inherit setting from linux-x86
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-xscale_be
|
||||
@@ -436,6 +436,6 @@
|
||||
|
||||
References
|
||||
|
||||
1. http://www.aps.anl.gov/epics/base/tornado.php
|
||||
2. http://www.aps.anl.gov/epics/base/vxWorks6.php
|
||||
3. http://www.aps.anl.gov/epics/
|
||||
1. https://epics.anl.gov/base/tornado.php
|
||||
2. https://epics.anl.gov/base/vxWorks6.php
|
||||
3. https://epics.anl.gov/
|
||||
|
||||
@@ -96,8 +96,8 @@
|
||||
needed to build for these target systems. The absolute path to and version
|
||||
number of the vxWorks installation is normally specified in the
|
||||
base/configure/os/CONFIG_SITE.Common.vxWorksCommon file. Consult the EPICS web
|
||||
pages about <a href="http://www.aps.anl.gov/epics/base/tornado.php">vxWorks
|
||||
5.x</a> and <a href="http://www.aps.anl.gov/epics/base/vxWorks6.php">vxWorks
|
||||
pages about <a href="https://epics.anl.gov/base/tornado.php">vxWorks
|
||||
5.x</a> and <a href="https://epics.anl.gov/base/vxWorks6.php">vxWorks
|
||||
6.x</a> and the vxWorks documentation for information about configuring your
|
||||
vxWorks operating system for use with EPICS.</P>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
<H3><A NAME="0_0_8"> Documentation</A></H3>
|
||||
<BLOCKQUOTE>EPICS documentation is available through the
|
||||
<a href="http://www.aps.anl.gov/epics/">EPICS website</a> at Argonne.
|
||||
<a href="https://epics.anl.gov/">EPICS website</a> at Argonne.
|
||||
<P>Release specific documentation can also be found in the base/documentation
|
||||
directory of the distribution.</BLOCKQUOTE>
|
||||
|
||||
|
||||
@@ -3,16 +3,89 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<title>EPICS Base R3.14.12.6 Release Notes</title>
|
||||
<title>EPICS Base R3.14.12.7 Release Notes</title>
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<h1 align="center">EPICS Base Release 3.14.12.6</h1>
|
||||
<h1 align="center">EPICS Base Release 3.14.12.7</h1>
|
||||
|
||||
<h2 align="center">Changes between 3.14.12.5 and 3.14.12.6</h2>
|
||||
<h2 align="center">Changes between 3.14.12.6 and 3.14.12.7</h2>
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
<h3>Extend maximum Posix epicsEventWaitWithTimeout() delay</h3>
|
||||
|
||||
<p>The Posix implementation of epicsEventWaitWithTimeout() was limiting the
|
||||
timeout delay to at most 60 minutes (3600.0 seconds). This has been changed to
|
||||
10 years; significantly longer maximum delays cause problems on systems where
|
||||
<tt>time_t</tt> is still a signed 32-bit integer so cannot represent absolute
|
||||
time-stamps after 2038-01-19. Our assumption is that such 32-bit systems will
|
||||
have been retired before the year 2028, but some additional tests have been
|
||||
added to the epicsTimeTest program to detect and fail if this assumption is
|
||||
violated.</p>
|
||||
|
||||
<h3>New test-related make targets</h3>
|
||||
|
||||
<p>This release adds several new make targets intended for use by developers
|
||||
and Continuous Integration systems which simplify the task of running the
|
||||
built-in self-test programs and viewing the results. Since these targets are
|
||||
intended for limited use they can have requirements for the build host which
|
||||
go beyond the standard minimum set needed to build and run Base.</p>
|
||||
|
||||
<blockquote>
|
||||
|
||||
<h4><tt>test-results</tt> — Summarize test results</h4>
|
||||
|
||||
<p>The new make target <tt>test-results</tt> will run the self-tests if
|
||||
necessary to generate a TAP file for each test, then summarizes the TAP output
|
||||
files in each test directory in turn, displaying the details of any failures.
|
||||
This step uses the program <q>prove</q> which comes with Perl, but also needs
|
||||
<q>cat</q> to be provided in the default search path so will not work on most
|
||||
Windows systems.</p>
|
||||
|
||||
<h4><tt>junitfiles</tt> — Convert test results to JUnit XML Format</h4>
|
||||
|
||||
<p>The new make target <tt>junitfiles</tt> will run the self-tests if necessary
|
||||
and then convert the TAP output files into the more commonly-supported JUnit
|
||||
XML format. The program that performs this conversion needs the Perl module
|
||||
<q><tt>XML::Generator</tt></q> to have been installed.</p>
|
||||
|
||||
<h4><tt>clean-tests</tt> — Delete test result files</h4>
|
||||
|
||||
<p>The new make target <tt>clean-tests</tt> removes any test result files from
|
||||
previous test runs. It cleans both TAP and JUnit XML files.</p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<h3>Fix DNS related crash on exit</h3>
|
||||
|
||||
<p>The attempt to fix DNS related delays for short lived CLI programs (eg. caget)
|
||||
in lp:1527636 introduced a bug which cased these short lived clients to crash on exit.
|
||||
This bug should now be fixed.</p>
|
||||
|
||||
<h3>Server bind issue on Windows</h3>
|
||||
|
||||
<p>When a National Instruments network variables CA server is already running on
|
||||
a Windows system and an IOC or PCAS server is started, the IOC's attempt to
|
||||
bind a TCP socket to the CA server port number fails, but Windows returns a
|
||||
different error status value than the IOC is expecting in that circumstance
|
||||
(because the National Instruments code requests exclusive use of that port,
|
||||
unlike the EPICS code) so the IOC fails to start properly. The relevent EPICS
|
||||
bind() checks have now been updated so the IOC will request that a dynamic port
|
||||
number be allocated for this TCP socket instead when this happens.</p>
|
||||
|
||||
<h3>Checking Periodic Scan Rates</h3>
|
||||
|
||||
<p>Code has been added to the IOC startup to better protect it against bad
|
||||
periodic scan rates, including against locales where <q><tt>.</tt></q> is not
|
||||
accepted as a decimal separator character. If the scan period in a menuScan
|
||||
choice string cannot be parsed, the associated periodic scan thread will no
|
||||
longer be started by the IOC and a warning message will be displayed at iocInit
|
||||
time. The <tt>scanppl</tt> command will also flag the faulty menuScan value.</p>
|
||||
|
||||
|
||||
<h2 align="center">Changes between 3.14.12.5 and 3.14.12.6</h2>
|
||||
|
||||
<h3>Launchpad Bug-fixes</h3>
|
||||
|
||||
<p>In addition to the more detailed change descriptions below, the following
|
||||
@@ -277,8 +350,6 @@ it up. This release patches the readline support code to clean up automatically
|
||||
by registering an epicsAtExit() routine.</p>
|
||||
|
||||
|
||||
<h1 align="center">EPICS Base Release 3.14.12.5</h1>
|
||||
|
||||
<h2 align="center">Changes between 3.14.12.4 and 3.14.12.5</h2>
|
||||
|
||||
<h3>aoRecord raw conversion overflows</h3>
|
||||
@@ -776,7 +847,7 @@ access monitor on the DLYA field; this happens twice during record processing if
|
||||
the ODLY field is larger than 0.</p>
|
||||
|
||||
<p>Timestamps from all seq record monitor events have been wrong since 1995 or
|
||||
earlier, the time being provided was from the last time the record processed.
|
||||
earlier, the time being provided was from the last time the record processed.
|
||||
Now the record timestamp will be updated between reading each DOL1..DOLA link
|
||||
and posting the monitor on the associated DO1..DOA field. The VAL field is
|
||||
never given a value by the record processing code, but is used for posting
|
||||
@@ -1008,7 +1079,7 @@ fixed in this release:</p>
|
||||
<li>717252
|
||||
<a href="https://launchpad.net/bugs/771252">
|
||||
local caput causes ioc crash on win32</a></li>
|
||||
<li>750549
|
||||
<li>750549
|
||||
<a href="https://launchpad.net/bugs/750549 ">
|
||||
epicsTime has non-portable c++ static initialization</a></li>
|
||||
<li>753137
|
||||
@@ -1344,6 +1415,10 @@ giving correct initial monitor behavior in some circumstances.</p>
|
||||
|
||||
<p>Fixed a crash when ALG (algorithm) was changed to Average at runtime.</p>
|
||||
|
||||
<h4>Named Soft Events</h4>
|
||||
|
||||
<p>Soft events can now be meaningful strings instead of numbers 1-255.
|
||||
|
||||
<h4>configure/RELEASE Enhancements</h4>
|
||||
|
||||
<p>Variable definitions in a <tt>configure/RELEASE</tt> file may now use the
|
||||
@@ -1362,7 +1437,7 @@ more extensive modifications.</p>
|
||||
|
||||
<h4>RTEMS 4.10 support</h4>
|
||||
|
||||
<p>Added support for the latest release of RTEMS. There is no longer a
|
||||
<p>Added support for the latest release of RTEMS. There is no longer a
|
||||
distinction between executive and malloc memory pools. The new mount() API
|
||||
is used.</p>
|
||||
|
||||
@@ -1455,7 +1530,7 @@ doing a put</p>
|
||||
<p> These changes impact the Gateway (Proxy server) and other servers but not
|
||||
the IOC.</h4>
|
||||
|
||||
<p>Mantis 360 fix - server is unresponsive for one of its clients, when
|
||||
<p>Mantis 360 fix - server is unresponsive for one of its clients, when
|
||||
async io postponed and in flow control mode</p>
|
||||
|
||||
<p>Mantis 358 fix - PCAS service snap-in has no way to determine if its a put,
|
||||
@@ -1468,7 +1543,7 @@ controling motor through gw.</p>
|
||||
|
||||
<p>Mantis 340 fix - leak when performing a read and conversion fails.</p>
|
||||
|
||||
<p>Mantis 348 fix - A call to 'assert (item.pList == this)'
|
||||
<p>Mantis 348 fix - A call to 'assert (item.pList == this)'
|
||||
failed in ../../../../src/cas/generic/st/ioBlocked.cc line 112</p>
|
||||
|
||||
<p>Mantis 345 fix - Compilation warning: complaint about missing
|
||||
@@ -1484,7 +1559,7 @@ R3.13 client</p>
|
||||
<p>Mantis 329 fix - GW hang, pthread_mutex_lock failed: error Invalid
|
||||
argument message</p>
|
||||
|
||||
<p>Mantis 352 fix - gateway hangs temporarily under heavy load on 8-core
|
||||
<p>Mantis 352 fix - gateway hangs temporarily under heavy load on 8-core
|
||||
64bit RHEL5</p>
|
||||
|
||||
<ul>
|
||||
@@ -2005,7 +2080,7 @@ tools to allow specifying the CA priority.</p>
|
||||
|
||||
<h4>GCC_EXEC_PREFIX references removed from configuration files</h4>
|
||||
|
||||
<p>Definition of GCC_EXEC_PREFIX removed from CONFIG.CrossCommon and
|
||||
<p>Definition of GCC_EXEC_PREFIX removed from CONFIG.CrossCommon and
|
||||
unexport of GCC_EXEC_PREFIX removed from vxWorks and RTEMS builds.</p>
|
||||
|
||||
<h4>RTEMS Release</h4>
|
||||
@@ -3222,7 +3297,7 @@ was returned as -1.17549435E-38. This is now fixed.</p>
|
||||
in a <name>_DBD macro definition. An include line will be placed in the
|
||||
<name>Include.dbd for each file specified in the <name>_DBD
|
||||
definition. If a Makefile contains</p>
|
||||
<pre> DBD=xxx.dbd
|
||||
<pre> DBD=xxx.dbd
|
||||
xxx_DBD = f1.dbd f2.dbd f3.dbd </pre>
|
||||
|
||||
<p>an xxxInclude.dbd file will be created containing the lines</p>
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
%{
|
||||
static int yyerror(char *);
|
||||
@@ -29,9 +28,7 @@ static ASGRULE *yyAsgRule=NULL;
|
||||
%union
|
||||
{
|
||||
int Int;
|
||||
char Char;
|
||||
char *Str;
|
||||
double Real;
|
||||
}
|
||||
|
||||
%%
|
||||
@@ -208,11 +205,12 @@ rule_hag_list_name: tokenSTRING
|
||||
|
||||
static int yyerror(char *str)
|
||||
{
|
||||
if (strlen(str)) epicsPrintf("%s\n", str);
|
||||
epicsPrintf("Access Security file error at line %d\n",
|
||||
line_num);
|
||||
if (strlen(str))
|
||||
errlogPrintf("%s at line %d\n", str, line_num);
|
||||
else
|
||||
errlogPrintf("Error at line %d\n", line_num);
|
||||
yyFailed = TRUE;
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
static int myParse(ASINPUTFUNCPTR inputfunction)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
/* share/src/as/asLibRoutines.c */
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* Author: Marty Kraimer Date: 10-15-93 */
|
||||
|
||||
@@ -21,7 +19,7 @@
|
||||
#include "epicsThread.h"
|
||||
#include "cantProceed.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsPrint.h"
|
||||
#include "errlog.h"
|
||||
#include "gpHash.h"
|
||||
#include "freeList.h"
|
||||
#include "macLib.h"
|
||||
@@ -111,7 +109,7 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction)
|
||||
pasg = (ASG *)ellFirst(&pasbasenew->asgList);
|
||||
while(pasg) {
|
||||
pasg->pavalue = asCalloc(CALCPERFORM_NARGS, sizeof(double));
|
||||
pasg = (ASG *)ellNext((ELLNODE *)pasg);
|
||||
pasg = (ASG *)ellNext(&pasg->node);
|
||||
}
|
||||
gphInitPvt(&pasbasenew->phash, 256);
|
||||
/*Hash each uagname and each hagname*/
|
||||
@@ -121,12 +119,12 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction)
|
||||
while(puagname) {
|
||||
pgphentry = gphAdd(pasbasenew->phash,puagname->user,puag);
|
||||
if(!pgphentry) {
|
||||
epicsPrintf("Duplicated user '%s' in UAG '%s'\n",
|
||||
errlogPrintf("Duplicated user '%s' in UAG '%s'\n",
|
||||
puagname->user, puag->name);
|
||||
}
|
||||
puagname = (UAGNAME *)ellNext((ELLNODE *)puagname);
|
||||
puagname = (UAGNAME *)ellNext(&puagname->node);
|
||||
}
|
||||
puag = (UAG *)ellNext((ELLNODE *)puag);
|
||||
puag = (UAG *)ellNext(&puag->node);
|
||||
}
|
||||
phag = (HAG *)ellFirst(&pasbasenew->hagList);
|
||||
while(phag) {
|
||||
@@ -134,12 +132,12 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction)
|
||||
while(phagname) {
|
||||
pgphentry = gphAdd(pasbasenew->phash,phagname->host,phag);
|
||||
if(!pgphentry) {
|
||||
epicsPrintf("Duplicated host '%s' in HAG '%s'\n",
|
||||
errlogPrintf("Duplicated host '%s' in HAG '%s'\n",
|
||||
phagname->host, phag->name);
|
||||
}
|
||||
phagname = (HAGNAME *)ellNext((ELLNODE *)phagname);
|
||||
phagname = (HAGNAME *)ellNext(&phagname->node);
|
||||
}
|
||||
phag = (HAG *)ellNext((ELLNODE *)phag);
|
||||
phag = (HAG *)ellNext(&phag->node);
|
||||
}
|
||||
pasbaseold = (ASBASE *)pasbase;
|
||||
pasbase = (ASBASE volatile *)pasbasenew;
|
||||
@@ -152,12 +150,12 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction)
|
||||
while(poldasg) {
|
||||
poldmem = (ASGMEMBER *)ellFirst(&poldasg->memberList);
|
||||
while(poldmem) {
|
||||
pnextoldmem = (ASGMEMBER *)ellNext((ELLNODE *)poldmem);
|
||||
ellDelete(&poldasg->memberList,(ELLNODE *)poldmem);
|
||||
pnextoldmem = (ASGMEMBER *)ellNext(&poldmem->node);
|
||||
ellDelete(&poldasg->memberList,&poldmem->node);
|
||||
status = asAddMemberPvt(&poldmem,poldmem->asgName);
|
||||
poldmem = pnextoldmem;
|
||||
}
|
||||
poldasg = (ASG *)ellNext((ELLNODE *)poldasg);
|
||||
poldasg = (ASG *)ellNext(&poldasg->node);
|
||||
}
|
||||
asFreeAll(pasbaseold);
|
||||
}
|
||||
@@ -203,7 +201,7 @@ static int myInputFunction(char *buf, int max_size)
|
||||
n = macExpandString(macHandle,mac_input_buffer,
|
||||
my_buffer,BUF_SIZE);
|
||||
if(n<0) {
|
||||
epicsPrintf("access security: macExpandString failed\n"
|
||||
errlogPrintf("access security: macExpandString failed\n"
|
||||
"input line: %s\n",mac_input_buffer);
|
||||
return(0);
|
||||
}
|
||||
@@ -243,7 +241,7 @@ long epicsShareAPI asInitFP(FILE *fp,const char *substitutions)
|
||||
macHandle = NULL;
|
||||
} else {
|
||||
macInstallMacros(macHandle,macPairs);
|
||||
free((void *)macPairs);
|
||||
free(macPairs);
|
||||
mac_input_buffer = mac_buffer;
|
||||
}
|
||||
}
|
||||
@@ -279,13 +277,13 @@ long epicsShareAPI asRemoveMember(ASMEMBERPVT *asMemberPvt)
|
||||
return(S_asLib_clientsExist);
|
||||
}
|
||||
if(pasgmember->pasg) {
|
||||
ellDelete(&pasgmember->pasg->memberList,(ELLNODE *)pasgmember);
|
||||
ellDelete(&pasgmember->pasg->memberList,&pasgmember->node);
|
||||
} else {
|
||||
errMessage(-1,"Logic error in asRemoveMember");
|
||||
UNLOCK;
|
||||
return(-1);
|
||||
}
|
||||
free((void *)pasgmember);
|
||||
free(pasgmember);
|
||||
*asMemberPvt = NULL;
|
||||
UNLOCK;
|
||||
return(0);
|
||||
@@ -301,7 +299,7 @@ long epicsShareAPI asChangeGroup(ASMEMBERPVT *asMemberPvt,const char *newAsgName
|
||||
if(!pasgmember) return(S_asLib_badMember);
|
||||
LOCK;
|
||||
if(pasgmember->pasg) {
|
||||
ellDelete(&pasgmember->pasg->memberList,(ELLNODE *)pasgmember);
|
||||
ellDelete(&pasgmember->pasg->memberList,&pasgmember->node);
|
||||
} else {
|
||||
errMessage(-1,"Logic error in asChangeGroup");
|
||||
UNLOCK;
|
||||
@@ -353,7 +351,7 @@ long epicsShareAPI asAddClient(ASCLIENTPVT *pasClientPvt,ASMEMBERPVT asMemberPvt
|
||||
pasgclient->user = user;
|
||||
pasgclient->host = host;
|
||||
LOCK;
|
||||
ellAdd(&pasgmember->clientList,(ELLNODE *)pasgclient);
|
||||
ellAdd(&pasgmember->clientList,&pasgclient->node);
|
||||
status = asComputePvt(pasgclient);
|
||||
UNLOCK;
|
||||
return(status);
|
||||
@@ -395,7 +393,7 @@ long epicsShareAPI asRemoveClient(ASCLIENTPVT *asClientPvt)
|
||||
UNLOCK;
|
||||
return(-1);
|
||||
}
|
||||
ellDelete(&pasgMember->clientList,(ELLNODE *)pasgclient);
|
||||
ellDelete(&pasgMember->clientList,&pasgclient->node);
|
||||
UNLOCK;
|
||||
freeListFree(freeListPvt,pasgclient);
|
||||
*asClientPvt = NULL;
|
||||
@@ -508,10 +506,10 @@ int epicsShareAPI asDumpFP(
|
||||
if(puagname) fprintf(fp," {"); else fprintf(fp,"\n");
|
||||
while(puagname) {
|
||||
fprintf(fp,"%s",puagname->user);
|
||||
puagname = (UAGNAME *)ellNext((ELLNODE *)puagname);
|
||||
puagname = (UAGNAME *)ellNext(&puagname->node);
|
||||
if(puagname) fprintf(fp,","); else fprintf(fp,"}\n");
|
||||
}
|
||||
puag = (UAG *)ellNext((ELLNODE *)puag);
|
||||
puag = (UAG *)ellNext(&puag->node);
|
||||
}
|
||||
phag = (HAG *)ellFirst(&pasbase->hagList);
|
||||
if(!phag) fprintf(fp,"No HAGs\n");
|
||||
@@ -521,10 +519,10 @@ int epicsShareAPI asDumpFP(
|
||||
if(phagname) fprintf(fp," {"); else fprintf(fp,"\n");
|
||||
while(phagname) {
|
||||
fprintf(fp,"%s",phagname->host);
|
||||
phagname = (HAGNAME *)ellNext((ELLNODE *)phagname);
|
||||
phagname = (HAGNAME *)ellNext(&phagname->node);
|
||||
if(phagname) fprintf(fp,","); else fprintf(fp,"}\n");
|
||||
}
|
||||
phag = (HAG *)ellNext((ELLNODE *)phag);
|
||||
phag = (HAG *)ellNext(&phag->node);
|
||||
}
|
||||
pasg = (ASG *)ellFirst(&pasbase->asgList);
|
||||
if(!pasg) fprintf(fp,"No ASGs\n");
|
||||
@@ -552,7 +550,7 @@ int epicsShareAPI asDumpFP(
|
||||
fprintf(fp," value=%f",pasg->pavalue[pasginp->inpIndex]);
|
||||
}
|
||||
fprintf(fp,"\n");
|
||||
pasginp = (ASGINP *)ellNext((ELLNODE *)pasginp);
|
||||
pasginp = (ASGINP *)ellNext(&pasginp->node);
|
||||
}
|
||||
while(pasgrule) {
|
||||
int print_end_brace;
|
||||
@@ -572,14 +570,14 @@ int epicsShareAPI asDumpFP(
|
||||
if(pasguag) fprintf(fp,"\t\tUAG(");
|
||||
while(pasguag) {
|
||||
fprintf(fp,"%s",pasguag->puag->name);
|
||||
pasguag = (ASGUAG *)ellNext((ELLNODE *)pasguag);
|
||||
pasguag = (ASGUAG *)ellNext(&pasguag->node);
|
||||
if(pasguag) fprintf(fp,","); else fprintf(fp,")\n");
|
||||
}
|
||||
pasghag = (ASGHAG *)ellFirst(&pasgrule->hagList);
|
||||
if(pasghag) fprintf(fp,"\t\tHAG(");
|
||||
while(pasghag) {
|
||||
fprintf(fp,"%s",pasghag->phag->name);
|
||||
pasghag = (ASGHAG *)ellNext((ELLNODE *)pasghag);
|
||||
pasghag = (ASGHAG *)ellNext(&pasghag->node);
|
||||
if(pasghag) fprintf(fp,","); else fprintf(fp,")\n");
|
||||
}
|
||||
if(pasgrule->calc) {
|
||||
@@ -589,7 +587,7 @@ int epicsShareAPI asDumpFP(
|
||||
fprintf(fp,"\n");
|
||||
}
|
||||
if(print_end_brace) fprintf(fp,"\t}\n");
|
||||
pasgrule = (ASGRULE *)ellNext((ELLNODE *)pasgrule);
|
||||
pasgrule = (ASGRULE *)ellNext(&pasgrule->node);
|
||||
}
|
||||
pasgmember = (ASGMEMBER *)ellFirst(&pasg->memberList);
|
||||
if(!verbose) pasgmember = NULL;
|
||||
@@ -616,12 +614,12 @@ int epicsShareAPI asDumpFP(
|
||||
fprintf(fp," Illegal Access %d",pasgclient->access);
|
||||
if(clientcallback) clientcallback(pasgclient,fp);
|
||||
fprintf(fp,"\n");
|
||||
pasgclient = (ASGCLIENT *)ellNext((ELLNODE *)pasgclient);
|
||||
pasgclient = (ASGCLIENT *)ellNext(&pasgclient->node);
|
||||
}
|
||||
pasgmember = (ASGMEMBER *)ellNext((ELLNODE *)pasgmember);
|
||||
pasgmember = (ASGMEMBER *)ellNext(&pasgmember->node);
|
||||
}
|
||||
if(print_end_brace) fprintf(fp,"}\n");
|
||||
pasg = (ASG *)ellNext((ELLNODE *)pasg);
|
||||
pasg = (ASG *)ellNext(&pasg->node);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -641,7 +639,7 @@ int epicsShareAPI asDumpUagFP(FILE *fp,const char *uagname)
|
||||
if(!puag) fprintf(fp,"No UAGs\n");
|
||||
while(puag) {
|
||||
if(uagname && strcmp(uagname,puag->name)!=0) {
|
||||
puag = (UAG *)ellNext((ELLNODE *)puag);
|
||||
puag = (UAG *)ellNext(&puag->node);
|
||||
continue;
|
||||
}
|
||||
fprintf(fp,"UAG(%s)",puag->name);
|
||||
@@ -649,10 +647,10 @@ int epicsShareAPI asDumpUagFP(FILE *fp,const char *uagname)
|
||||
if(puagname) fprintf(fp," {"); else fprintf(fp,"\n");
|
||||
while(puagname) {
|
||||
fprintf(fp,"%s",puagname->user);
|
||||
puagname = (UAGNAME *)ellNext((ELLNODE *)puagname);
|
||||
puagname = (UAGNAME *)ellNext(&puagname->node);
|
||||
if(puagname) fprintf(fp,","); else fprintf(fp,"}\n");
|
||||
}
|
||||
puag = (UAG *)ellNext((ELLNODE *)puag);
|
||||
puag = (UAG *)ellNext(&puag->node);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -672,7 +670,7 @@ int epicsShareAPI asDumpHagFP(FILE *fp,const char *hagname)
|
||||
if(!phag) fprintf(fp,"No HAGs\n");
|
||||
while(phag) {
|
||||
if(hagname && strcmp(hagname,phag->name)!=0) {
|
||||
phag = (HAG *)ellNext((ELLNODE *)phag);
|
||||
phag = (HAG *)ellNext(&phag->node);
|
||||
continue;
|
||||
}
|
||||
fprintf(fp,"HAG(%s)",phag->name);
|
||||
@@ -680,10 +678,10 @@ int epicsShareAPI asDumpHagFP(FILE *fp,const char *hagname)
|
||||
if(phagname) fprintf(fp," {"); else fprintf(fp,"\n");
|
||||
while(phagname) {
|
||||
fprintf(fp,"%s",phagname->host);
|
||||
phagname = (HAGNAME *)ellNext((ELLNODE *)phagname);
|
||||
phagname = (HAGNAME *)ellNext(&phagname->node);
|
||||
if(phagname) fprintf(fp,","); else fprintf(fp,"}\n");
|
||||
}
|
||||
phag = (HAG *)ellNext((ELLNODE *)phag);
|
||||
phag = (HAG *)ellNext(&phag->node);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -708,7 +706,7 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname)
|
||||
int print_end_brace;
|
||||
|
||||
if(asgname && strcmp(asgname,pasg->name)!=0) {
|
||||
pasg = (ASG *)ellNext((ELLNODE *)pasg);
|
||||
pasg = (ASG *)ellNext(&pasg->node);
|
||||
continue;
|
||||
}
|
||||
fprintf(fp,"ASG(%s)",pasg->name);
|
||||
@@ -728,7 +726,7 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname)
|
||||
fprintf(fp," INVALID");
|
||||
fprintf(fp," value=%f",pasg->pavalue[pasginp->inpIndex]);
|
||||
fprintf(fp,"\n");
|
||||
pasginp = (ASGINP *)ellNext((ELLNODE *)pasginp);
|
||||
pasginp = (ASGINP *)ellNext(&pasginp->node);
|
||||
}
|
||||
while(pasgrule) {
|
||||
int print_end_brace;
|
||||
@@ -748,14 +746,14 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname)
|
||||
if(pasguag) fprintf(fp,"\t\tUAG(");
|
||||
while(pasguag) {
|
||||
fprintf(fp,"%s",pasguag->puag->name);
|
||||
pasguag = (ASGUAG *)ellNext((ELLNODE *)pasguag);
|
||||
pasguag = (ASGUAG *)ellNext(&pasguag->node);
|
||||
if(pasguag) fprintf(fp,","); else fprintf(fp,")\n");
|
||||
}
|
||||
pasghag = (ASGHAG *)ellFirst(&pasgrule->hagList);
|
||||
if(pasghag) fprintf(fp,"\t\tHAG(");
|
||||
while(pasghag) {
|
||||
fprintf(fp,"%s",pasghag->phag->name);
|
||||
pasghag = (ASGHAG *)ellNext((ELLNODE *)pasghag);
|
||||
pasghag = (ASGHAG *)ellNext(&pasghag->node);
|
||||
if(pasghag) fprintf(fp,","); else fprintf(fp,")\n");
|
||||
}
|
||||
if(pasgrule->calc) {
|
||||
@@ -764,10 +762,10 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname)
|
||||
fprintf(fp,"\n");
|
||||
}
|
||||
if(print_end_brace) fprintf(fp,"\t}\n");
|
||||
pasgrule = (ASGRULE *)ellNext((ELLNODE *)pasgrule);
|
||||
pasgrule = (ASGRULE *)ellNext(&pasgrule->node);
|
||||
}
|
||||
if(print_end_brace) fprintf(fp,"}\n");
|
||||
pasg = (ASG *)ellNext((ELLNODE *)pasg);
|
||||
pasg = (ASG *)ellNext(&pasg->node);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -791,7 +789,7 @@ int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname,
|
||||
while(pasg) {
|
||||
|
||||
if(asgname && strcmp(asgname,pasg->name)!=0) {
|
||||
pasg = (ASG *)ellNext((ELLNODE *)pasg);
|
||||
pasg = (ASG *)ellNext(&pasg->node);
|
||||
continue;
|
||||
}
|
||||
fprintf(fp,"ASG(%s)\n",pasg->name);
|
||||
@@ -820,11 +818,11 @@ int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname,
|
||||
else
|
||||
fprintf(fp," Illegal Access %d",pasgclient->access);
|
||||
fprintf(fp,"\n");
|
||||
pasgclient = (ASGCLIENT *)ellNext((ELLNODE *)pasgclient);
|
||||
pasgclient = (ASGCLIENT *)ellNext(&pasgclient->node);
|
||||
}
|
||||
pasgmember = (ASGMEMBER *)ellNext((ELLNODE *)pasgmember);
|
||||
pasgmember = (ASGMEMBER *)ellNext(&pasgmember->node);
|
||||
}
|
||||
pasg = (ASG *)ellNext((ELLNODE *)pasg);
|
||||
pasg = (ASG *)ellNext(&pasg->node);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -875,23 +873,23 @@ static long asAddMemberPvt(ASMEMBERPVT *pasMemberPvt,const char *asgName)
|
||||
pgroup = (ASG *)ellFirst(&pasbase->asgList);
|
||||
while(pgroup) {
|
||||
if(strcmp(pgroup->name,pasgmember->asgName)==0) goto got_it;
|
||||
pgroup = (ASG *)ellNext((ELLNODE *)pgroup);
|
||||
pgroup = (ASG *)ellNext(&pgroup->node);
|
||||
}
|
||||
/* Put it in DEFAULT*/
|
||||
pgroup = (ASG *)ellFirst(&pasbase->asgList);
|
||||
while(pgroup) {
|
||||
if(strcmp(pgroup->name,DEFAULT)==0) goto got_it;
|
||||
pgroup = (ASG *)ellNext((ELLNODE *)pgroup);
|
||||
pgroup = (ASG *)ellNext(&pgroup->node);
|
||||
}
|
||||
errMessage(-1,"Logic Error in asAddMember");
|
||||
return(-1);
|
||||
got_it:
|
||||
pasgmember->pasg = pgroup;
|
||||
ellAdd(&pgroup->memberList,(ELLNODE *)pasgmember);
|
||||
ellAdd(&pgroup->memberList,&pasgmember->node);
|
||||
pasgclient = (ASGCLIENT *)ellFirst(&pasgmember->clientList);
|
||||
while(pasgclient) {
|
||||
asComputePvt((ASCLIENTPVT)pasgclient);
|
||||
pasgclient = (ASGCLIENT *)ellNext((ELLNODE *)pasgclient);
|
||||
pasgclient = (ASGCLIENT *)ellNext(&pasgclient->node);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -904,7 +902,7 @@ static long asComputeAllAsgPvt(void)
|
||||
pasg = (ASG *)ellFirst(&pasbase->asgList);
|
||||
while(pasg) {
|
||||
asComputeAsgPvt(pasg);
|
||||
pasg = (ASG *)ellNext((ELLNODE *)pasg);
|
||||
pasg = (ASG *)ellNext(&pasg->node);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -930,7 +928,7 @@ static long asComputeAsgPvt(ASG *pasg)
|
||||
pasgrule->result = ((result>.99) && (result<1.01)) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
pasgrule = (ASGRULE *)ellNext((ELLNODE *)pasgrule);
|
||||
pasgrule = (ASGRULE *)ellNext(&pasgrule->node);
|
||||
}
|
||||
pasg->inpChanged = FALSE;
|
||||
pasgmember = (ASGMEMBER *)ellFirst(&pasg->memberList);
|
||||
@@ -938,9 +936,9 @@ static long asComputeAsgPvt(ASG *pasg)
|
||||
pasgclient = (ASGCLIENT *)ellFirst(&pasgmember->clientList);
|
||||
while(pasgclient) {
|
||||
asComputePvt((ASCLIENTPVT)pasgclient);
|
||||
pasgclient = (ASGCLIENT *)ellNext((ELLNODE *)pasgclient);
|
||||
pasgclient = (ASGCLIENT *)ellNext(&pasgclient->node);
|
||||
}
|
||||
pasgmember = (ASGMEMBER *)ellNext((ELLNODE *)pasgmember);
|
||||
pasgmember = (ASGMEMBER *)ellNext(&pasgmember->node);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -979,7 +977,7 @@ static long asComputePvt(ASCLIENTPVT asClientPvt)
|
||||
pgphentry = gphFind(pasbase->phash,pasgclient->user,puag);
|
||||
if(pgphentry) goto check_hag;
|
||||
}
|
||||
pasguag = (ASGUAG *)ellNext((ELLNODE *)pasguag);
|
||||
pasguag = (ASGUAG *)ellNext(&pasguag->node);
|
||||
}
|
||||
goto next_rule;
|
||||
}
|
||||
@@ -995,7 +993,7 @@ check_hag:
|
||||
pgphentry=gphFind(pasbase->phash,pasgclient->host,phag);
|
||||
if(pgphentry) goto check_calc;
|
||||
}
|
||||
pasghag = (ASGHAG *)ellNext((ELLNODE *)pasghag);
|
||||
pasghag = (ASGHAG *)ellNext(&pasghag->node);
|
||||
}
|
||||
goto next_rule;
|
||||
}
|
||||
@@ -1006,7 +1004,7 @@ check_calc:
|
||||
trapMask = pasgrule->trapMask;
|
||||
}
|
||||
next_rule:
|
||||
pasgrule = (ASGRULE *)ellNext((ELLNODE *)pasgrule);
|
||||
pasgrule = (ASGRULE *)ellNext(&pasgrule->node);
|
||||
}
|
||||
pasgclient->access = access;
|
||||
pasgclient->trapMask = trapMask;
|
||||
@@ -1033,70 +1031,70 @@ static void asFreeAll(ASBASE *pasbase)
|
||||
while(puag) {
|
||||
puagname = (UAGNAME *)ellFirst(&puag->list);
|
||||
while(puagname) {
|
||||
pnext = ellNext((ELLNODE *)puagname);
|
||||
ellDelete(&puag->list,(ELLNODE *)puagname);
|
||||
free((void *)puagname);
|
||||
pnext = ellNext(&puagname->node);
|
||||
ellDelete(&puag->list,&puagname->node);
|
||||
free(puagname);
|
||||
puagname = pnext;
|
||||
}
|
||||
pnext = ellNext((ELLNODE *)puag);
|
||||
ellDelete(&pasbase->uagList,(ELLNODE *)puag);
|
||||
free((void *)puag);
|
||||
pnext = ellNext(&puag->node);
|
||||
ellDelete(&pasbase->uagList,&puag->node);
|
||||
free(puag);
|
||||
puag = pnext;
|
||||
}
|
||||
phag = (HAG *)ellFirst(&pasbase->hagList);
|
||||
while(phag) {
|
||||
phagname = (HAGNAME *)ellFirst(&phag->list);
|
||||
while(phagname) {
|
||||
pnext = ellNext((ELLNODE *)phagname);
|
||||
ellDelete(&phag->list,(ELLNODE *)phagname);
|
||||
free((void *)phagname);
|
||||
pnext = ellNext(&phagname->node);
|
||||
ellDelete(&phag->list,&phagname->node);
|
||||
free(phagname);
|
||||
phagname = pnext;
|
||||
}
|
||||
pnext = ellNext((ELLNODE *)phag);
|
||||
ellDelete(&pasbase->hagList,(ELLNODE *)phag);
|
||||
free((void *)phag);
|
||||
pnext = ellNext(&phag->node);
|
||||
ellDelete(&pasbase->hagList,&phag->node);
|
||||
free(phag);
|
||||
phag = pnext;
|
||||
}
|
||||
pasg = (ASG *)ellFirst(&pasbase->asgList);
|
||||
while(pasg) {
|
||||
free((void *)pasg->pavalue);
|
||||
free(pasg->pavalue);
|
||||
pasginp = (ASGINP *)ellFirst(&pasg->inpList);
|
||||
while(pasginp) {
|
||||
pnext = ellNext((ELLNODE *)pasginp);
|
||||
ellDelete(&pasg->inpList,(ELLNODE *)pasginp);
|
||||
free((void *)pasginp);
|
||||
pnext = ellNext(&pasginp->node);
|
||||
ellDelete(&pasg->inpList,&pasginp->node);
|
||||
free(pasginp);
|
||||
pasginp = pnext;
|
||||
}
|
||||
pasgrule = (ASGRULE *)ellFirst(&pasg->ruleList);
|
||||
while(pasgrule) {
|
||||
free((void *)pasgrule->calc);
|
||||
free((void *)pasgrule->rpcl);
|
||||
free(pasgrule->calc);
|
||||
free(pasgrule->rpcl);
|
||||
pasguag = (ASGUAG *)ellFirst(&pasgrule->uagList);
|
||||
while(pasguag) {
|
||||
pnext = ellNext((ELLNODE *)pasguag);
|
||||
ellDelete(&pasgrule->uagList,(ELLNODE *)pasguag);
|
||||
free((void *)pasguag);
|
||||
pnext = ellNext(&pasguag->node);
|
||||
ellDelete(&pasgrule->uagList,&pasguag->node);
|
||||
free(pasguag);
|
||||
pasguag = pnext;
|
||||
}
|
||||
pasghag = (ASGHAG *)ellFirst(&pasgrule->hagList);
|
||||
while(pasghag) {
|
||||
pnext = ellNext((ELLNODE *)pasghag);
|
||||
ellDelete(&pasgrule->hagList,(ELLNODE *)pasghag);
|
||||
free((void *)pasghag);
|
||||
pnext = ellNext(&pasghag->node);
|
||||
ellDelete(&pasgrule->hagList,&pasghag->node);
|
||||
free(pasghag);
|
||||
pasghag = pnext;
|
||||
}
|
||||
pnext = ellNext((ELLNODE *)pasgrule);
|
||||
ellDelete(&pasg->ruleList,(ELLNODE *)pasgrule);
|
||||
free((void *)pasgrule);
|
||||
pnext = ellNext(&pasgrule->node);
|
||||
ellDelete(&pasg->ruleList,&pasgrule->node);
|
||||
free(pasgrule);
|
||||
pasgrule = pnext;
|
||||
}
|
||||
pnext = ellNext((ELLNODE *)pasg);
|
||||
ellDelete(&pasbase->asgList,(ELLNODE *)pasg);
|
||||
free((void *)pasg);
|
||||
pnext = ellNext(&pasg->node);
|
||||
ellDelete(&pasbase->asgList,&pasg->node);
|
||||
free(pasg);
|
||||
pasg = pnext;
|
||||
}
|
||||
gphFreeMem(pasbase->phash);
|
||||
free((void *)pasbase);
|
||||
free(pasbase);
|
||||
}
|
||||
|
||||
/*Beginning of routines called by lex code*/
|
||||
@@ -1117,17 +1115,17 @@ static UAG *asUagAdd(const char *uagName)
|
||||
errlogPrintf("Duplicate User Access Group named '%s'\n", uagName);
|
||||
return(NULL);
|
||||
}
|
||||
pnext = (UAG *)ellNext((ELLNODE *)pnext);
|
||||
pnext = (UAG *)ellNext(&pnext->node);
|
||||
}
|
||||
puag = asCalloc(1,sizeof(UAG)+strlen(uagName)+1);
|
||||
ellInit(&puag->list);
|
||||
puag->name = (char *)(puag+1);
|
||||
strcpy(puag->name,uagName);
|
||||
if(pnext==NULL) { /*Add to end of list*/
|
||||
ellAdd(&pasbase->uagList,(ELLNODE *)puag);
|
||||
ellAdd(&pasbase->uagList,&puag->node);
|
||||
} else {
|
||||
pprev = (UAG *)ellPrevious((ELLNODE *)pnext);
|
||||
ellInsert(&pasbase->uagList,(ELLNODE *)pprev,(ELLNODE *)puag);
|
||||
pprev = (UAG *)ellPrevious(&pnext->node);
|
||||
ellInsert(&pasbase->uagList,&pprev->node,&puag->node);
|
||||
}
|
||||
return(puag);
|
||||
}
|
||||
@@ -1140,7 +1138,7 @@ static long asUagAddUser(UAG *puag,const char *user)
|
||||
puagname = asCalloc(1,sizeof(UAGNAME)+strlen(user)+1);
|
||||
puagname->user = (char *)(puagname+1);
|
||||
strcpy(puagname->user,user);
|
||||
ellAdd(&puag->list,(ELLNODE *)puagname);
|
||||
ellAdd(&puag->list,&puagname->node);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -1161,17 +1159,17 @@ static HAG *asHagAdd(const char *hagName)
|
||||
errlogPrintf("Duplicate Host Access Group named '%s'\n", hagName);
|
||||
return(NULL);
|
||||
}
|
||||
pnext = (HAG *)ellNext((ELLNODE *)pnext);
|
||||
pnext = (HAG *)ellNext(&pnext->node);
|
||||
}
|
||||
phag = asCalloc(1,sizeof(HAG)+strlen(hagName)+1);
|
||||
ellInit(&phag->list);
|
||||
phag->name = (char *)(phag+1);
|
||||
strcpy(phag->name,hagName);
|
||||
if(pnext==NULL) { /*Add to end of list*/
|
||||
ellAdd(&pasbase->hagList,(ELLNODE *)phag);
|
||||
ellAdd(&pasbase->hagList,&phag->node);
|
||||
} else {
|
||||
pprev = (HAG *)ellPrevious((ELLNODE *)pnext);
|
||||
ellInsert(&pasbase->hagList,(ELLNODE *)pprev,(ELLNODE *)phag);
|
||||
pprev = (HAG *)ellPrevious(&pnext->node);
|
||||
ellInsert(&pasbase->hagList,&pprev->node,&phag->node);
|
||||
}
|
||||
return(phag);
|
||||
}
|
||||
@@ -1188,7 +1186,7 @@ static long asHagAddHost(HAG *phag,const char *host)
|
||||
for (i = 0; i < len; i++) {
|
||||
phagname->host[i] = (char)tolower((int)host[i]);
|
||||
}
|
||||
ellAdd(&phag->list, (ELLNODE *)phagname);
|
||||
ellAdd(&phag->list, &phagname->node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1214,7 +1212,7 @@ static ASG *asAsgAdd(const char *asgName)
|
||||
errlogPrintf("Duplicate Access Security Group named '%s'\n", asgName);
|
||||
return(NULL);
|
||||
}
|
||||
pnext = (ASG *)ellNext((ELLNODE *)pnext);
|
||||
pnext = (ASG *)ellNext(&pnext->node);
|
||||
}
|
||||
pasg = asCalloc(1,sizeof(ASG)+strlen(asgName)+1);
|
||||
ellInit(&pasg->inpList);
|
||||
@@ -1223,10 +1221,10 @@ static ASG *asAsgAdd(const char *asgName)
|
||||
pasg->name = (char *)(pasg+1);
|
||||
strcpy(pasg->name,asgName);
|
||||
if(pnext==NULL) { /*Add to end of list*/
|
||||
ellAdd(&pasbase->asgList,(ELLNODE *)pasg);
|
||||
ellAdd(&pasbase->asgList,&pasg->node);
|
||||
} else {
|
||||
pprev = (ASG *)ellPrevious((ELLNODE *)pnext);
|
||||
ellInsert(&pasbase->asgList,(ELLNODE *)pprev,(ELLNODE *)pasg);
|
||||
pprev = (ASG *)ellPrevious(&pnext->node);
|
||||
ellInsert(&pasbase->asgList,&pprev->node,&pasg->node);
|
||||
}
|
||||
return(pasg);
|
||||
}
|
||||
@@ -1241,7 +1239,7 @@ static long asAsgAddInp(ASG *pasg,const char *inp,int inpIndex)
|
||||
strcpy(pasginp->inp,inp);
|
||||
pasginp->pasg = pasg;
|
||||
pasginp->inpIndex = inpIndex;
|
||||
ellAdd(&pasg->inpList,(ELLNODE *)pasginp);
|
||||
ellAdd(&pasg->inpList,&pasginp->node);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -1256,7 +1254,7 @@ static ASGRULE *asAsgAddRule(ASG *pasg,asAccessRights access,int level)
|
||||
pasgrule->level = level;
|
||||
ellInit(&pasgrule->uagList);
|
||||
ellInit(&pasgrule->hagList);
|
||||
ellAdd(&pasg->ruleList,(ELLNODE *)pasgrule);
|
||||
ellAdd(&pasg->ruleList,&pasgrule->node);
|
||||
return(pasgrule);
|
||||
}
|
||||
|
||||
@@ -1267,52 +1265,56 @@ static long asAsgAddRuleOptions(ASGRULE *pasgrule,int trapMask)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long asAsgRuleUagAdd(ASGRULE *pasgrule,const char *name)
|
||||
static long asAsgRuleUagAdd(ASGRULE *pasgrule, const char *name)
|
||||
{
|
||||
ASGUAG *pasguag;
|
||||
UAG *puag;
|
||||
ASBASE *pasbase = (ASBASE *)pasbasenew;
|
||||
long status;
|
||||
|
||||
if(!pasgrule) return(0);
|
||||
if (!pasgrule)
|
||||
return 0;
|
||||
|
||||
puag = (UAG *)ellFirst(&pasbase->uagList);
|
||||
while(puag) {
|
||||
if(strcmp(puag->name,name)==0) break;
|
||||
puag = (UAG *)ellNext((ELLNODE *)puag);
|
||||
while (puag) {
|
||||
if (strcmp(puag->name, name)==0)
|
||||
break;
|
||||
puag = (UAG *)ellNext(&puag->node);
|
||||
}
|
||||
if(!puag){
|
||||
status = S_asLib_noUag;
|
||||
errlogPrintf("No User Access Group named '%s' defined\n", name);
|
||||
return(S_asLib_noUag);
|
||||
if (!puag){
|
||||
errlogPrintf("No User Access Group named '%s' defined\n", name);
|
||||
return S_asLib_noUag;
|
||||
}
|
||||
pasguag = asCalloc(1,sizeof(ASGUAG));
|
||||
|
||||
pasguag = asCalloc(1, sizeof(ASGUAG));
|
||||
pasguag->puag = puag;
|
||||
ellAdd(&pasgrule->uagList,(ELLNODE *)pasguag);
|
||||
return(0);
|
||||
ellAdd(&pasgrule->uagList, &pasguag->node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long asAsgRuleHagAdd(ASGRULE *pasgrule,const char *name)
|
||||
static long asAsgRuleHagAdd(ASGRULE *pasgrule, const char *name)
|
||||
{
|
||||
ASGHAG *pasghag;
|
||||
HAG *phag;
|
||||
ASBASE *pasbase = (ASBASE *)pasbasenew;
|
||||
long status;
|
||||
|
||||
if(!pasgrule) return(0);
|
||||
if (!pasgrule)
|
||||
return 0;
|
||||
|
||||
phag = (HAG *)ellFirst(&pasbase->hagList);
|
||||
while(phag) {
|
||||
if(strcmp(phag->name,name)==0) break;
|
||||
phag = (HAG *)ellNext((ELLNODE *)phag);
|
||||
while (phag) {
|
||||
if (strcmp(phag->name, name)==0)
|
||||
break;
|
||||
phag = (HAG *)ellNext(&phag->node);
|
||||
}
|
||||
if(!phag){
|
||||
status = S_asLib_noHag;
|
||||
errlogPrintf("No Host Access Group named '%s' defined\n", name);
|
||||
return(S_asLib_noHag);
|
||||
if (!phag){
|
||||
errlogPrintf("No Host Access Group named '%s' defined\n", name);
|
||||
return S_asLib_noHag;
|
||||
}
|
||||
pasghag = asCalloc(1,sizeof(ASGHAG));
|
||||
|
||||
pasghag = asCalloc(1, sizeof(ASGHAG));
|
||||
pasghag->phag = phag;
|
||||
ellAdd(&pasgrule->hagList,(ELLNODE *)pasghag);
|
||||
return(0);
|
||||
ellAdd(&pasgrule->hagList, &pasghag->node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long asAsgRuleCalc(ASGRULE *pasgrule,const char *calc)
|
||||
@@ -1329,8 +1331,8 @@ static long asAsgRuleCalc(ASGRULE *pasgrule,const char *calc)
|
||||
pasgrule->rpcl = asCalloc(1, INFIX_TO_POSTFIX_SIZE(insize));
|
||||
status = postfix(pasgrule->calc, pasgrule->rpcl, &err);
|
||||
if(status) {
|
||||
free((void *)pasgrule->calc);
|
||||
free((void *)pasgrule->rpcl);
|
||||
free(pasgrule->calc);
|
||||
free(pasgrule->rpcl);
|
||||
pasgrule->calc = NULL;
|
||||
pasgrule->rpcl = NULL;
|
||||
status = S_asLib_badCalc;
|
||||
@@ -1340,8 +1342,8 @@ static long asAsgRuleCalc(ASGRULE *pasgrule,const char *calc)
|
||||
calcArgUsage(pasgrule->rpcl, &pasgrule->inpUsed, &stores);
|
||||
/* Until someone proves stores are not dangerous, don't allow them */
|
||||
if (stores) {
|
||||
free((void *)pasgrule->calc);
|
||||
free((void *)pasgrule->rpcl);
|
||||
free(pasgrule->calc);
|
||||
free(pasgrule->rpcl);
|
||||
pasgrule->calc = NULL;
|
||||
pasgrule->rpcl = NULL;
|
||||
status = S_asLib_badCalc;
|
||||
|
||||
@@ -3,18 +3,21 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
digit [0-9]
|
||||
name [a-zA-Z0-9_\-:\.\[\]<>;]
|
||||
notquote [^\"]
|
||||
escapequote \\\"
|
||||
string {notquote}|{escapequote}
|
||||
newline "\n"
|
||||
backslash "\\"
|
||||
doublequote "\""
|
||||
comment "#"
|
||||
whitespace [ \t\r]
|
||||
escape {backslash}.
|
||||
stringchar [^"\n\\]
|
||||
|
||||
name [a-zA-Z0-9_\-+:.\[\]<>;]
|
||||
digit [0-9]
|
||||
punctuation [(){},]
|
||||
link [A-L]
|
||||
link [A-L]
|
||||
|
||||
%{
|
||||
static ASINPUTFUNCPTR *my_yyinput;
|
||||
@@ -37,46 +40,55 @@ HAG { return(tokenHAG); }
|
||||
ASG { return(tokenASG); }
|
||||
RULE { return(tokenRULE); }
|
||||
CALC { return(tokenCALC); }
|
||||
|
||||
INP{link} {
|
||||
yylval.Int = (unsigned char)yytext[3];
|
||||
yylval.Int -= 'A';
|
||||
return(tokenINP);
|
||||
}
|
||||
}
|
||||
|
||||
{digit}+ { /*integer*/
|
||||
yylval.Int = atoi((char *)yytext);
|
||||
return(tokenINTEGER);
|
||||
}
|
||||
}
|
||||
|
||||
{name}+ { /*unquoted string*/
|
||||
yylval.Str=asStrdup(yytext);
|
||||
return(tokenSTRING);
|
||||
}
|
||||
}
|
||||
|
||||
\"{string}*\" { /*quoted string*/
|
||||
/* making sure that neither double quote gets passed back */
|
||||
{doublequote}({stringchar}|{escape})*{doublequote} { /* quoted string */
|
||||
yylval.Str=asStrdup(yytext+1);
|
||||
yylval.Str[strlen(yylval.Str)-1] = '\0';
|
||||
return(tokenSTRING);
|
||||
}
|
||||
}
|
||||
|
||||
{doublequote}({stringchar}|{escape})*{newline} { /* bad string */
|
||||
yyerror("Newline in quoted string, closing quote missing");
|
||||
}
|
||||
|
||||
{punctuation} { return(yytext[0]); }
|
||||
|
||||
^#.*
|
||||
{whitespace} ;
|
||||
{newline} { line_num++; }
|
||||
|
||||
\n { line_num ++;}
|
||||
{comment}.* ;
|
||||
{whitespace} ;
|
||||
|
||||
. {
|
||||
char message[40];
|
||||
YY_BUFFER_STATE *dummy=0;
|
||||
|
||||
sprintf(message,"invalid character '%c'",yytext[0]);
|
||||
if (isprint((int) yytext[0])) {
|
||||
sprintf(message, "Invalid character '%c'", yytext[0]);
|
||||
}
|
||||
else {
|
||||
sprintf(message, "Invalid character 0x%2.2x", yytext[0]);
|
||||
}
|
||||
yyerror(message);
|
||||
|
||||
/*The following suppress compiler warning messages*/
|
||||
if (0) yyunput('c',(unsigned char *) message);
|
||||
if (0) yy_switch_to_buffer(*dummy);
|
||||
}
|
||||
}
|
||||
|
||||
%%
|
||||
|
||||
@@ -2746,7 +2746,7 @@ time.</p>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>USERFUNC</code></dt>
|
||||
<dd>Optional address of the user's callback function to be run when the
|
||||
<dd>Optional pointer to the user's callback function to be run when the
|
||||
connection state changes. Casual users of channel access may decide to
|
||||
set this field to null or 0 if they do not need to have a callback
|
||||
function run in response to each connection state change event.
|
||||
@@ -2921,7 +2921,7 @@ but they do not cause the record to be processed.</p>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>PFUNC</code></dt>
|
||||
<dd>address of <a href="#User">user supplied callback function</a> to be
|
||||
<dd>Pointer to a <a href="#User">user supplied callback function</a> to be
|
||||
run when the requested operation completes</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
@@ -3029,7 +3029,7 @@ when a CA get request is initiated.</p>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>USERFUNC</code></dt>
|
||||
<dd>Address of <a href="#User">user supplied callback function</a> to be
|
||||
<dd>Pointer to a <a href="#User">user supplied callback function</a> to be
|
||||
run when the requested operation completes.</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
@@ -3130,8 +3130,8 @@ indicating the current state of the channel.</p>
|
||||
<dd>channel identifier</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>USRERFUNC</code></dt>
|
||||
<dd>The address of <a href="#User">user supplied callback function</a> to
|
||||
<dt><code>USERFUNC</code></dt>
|
||||
<dd>Pointer to a <a href="#User">user supplied callback function</a> to
|
||||
be invoked with each subscription update.</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
@@ -3429,7 +3429,7 @@ field should not be used.</p>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt><code>USERFUNC</code></dt>
|
||||
<dd>Address of user callback function to be executed when an exceptions
|
||||
<dd>Pointer to a user callback function to be executed when exceptions
|
||||
occur. Passing a null value causes the default exception handler to be
|
||||
reinstalled. The following structure is passed by value to the user's
|
||||
callback function. Currently, the <code>op</code> field can be one of
|
||||
@@ -3564,7 +3564,7 @@ default handler uses fprintf to send messages to 'stderr'.</p>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt><code>PFUNC</code></dt>
|
||||
<dd>The address of a user supplied callback handler to be invoked when CA
|
||||
<dd>A pointer to a user supplied callback handler to be invoked when CA
|
||||
prints diagnostic messages. Installing a null pointer will cause the
|
||||
default callback handler to be reinstalled.</dd>
|
||||
</dl>
|
||||
@@ -3612,7 +3612,7 @@ specified channel.</p>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>PFUNC</code></dt>
|
||||
<dd>Address of user supplied callback function. A null pointer uninstalls
|
||||
<dd>Pointer to a user supplied callback function. A null pointer uninstalls
|
||||
the current handler. The following arguments are passed <em>by value</em>
|
||||
to the supplied callback handler.
|
||||
<pre>typedef struct ca_access_rights {
|
||||
|
||||
@@ -127,21 +127,10 @@ const char * ca_message_text []
|
||||
|
||||
static epicsThreadOnceId caClientContextIdOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
extern "C" void ca_client_exit_handler (void *)
|
||||
{
|
||||
if ( caClientContextId ) {
|
||||
epicsThreadPrivateDelete ( caClientContextId );
|
||||
caClientContextId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// runs once only for each process
|
||||
extern "C" void ca_init_client_context ( void * )
|
||||
{
|
||||
caClientContextId = epicsThreadPrivateCreate ();
|
||||
if ( caClientContextId ) {
|
||||
epicsAtExit ( ca_client_exit_handler,0 );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -776,6 +765,12 @@ void epicsShareAPI ca_detach_context ()
|
||||
}
|
||||
}
|
||||
|
||||
// backward compatibility with 3.14.8
|
||||
extern "C" void _Z17ca_detach_contextv ()
|
||||
{
|
||||
ca_detach_context();
|
||||
}
|
||||
|
||||
int epicsShareAPI ca_preemtive_callback_is_enabled ()
|
||||
{
|
||||
ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId );
|
||||
|
||||
@@ -635,11 +635,13 @@ void cac::transferChanToVirtCircuit (
|
||||
// must occur before moving to new iiu
|
||||
pChan->getPIIU(guard)->uninstallChanDueToSuccessfulSearchResponse (
|
||||
guard, *pChan, currentTime );
|
||||
piiu->installChannel (
|
||||
guard, *pChan, sid, typeCode, count );
|
||||
if ( piiu ) {
|
||||
piiu->installChannel (
|
||||
guard, *pChan, sid, typeCode, count );
|
||||
|
||||
if ( newIIU ) {
|
||||
piiu->start ( guard );
|
||||
if ( newIIU ) {
|
||||
piiu->start ( guard );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1304,9 +1306,11 @@ void cac::pvMultiplyDefinedNotify ( msgForMultiplyDefinedPV & mfmdpv,
|
||||
callbackManager mgr ( this->notify, this->cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
this->exception ( mgr.cbGuard, guard, ECA_DBLCHNL, buf, __FILE__, __LINE__ );
|
||||
|
||||
// remove from the list under lock
|
||||
this->msgMultiPVList.remove ( mfmdpv );
|
||||
}
|
||||
// remove from the list and delete msg object
|
||||
this->msgMultiPVList.remove ( mfmdpv );
|
||||
// delete msg object
|
||||
mfmdpv.~msgForMultiplyDefinedPV ();
|
||||
this->mdpvFreeList.release ( & mfmdpv );
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
DBE_ARCHIVE (DBE_LOG)
|
||||
Trigger an event when an archive significant change in the channel's
|
||||
valuue occurs. Relies on the archiver monitor deadband field under DCT.
|
||||
value occurs. Relies on the archiver monitor deadband field under DCT.
|
||||
|
||||
DBE_ALARM
|
||||
Trigger an event when the alarm state changes
|
||||
|
||||
@@ -639,7 +639,7 @@ not follow this pattern, but are still printable strings.
|
||||
|
||||
=item [1] R3.14 Channel Access Reference Manual by Jeffrey O. Hill
|
||||
|
||||
L<http://www.aps.anl.gov/epics/base/R3-14/12-docs/CAref.html>
|
||||
L<https://epics.anl.gov/base/R3-14/12-docs/CAref.html>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
@@ -66,10 +66,6 @@ ifdef T_A
|
||||
$(RM) $@ $@_new
|
||||
$(PERL) $(XSUBPP) -typemap $(EXTUTILS)/typemap $< > $@_new && $(MV) $@_new $@
|
||||
|
||||
%.html: ../%.pm
|
||||
$(RM) $@
|
||||
podchecker $< && pod2html --infile=$< --outfile=$@
|
||||
|
||||
$(INSTALL_PERL_MODULES)/$(PERL_ARCHPATH)/%: %
|
||||
$(ECHO) "Installing loadable shared library $@"
|
||||
@$(INSTALL_LIBRARY) -d -m $(LIB_PERMISSIONS) $< $(INSTALL_PERL_MODULES)/$(PERL_ARCHPATH)
|
||||
|
||||
@@ -20,13 +20,16 @@ $Getopt::Std::OUTPUT_HELP_VERSION = 1;
|
||||
HELP_MESSAGE() unless getopts('0:ac:d:e:f:F:g:hnsStw:');
|
||||
HELP_MESSAGE() if $opt_h;
|
||||
|
||||
die "caget: -c option takes a positive number\n"
|
||||
die "caget.pl: -c option takes a positive number\n"
|
||||
unless looks_like_number($opt_c) && $opt_c >= 0;
|
||||
|
||||
die "No pv name specified. ('caget -h' gives help.)\n"
|
||||
die "No pv name specified. ('caget.pl -h' gives help.)\n"
|
||||
unless @ARGV;
|
||||
|
||||
my @chans = map { CA->new($_); } @ARGV;
|
||||
my @chans = map { CA->new($_); } grep { $_ ne '' } @ARGV;
|
||||
|
||||
die "caget.pl: Please provide at least one non-empty pv name\n"
|
||||
unless @chans;
|
||||
|
||||
eval { CA->pend_io($opt_w); };
|
||||
if ($@) {
|
||||
|
||||
@@ -16,10 +16,13 @@ $Getopt::Std::OUTPUT_HELP_VERSION = 1;
|
||||
HELP_MESSAGE() unless getopts('hw:');
|
||||
HELP_MESSAGE() if $opt_h;
|
||||
|
||||
die "No pv name specified. ('cainfo -h' gives help.)\n"
|
||||
die "No pv name specified. ('cainfo.pl -h' gives help.)\n"
|
||||
unless @ARGV;
|
||||
|
||||
my @chans = map { CA->new($_); } @ARGV;
|
||||
my @chans = map { CA->new($_); } grep { $_ ne '' } @ARGV;
|
||||
|
||||
die "cainfo.pl: Please provide at least one non-empty pv name\n"
|
||||
unless @chans;
|
||||
|
||||
eval {
|
||||
CA->pend_io($opt_w);
|
||||
|
||||
@@ -20,14 +20,17 @@ $Getopt::Std::OUTPUT_HELP_VERSION = 1;
|
||||
HELP_MESSAGE() unless getopts('0:c:e:f:F:g:hm:nsSw:');
|
||||
HELP_MESSAGE() if $opt_h;
|
||||
|
||||
die "caget: -c option takes a positive number\n"
|
||||
die "camonitor.pl: -c option takes a positive number\n"
|
||||
unless looks_like_number($opt_c) && $opt_c >= 0;
|
||||
|
||||
die "No pv name specified. ('camonitor -h' gives help.)\n"
|
||||
die "No pv name specified. ('camonitor.pl -h' gives help.)\n"
|
||||
unless @ARGV;
|
||||
|
||||
my %monitors;
|
||||
my @chans = map { CA->new($_, \&conn_callback); } @ARGV;
|
||||
my @chans = map { CA->new($_, \&conn_callback); } grep { $_ ne '' } @ARGV;
|
||||
|
||||
die "camonitor.pl: Please provide at least one non-empty pv name\n"
|
||||
unless @chans;
|
||||
|
||||
my $fmt = ($opt_F eq ' ') ? "%-30s %s\n" : "%s$opt_F%s\n";
|
||||
|
||||
|
||||
@@ -17,11 +17,13 @@ $Getopt::Std::OUTPUT_HELP_VERSION = 1;
|
||||
HELP_MESSAGE() unless getopts('achlnsStw:');
|
||||
HELP_MESSAGE() if $opt_h;
|
||||
|
||||
die "No pv name specified. ('caput -h' gives help.)\n"
|
||||
die "No pv name specified. ('caput.pl -h' gives help.)\n"
|
||||
unless @ARGV;
|
||||
my $pv = shift;
|
||||
die "caput.pl: Empty pv name given.\n"
|
||||
unless $pv ne '';
|
||||
|
||||
die "No value specified. ('caput -h' gives help.)\n"
|
||||
die "No value specified. ('caput.pl -h' gives help.)\n"
|
||||
unless @ARGV;
|
||||
|
||||
my $chan = CA->new($pv);
|
||||
|
||||
@@ -26,6 +26,8 @@ SRC_DIRS += $(CA)
|
||||
INC += casdef.h
|
||||
INC += casEventMask.h
|
||||
INC += caNetAddr.h
|
||||
INC += casCtx.h
|
||||
INC += caHdrLargeArray.h
|
||||
|
||||
LIBSRCS += caServer.cc
|
||||
LIBSRCS += caServerI.cc
|
||||
@@ -74,10 +76,9 @@ LIBSRCS += casStreamIO.cc
|
||||
LIBSRCS += ipIgnoreEntry.cc
|
||||
|
||||
# There is a bug in some vxWorks compilers that these work around:
|
||||
ifeq ($(VX_GNU_VERSION), 4.1.2)
|
||||
casStreamOS_CXXFLAGS_vxWorks-ppc604_altivec = -O0
|
||||
casStreamOS_CXXFLAGS_vxWorks-ppc604_long = -O0
|
||||
casStreamOS_CXXFLAGS_vxWorks-ppc604 = -O0
|
||||
ifeq ($(VXWORKS_VERSION)$(filter -mcpu=604,$(ARCH_DEP_CFLAGS)), 6.6-mcpu=604)
|
||||
casDGIntfOS_CXXFLAGS = -fno-inline
|
||||
casStreamOS_CXXFLAGS = -fno-inline
|
||||
endif
|
||||
|
||||
LIBSRCS_vxWorks += templateInstances.cpp
|
||||
|
||||
@@ -530,8 +530,20 @@ caStatus casStrmClient::readResponse ( epicsGuard < casClientMutex > & guard,
|
||||
pChan->getCID(), status, ECA_GETFAIL );
|
||||
}
|
||||
|
||||
aitUint32 elementCount = 0;
|
||||
if (desc.isContainer()) {
|
||||
aitUint32 index;
|
||||
int gdds = gddApplicationTypeTable::app_table.mapAppToIndex
|
||||
( desc.applicationType(), gddAppType_value, index );
|
||||
if ( gdds ) {
|
||||
return S_cas_badType;
|
||||
}
|
||||
elementCount = desc.getDD(index)->getDataSizeElements();
|
||||
} else {
|
||||
elementCount = desc.getDataSizeElements();
|
||||
}
|
||||
ca_uint32_t count = (msg.m_count == 0) ?
|
||||
(ca_uint32_t)desc.getDataSizeElements() :
|
||||
(ca_uint32_t)elementCount :
|
||||
msg.m_count;
|
||||
|
||||
void * pPayload;
|
||||
@@ -659,8 +671,20 @@ caStatus casStrmClient::readNotifyResponse ( epicsGuard < casClientMutex > & gua
|
||||
return ecaStatus;
|
||||
}
|
||||
|
||||
aitUint32 elementCount = 0;
|
||||
if (desc.isContainer()) {
|
||||
aitUint32 index;
|
||||
int gdds = gddApplicationTypeTable::app_table.mapAppToIndex
|
||||
( desc.applicationType(), gddAppType_value, index );
|
||||
if ( gdds ) {
|
||||
return S_cas_badType;
|
||||
}
|
||||
elementCount = desc.getDD(index)->getDataSizeElements();
|
||||
} else {
|
||||
elementCount = desc.getDataSizeElements();
|
||||
}
|
||||
ca_uint32_t count = (msg.m_count == 0) ?
|
||||
(ca_uint32_t)desc.getDataSizeElements() :
|
||||
(ca_uint32_t)elementCount :
|
||||
msg.m_count;
|
||||
|
||||
void *pPayload;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
//
|
||||
@@ -32,7 +32,7 @@ const unsigned caServerConnectPendQueueSize = 5u;
|
||||
//
|
||||
// casIntfIO::casIntfIO()
|
||||
//
|
||||
casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
||||
casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
||||
sock ( INVALID_SOCKET ),
|
||||
addr ( addrIn.getSockIP() )
|
||||
{
|
||||
@@ -40,80 +40,79 @@ casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
||||
osiSocklen_t addrSize;
|
||||
bool portChange;
|
||||
|
||||
if ( ! osiSockAttach () ) {
|
||||
throw S_cas_internal;
|
||||
}
|
||||
if ( ! osiSockAttach () ) {
|
||||
throw S_cas_internal;
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup the server socket
|
||||
*/
|
||||
this->sock = epicsSocketCreate ( AF_INET, SOCK_STREAM, IPPROTO_TCP );
|
||||
if (this->sock==INVALID_SOCKET) {
|
||||
/*
|
||||
* Setup the server socket
|
||||
*/
|
||||
this->sock = epicsSocketCreate ( AF_INET, SOCK_STREAM, IPPROTO_TCP );
|
||||
if (this->sock == INVALID_SOCKET) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
printf ( "No socket error was %s\n", sockErrBuf );
|
||||
throw S_cas_noFD;
|
||||
}
|
||||
printf ( "No socket error was %s\n", sockErrBuf );
|
||||
throw S_cas_noFD;
|
||||
}
|
||||
|
||||
epicsSocketEnableAddressReuseDuringTimeWaitState ( this->sock );
|
||||
|
||||
status = bind ( this->sock,
|
||||
reinterpret_cast <sockaddr *> (&this->addr),
|
||||
sizeof(this->addr) );
|
||||
if (status<0) {
|
||||
if (SOCKERRNO == SOCK_EADDRINUSE) {
|
||||
//
|
||||
// enable assignment of a default port
|
||||
// (so the getsockname() call below will
|
||||
// work correctly)
|
||||
//
|
||||
this->addr.sin_port = ntohs (0);
|
||||
status = bind(
|
||||
status = bind ( this->sock,
|
||||
reinterpret_cast <sockaddr *> (&this->addr),
|
||||
sizeof(this->addr) );
|
||||
if (status < 0) {
|
||||
if (SOCKERRNO == SOCK_EADDRINUSE ||
|
||||
SOCKERRNO == SOCK_EACCES) {
|
||||
//
|
||||
// enable assignment of a default port
|
||||
// (so the getsockname() call below will
|
||||
// work correctly)
|
||||
//
|
||||
this->addr.sin_port = ntohs (0);
|
||||
status = bind(
|
||||
this->sock,
|
||||
reinterpret_cast <sockaddr *> (&this->addr),
|
||||
sizeof(this->addr) );
|
||||
}
|
||||
if (status<0) {
|
||||
}
|
||||
if (status < 0) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
char buf[64];
|
||||
ipAddrToA (&this->addr, buf, sizeof(buf));
|
||||
errPrintf ( S_cas_bindFail,
|
||||
__FILE__, __LINE__,
|
||||
"- bind TCP IP addr=%s failed because %s",
|
||||
buf, sockErrBuf );
|
||||
char buf[64];
|
||||
ipAddrToA (&this->addr, buf, sizeof(buf));
|
||||
errlogPrintf ( "CAS: Socket bind TCP to %s failed with %s",
|
||||
buf, sockErrBuf );
|
||||
epicsSocketDestroy (this->sock);
|
||||
throw S_cas_bindFail;
|
||||
}
|
||||
throw S_cas_bindFail;
|
||||
}
|
||||
portChange = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
portChange = false;
|
||||
}
|
||||
|
||||
addrSize = ( osiSocklen_t ) sizeof (this->addr);
|
||||
status = getsockname (
|
||||
this->sock,
|
||||
reinterpret_cast <sockaddr *> ( &this->addr ),
|
||||
addrSize = ( osiSocklen_t ) sizeof (this->addr);
|
||||
status = getsockname (
|
||||
this->sock,
|
||||
reinterpret_cast <sockaddr *> ( &this->addr ),
|
||||
&addrSize );
|
||||
if (status) {
|
||||
if (status) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
errlogPrintf ( "CAS: getsockname() error %s\n",
|
||||
sockErrBuf );
|
||||
errlogPrintf ( "CAS: getsockname() error %s\n",
|
||||
sockErrBuf );
|
||||
epicsSocketDestroy (this->sock);
|
||||
throw S_cas_internal;
|
||||
}
|
||||
throw S_cas_internal;
|
||||
}
|
||||
|
||||
//
|
||||
// be sure of this now so that we can fetch the IP
|
||||
// address and port number later
|
||||
//
|
||||
//
|
||||
// be sure of this now so that we can fetch the IP
|
||||
// address and port number later
|
||||
//
|
||||
assert (this->addr.sin_family == AF_INET);
|
||||
|
||||
if ( portChange ) {
|
||||
errlogPrintf ( "cas warning: Configured TCP port was unavailable.\n");
|
||||
errlogPrintf ( "cas warning: Using dynamically assigned TCP port %hu,\n",
|
||||
errlogPrintf ( "cas warning: Using dynamically assigned TCP port %hu,\n",
|
||||
ntohs (this->addr.sin_port) );
|
||||
errlogPrintf ( "cas warning: but now two or more servers share the same UDP port.\n");
|
||||
errlogPrintf ( "cas warning: Depending on your IP kernel this server may not be\n" );
|
||||
@@ -121,12 +120,12 @@ casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
||||
}
|
||||
|
||||
status = listen(this->sock, caServerConnectPendQueueSize);
|
||||
if(status < 0) {
|
||||
if (status < 0) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
errlogPrintf ( "CAS: listen() error %s\n", sockErrBuf );
|
||||
errlogPrintf ( "CAS: listen() error %s\n", sockErrBuf );
|
||||
epicsSocketDestroy (this->sock);
|
||||
throw S_cas_internal;
|
||||
throw S_cas_internal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,17 +134,17 @@ casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
||||
//
|
||||
casIntfIO::~casIntfIO()
|
||||
{
|
||||
if (this->sock != INVALID_SOCKET) {
|
||||
epicsSocketDestroy (this->sock);
|
||||
}
|
||||
if (this->sock != INVALID_SOCKET) {
|
||||
epicsSocketDestroy (this->sock);
|
||||
}
|
||||
|
||||
osiSockRelease ();
|
||||
osiSockRelease ();
|
||||
}
|
||||
|
||||
//
|
||||
// newStreamIO::newStreamClient()
|
||||
//
|
||||
casStreamOS *casIntfIO::newStreamClient ( caServerI & cas,
|
||||
casStreamOS *casIntfIO::newStreamClient ( caServerI & cas,
|
||||
clientBufMemoryManager & bufMgr ) const
|
||||
{
|
||||
static bool oneMsgFlag = false;
|
||||
@@ -175,14 +174,14 @@ casStreamOS *casIntfIO::newStreamClient ( caServerI & cas,
|
||||
args.sock = newSock;
|
||||
casStreamOS * pOS = new casStreamOS ( cas, bufMgr, args );
|
||||
if ( ! pOS ) {
|
||||
errMessage ( S_cas_noMemory,
|
||||
errMessage ( S_cas_noMemory,
|
||||
"unable to create data structures for a new client" );
|
||||
epicsSocketDestroy ( newSock );
|
||||
}
|
||||
else {
|
||||
if ( cas.getDebugLevel() > 0u ) {
|
||||
char pName[64u];
|
||||
|
||||
|
||||
pOS->hostName ( pName, sizeof ( pName ) );
|
||||
errlogPrintf ( "CAS: allocated client object for \"%s\"\n", pName );
|
||||
}
|
||||
@@ -197,7 +196,7 @@ void casIntfIO::setNonBlocking()
|
||||
{
|
||||
int status;
|
||||
osiSockIoctl_t yes = true;
|
||||
|
||||
|
||||
status = socket_ioctl(this->sock, FIONBIO, &yes); // X aCC 392
|
||||
if ( status < 0 ) {
|
||||
char sockErrBuf[64];
|
||||
|
||||
@@ -541,11 +541,11 @@ int main (int argc, char *argv[])
|
||||
for (n = 0; optind < argc; n++, optind++)
|
||||
pvs[n].name = argv[optind] ; /* Copy PV names from command line */
|
||||
|
||||
connect_pvs(pvs, nPvs);
|
||||
result = connect_pvs(pvs, nPvs);
|
||||
|
||||
/* Read and print data */
|
||||
|
||||
result = caget(pvs, nPvs, request, format, type, count);
|
||||
if (!result)
|
||||
result = caget(pvs, nPvs, request, format, type, count);
|
||||
|
||||
/* Shut down Channel Access */
|
||||
ca_context_destroy();
|
||||
|
||||
@@ -211,10 +211,11 @@ int main (int argc, char *argv[])
|
||||
for (n = 0; optind < argc; n++, optind++)
|
||||
pvs[n].name = argv[optind] ; /* Copy PV names from command line */
|
||||
|
||||
connect_pvs(pvs, nPvs);
|
||||
result = connect_pvs(pvs, nPvs);
|
||||
|
||||
/* Print data */
|
||||
result = cainfo(pvs, nPvs);
|
||||
if (!result)
|
||||
result = cainfo(pvs, nPvs);
|
||||
|
||||
/* Shut down Channel Access */
|
||||
ca_context_destroy();
|
||||
|
||||
@@ -38,6 +38,7 @@ static unsigned long reqElems = 0;
|
||||
static unsigned long eventMask = DBE_VALUE | DBE_ALARM; /* Event mask used */
|
||||
static int floatAsString = 0; /* Flag: fetch floats as string */
|
||||
static int nConn = 0; /* Number of connected PVs */
|
||||
static int caDebug = 0;
|
||||
|
||||
|
||||
void usage (void)
|
||||
@@ -83,6 +84,9 @@ void usage (void)
|
||||
" -0b: Print as binary number\n"
|
||||
"Alternate output field separator:\n"
|
||||
" -F <ofs>: Use <ofs> to separate fields in output\n"
|
||||
"Debuging:\n"
|
||||
" Default: Do not print debug messages\n"
|
||||
" -d: Print debug messages to stderr\n"
|
||||
"\n"
|
||||
"Example: camonitor -f8 my_channel another_channel\n"
|
||||
" (doubles are printed as %%f with precision of 8)\n\n"
|
||||
@@ -106,6 +110,11 @@ static void event_handler (evargs args)
|
||||
{
|
||||
pv* pv = args.usr;
|
||||
|
||||
if (caDebug)
|
||||
{
|
||||
fprintf(stderr, "event_handler(%s) %s[%ld]\n %s\n",
|
||||
ca_name(args.chid), dbr_type_to_text(args.type), args.count, ca_message(args.status));
|
||||
}
|
||||
pv->status = args.status;
|
||||
if (args.status == ECA_NORMAL)
|
||||
{
|
||||
@@ -134,9 +143,30 @@ static void event_handler (evargs args)
|
||||
static void connection_handler ( struct connection_handler_args args )
|
||||
{
|
||||
pv *ppv = ( pv * ) ca_puser ( args.chid );
|
||||
if (caDebug)
|
||||
{
|
||||
fprintf(stderr, "connection_handler(%s) %s\n",
|
||||
ca_name(args.chid),
|
||||
args.op == CA_OP_CONN_UP ? "UP" :
|
||||
args.op == CA_OP_CONN_DOWN ? "DOWN" :
|
||||
"unknown op");
|
||||
}
|
||||
if ( args.op == CA_OP_CONN_UP ) {
|
||||
nConn++;
|
||||
if (!ppv->onceConnected) {
|
||||
|
||||
if (ppv->onceConnected && ppv->dbfType != ca_field_type(ppv->chid)) {
|
||||
/* Data type has changed. Rebuild connection with new type. */
|
||||
if (caDebug)
|
||||
{
|
||||
fprintf(stderr, " Data type changed %s -> %s\n",
|
||||
dbr_type_to_text(ppv->dbfType),
|
||||
dbr_type_to_text(ca_field_type(ppv->chid)));
|
||||
}
|
||||
ca_clear_subscription(ppv->evid);
|
||||
ppv->evid = NULL;
|
||||
}
|
||||
|
||||
if (!ppv->evid) {
|
||||
ppv->onceConnected = 1;
|
||||
/* Set up pv structure */
|
||||
/* ------------------- */
|
||||
@@ -167,7 +197,7 @@ static void connection_handler ( struct connection_handler_args args )
|
||||
eventMask,
|
||||
event_handler,
|
||||
(void*)ppv,
|
||||
NULL);
|
||||
&ppv->evid);
|
||||
}
|
||||
}
|
||||
else if ( args.op == CA_OP_CONN_DOWN ) {
|
||||
@@ -209,11 +239,14 @@ int main (int argc, char *argv[])
|
||||
|
||||
LINE_BUFFER(stdout); /* Configure stdout buffering */
|
||||
|
||||
while ((opt = getopt(argc, argv, ":nhm:sSe:f:g:l:#:0:w:t:p:F:")) != -1) {
|
||||
while ((opt = getopt(argc, argv, ":ndhm:sSe:f:g:l:#:0:w:t:p:F:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'h': /* Print usage */
|
||||
usage();
|
||||
return 0;
|
||||
case 'd':
|
||||
caDebug=1;
|
||||
break;
|
||||
case 'n': /* Print ENUM as index numbers */
|
||||
enumAsNr=1;
|
||||
break;
|
||||
|
||||
@@ -81,14 +81,14 @@ static void sprint_long (char *ret, dbr_long_t val, IntFormatT outType)
|
||||
}
|
||||
else {
|
||||
const char *fmt[4] = { /* Order must match the enum IntFormatT */
|
||||
"%ld" /* dec */,
|
||||
"0" /* bin, val is 0 */,
|
||||
"0o%lo" /* oct */,
|
||||
"0x%lX" /* hex */
|
||||
"%d" /* dec */,
|
||||
"0" /* bin and val is 0 */,
|
||||
"0o%o" /* oct */,
|
||||
"0x%X" /* hex */
|
||||
};
|
||||
|
||||
/* Formats have long modifier, pass value as a long */
|
||||
sprintf(ret, fmt[outType], (long) val);
|
||||
/* dbr_long_t is actually an int on all supported platforms */
|
||||
sprintf(ret, fmt[outType], (int) val);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,6 +416,12 @@ char *dbr2str (const void *value, unsigned type)
|
||||
ptsNewS = &((struct TYPE *)value)->stamp; \
|
||||
ptsNewC = &tsNow; \
|
||||
\
|
||||
if (!tsInitS) \
|
||||
{ \
|
||||
tsFirst = *ptsNewS; \
|
||||
tsInitS = 1; \
|
||||
} \
|
||||
\
|
||||
switch (tsType) { \
|
||||
case relative: \
|
||||
ptsRefC = &tsStart; \
|
||||
@@ -508,12 +514,6 @@ void print_time_val_sts (pv* pv, unsigned long reqElems)
|
||||
epicsTimeGetCurrent(&tsNow);
|
||||
epicsTimeToStrftime(timeText, TIMETEXTLEN, timeFormatStr, &tsNow);
|
||||
|
||||
if (!tsInitS)
|
||||
{
|
||||
tsFirst = tsNow;
|
||||
tsInitS = 1;
|
||||
}
|
||||
|
||||
if (pv->nElems <= 1 && fieldSeparator == ' ') printf("%-30s", pv->name);
|
||||
else printf("%s", pv->name);
|
||||
printf("%c", fieldSeparator);
|
||||
|
||||
@@ -78,6 +78,7 @@ typedef struct
|
||||
epicsTimeStamp tsPreviousS;
|
||||
char firstStampPrinted;
|
||||
char onceConnected;
|
||||
evid evid;
|
||||
} pv;
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user