Compare commits

...

203 Commits

Author SHA1 Message Date
6bb78e0d59 bump rpm release
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / Fedora-33 (push) Failing after 1s
Base / Fedora-latest (push) Failing after 2s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2024-11-25 11:33:27 +01:00
7d73932dc8 fix recursion bug
Previously, linking a field of e.g. a calc record to itself
(calc.INPA = calc.A) directly or through a chain of other records
that support to follow the link for attributes like units, precision
caused an infinite recursion and crashed the ioc.

Affected records: calc, calcout, seq, sub and aSub

Also added support for seq link 0 fields which had been added meanwhile.
2024-11-25 11:32:41 +01:00
4a442bb56c Support deb12-x86_64 2024-11-25 09:27:53 +01:00
60075df3cf Support deb10-x86_64 as a Host arch (allow to build modules on the system) 2024-11-25 09:26:50 +01:00
42892f3921 make VALID_BUILDS contain Host automatically if BUILD_CLASS is HOST 2024-11-18 10:26:59 +01:00
52b3496084 bump rpm release
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / Fedora-33 (push) Failing after 1s
Base / Fedora-latest (push) Failing after 2s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2024-09-06 16:55:30 +02:00
2296dbc132 Merge remote-tracking branch 'github/propmon' into PSI-7.0 2024-09-06 14:56:21 +02:00
4af01ed26a Merge branch '7.0' into PSI-7.0 2024-09-06 14:55:12 +02:00
d83079999b keep unversioned libs for all linux version
Prevent future problems with versioned libs when we update patch levels.
2024-09-06 14:39:41 +02:00
15a2e22149 revert MAINTENANCE_VERSION numbers to keep dynamic linking compatible 2024-09-06 14:39:21 +02:00
2dc71ebd6e Revert "use versioned libraries from now on for all architectures"
This reverts commit ecb02803c8.
It turned out that we run into unnecessary dynalic link problems when
minor (but compatible) changes cause *_MAINENANCE_VERSION to be
incremented even though the library is compatible.
Maybe use -soname MAJOR.MINOR or -soname MAJOR instead later?
2024-09-06 10:32:17 +02:00
Michael Davidsaver
2e4113b63b Add typing to dbEvent.h opaque structs when -DUSE_TYPED_DBEVENT 2024-09-04 10:15:55 -05:00
Érico Nogueira
3b50194837 genVersionHeader: work with git submodules and worktrees.
When the epics-base directory is used as a git submodule, or checked out
in multiple places as a git worktree, ".git" is not a directory, but a
file which points to the location of the git directory. In that case,
the git tools can still be used to determine the version information.

Without this change, the version string is determined from the build
date/time, which has multiple issues:

- it doesn't include the full information about the build environment
- it is not reproducible
- it leads to unnecessary rebuilds, since a lot of files depend on
  "epicsVCS.h"
2024-09-04 10:14:22 -05:00
99f70a1081 Print link types as text instead of numbers 2024-09-04 10:13:08 -05:00
Grzegorz Kowalski
5d9ffe15da caget: free PV value after printing 2024-09-04 10:02:49 -05:00
Grzegorz Kowalski
3ac8dcc3de caget: free memory allocated for PV array 2024-09-04 10:02:49 -05:00
Jure Varlec
25e155ee8c Fix a mis-asssignemnt of copyright
Copyright was previously assigned based on the author's email, which had
been modifified by repository conversion from CVS to git. This rectifies
the situation by assigning copyright to the authors employer at the time
of creation of the file.
2024-09-04 10:02:04 -05:00
Jure Varlec
049cc175a9 Fix a mangled copyright header 2024-09-04 10:02:04 -05:00
Jure Varlec
0d92b74aae Compactify SPDX tags in README files 2024-09-04 10:02:04 -05:00
Jure Varlec
ecba8a3a5e Move SPDX tags in st file for compatibility 2024-09-04 10:02:04 -05:00
Jure Varlec
466a9b565e Change comment style for SPDX tags in C files 2024-09-04 10:02:04 -05:00
Jure Varlec
c304b7db53 Add SPDX license tags to templates
Copyright information was gathered using `git log` with per-line history
tracking, which allows following the history of a file through renames.
2024-09-04 10:02:04 -05:00
Grzegorz Kowalski
0eb31ed70b free memory allocated for filenames 2024-09-04 09:59:55 -05:00
Chris Johns
c5f5e4e508 rtems: Allow site local override of the default tick period
Add to configure/CONFIG_SITE.local:

 OP_SYS_CFLAGS += -DCONFIGURE_MICROSECONDS_PER_TICK=1000
2024-09-04 09:59:13 -05:00
Freddie Akeroyd
9866815dab Improve error message wording 2024-09-04 09:58:29 -05:00
Freddie Akeroyd
0e66b3edff Improve error message for mingw64 architecture 2024-09-04 09:58:29 -05:00
Freddie Akeroyd
dd154180bf Avoid isnan/isinf redefine in c++ on VS2013 and above 2024-09-04 09:48:03 -05:00
Freddie Akeroyd
574fe116fc protect isnan/isinf define on c++ 2024-09-04 09:48:03 -05:00
7077ece7f9 Send DBE_PROPERTY events before DBE_VALUE | DBE_LOG events to allow clients to update their formatting etc in time 2024-09-02 13:45:25 +02:00
22aaded26d fix DBE_PROPERTY events for mbbi/mbbo records 2024-09-02 11:46:49 +02:00
c1b8831205 send DBE_PROPERTY events only if property field actually changed 2024-09-02 11:46:16 +02:00
1e64b08c32 bump rpm version
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / Fedora-33 (push) Failing after 1s
Base / Fedora-latest (push) Failing after 2s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2024-08-27 13:08:38 +02:00
d67036fcc0 Merge branch 'aliases' into PSI-7.0 2024-08-26 16:37:57 +02:00
d494d91ba2 allow to load the same alias multiple times (unless dbRecordsOnceOnly is set) 2024-08-26 16:30:20 +02:00
Michael Davidsaver
052a0c7e19 test get_enum_strs() 2024-08-21 10:01:26 -05:00
Michael Davidsaver
979dde8376 redo get_enum_strs() to pacify _FORTIFY_SOURCES=3 2024-08-21 10:01:26 -05:00
Michael Davidsaver
9a0113f834 GHA: add gcc with -D_FORTIFY_SOURCE=3 2024-08-21 10:01:26 -05:00
Michael Davidsaver
3d70e70640 Add dbPvt2Rec() cast
Reverse of dbRec2Pvt()

pacify -D_FORTIFY_SOURCE=3 and __builtin_object_size() as
"&precord->common" does not know than common as actually
the prefix of a variable sized struct.
2024-08-21 10:01:26 -05:00
Michael Davidsaver
f9e53dded6 show buffered line along with DB parse error 2024-08-21 09:53:38 -05:00
403ebab858 use more standard permissions for bins and libs 2024-08-21 09:50:26 -05:00
Hinko Kocevar
8e62ea4965 handle deletion of the non-existant record with field 2024-08-21 09:48:23 -05:00
Hinko Kocevar
f00de26be1 directory path name is free'd before it is used in testAbort() 2024-08-21 09:48:23 -05:00
Hinko Kocevar
50b6a3801a check if precordType is null in dbGetRecordTypeName() 2024-08-21 09:48:23 -05:00
Michael Davidsaver
2a5def7fc6 test removal of non-existant record 2024-08-21 09:48:23 -05:00
Michael Davidsaver
fd072e4429 add more information to record(# warning 2024-08-21 09:48:23 -05:00
Hinko Kocevar
3a5c9ab0cd add a warning if deleting a non-existent record 2024-08-21 09:48:23 -05:00
Hinko Kocevar
c735de4ff8 fix number of tests to execute 2024-08-21 09:48:23 -05:00
Hinko Kocevar
bb5423171d remove warning and error messages, fix duplicate flag setting 2024-08-21 09:48:23 -05:00
Hinko Kocevar
4e4e55ca89 invoke dbFreeLinkContents() to clean up link related allocations 2024-08-21 09:48:23 -05:00
Hinko Kocevar
e9748881cd make codacy happy 2024-08-21 09:48:23 -05:00
Hinko Kocevar
39b0301062 plug memory leak resulting from record deletion 2024-08-21 09:48:23 -05:00
Hinko Kocevar
2f98251c9f add unit tests for record deletion 2024-08-21 09:48:23 -05:00
Hinko Kocevar
535c9c2a06 Allow deleting a record at database creation.
Using a magical record type "#" will allow the user to
delete previously created record  from the database.
2024-08-21 09:48:23 -05:00
Michael Davidsaver
057eb87101 readline: only keep history for interactive session 2024-08-21 09:36:39 -05:00
457387ed38 fix warning when dbf_type_to_text is called with an unsigned type argument 2024-08-21 09:35:53 -05:00
b6fffc2225 fix string to epicsUInt32 conversion via double 2024-08-21 09:28:45 -05:00
86cdfc596f fix wrong (unsigned) comparison 2024-08-12 10:29:08 -04:00
Andrew Johnson
3dae29b7e8 Oops, needed stdint.h 2024-08-10 14:45:28 -05:00
Andrew Johnson
9d393c4437 Cast sizeOffset to uintptr_t for ordered comparison
Issue report & fix by Dirk Zimoch.
2024-08-10 13:21:30 -05:00
97ffcb725c fix compile error with gcc 3.4.3 2024-08-09 11:45:20 +02:00
5930e8e2e4 time_t has 64 bit o 64 bit architectures 2024-08-09 11:44:26 +02:00
212f387d1b keep INSTALL_PERMISSIONS non-writable 2024-08-07 17:42:40 +02:00
1ae21cdde4 improve error message more 2024-08-07 17:41:47 +02:00
03f17a08c3 Merge branch '7.0' into PSI-7.0 2024-08-07 17:30:04 +02:00
Andrew Johnson
a5c3330c8e Update .ci module, disable CentOS-7 build 2024-08-07 09:54:16 -05:00
Andrew Johnson
856f345d2c Fix Codacy complaint about C-style casts 2024-08-07 09:54:16 -05:00
Andrew Johnson
3f4d080260 Make dbFastGet/PutConvertRoutine arrays const
Also added Doxygen annotations for them.
2024-08-07 09:54:16 -05:00
Andrew Johnson
1e8d49f2a6 Drop debugging diagnostics 2024-08-07 09:54:16 -05:00
Andrew Johnson
31b22fd253 Add test of jlinkz::putValue() to dbPutLinkTest
Add OUTP link field to xRecord
xRecord::process() puts VAL to the OUTP link
jlinkz writes the output value to the record's own PHAS field
Correct the dbFastPutConvertRoutine lookup
Test sets OUTP link, processes record and confirms that PHAS was set
2024-08-07 09:54:16 -05:00
Andrew Johnson
916b17ef3f Fix review comment 2024-08-07 09:54:16 -05:00
Andrew Johnson
437320926b Move declaration back 2024-08-07 09:54:16 -05:00
Andrew Johnson
7890e67d37 Various misc warnings 2024-08-07 09:54:16 -05:00
Andrew Johnson
918a188285 Define USE_TYPED_DRVET, use drvet * instead of struct drvet * 2024-08-07 09:54:16 -05:00
Andrew Johnson
2f730b8e9f Add arg's to function pointer typedefs and prototypes 2024-08-07 09:54:16 -05:00
Andrew Johnson
1835187a86 Change fast convert routines to match prototype
Most of these edits were make using regexes in find/replace.
2024-08-07 09:54:16 -05:00
Andrew Johnson
f287cfa2ac Introduce & use FASTCONVERTFUNC with full prototype 2024-08-07 09:54:16 -05:00
Andrew Johnson
785237e41a Remove duplicate link libraries 2024-08-07 09:54:16 -05:00
23999a106b use -nologo with rc like with many other MSVC commands 2024-08-07 09:40:29 -05:00
Andrew Johnson
91e1d0ab80 Update release process files 2024-06-27 22:20:19 -05:00
Andrew Johnson
172bfce1f3 Merge 'Release 7.0.8.1' branch into 7.0 2024-06-27 21:07:50 -05:00
Andrew Johnson
615e7e99ce Update version numbers and submodules after release 2024-06-27 20:56:47 -05:00
Andrew Johnson
57c930fbee Release R7.0.8.1
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / CentOS-7 (push) Failing after 1s
Base / Fedora-33 (push) Failing after 2s
Base / Fedora-latest (push) Failing after 1s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2024-06-27 20:55:03 -05:00
Andrew Johnson
785b777baf Update Release Notes, set version numbers 2024-06-26 14:59:18 -05:00
Andrew Johnson
d0d15ee911 Replace UNRELEASED with 7.0.8.1 2024-06-26 14:59:18 -05:00
Andrew Johnson
5af9c7e50d Revert submodules to versions at R7.0.8 2024-06-26 14:59:18 -05:00
Andrew Johnson
5fe563bed8 Limit _FORTIFY_SOURCE <= 2 2024-06-26 14:58:53 -05:00
Tynan Ford
772c10d904 Fix issue with RSRV_SERVER_PORT above 9999
don't worry about null termination on epicsSnprintf call
2024-06-19 09:38:23 -07:00
Michael Davidsaver
72d50ce274 fix dblsr()
clearly doesn't get called very often...
2024-06-14 16:45:07 -07:00
Michael Davidsaver
0a6b9e4511 dbScan: handle scanStop() before start 2024-06-14 16:45:07 -07:00
be8f8b41ff centralize -g flag for gnu targets 2024-06-13 14:35:43 -07:00
Simon Rose
1b46077096 Fix off by one error in constant link fetch
For long string buffers, we currently write a null terminator one byte
past the end of the buffer. This can be seen with a record of the type

```
record(aai, foo) {
  field(NELM, 1)
  field(FTVL, CHAR)
  field(INP, {const: "foo"})
}
```
where the buffer is only of size 1, but then we write at index 1 (aka
past the end of the buffer).

Co-authored-by: Lucas A. M. Magalhães <lucmaga@gmail.com>
2024-06-12 16:19:36 -07:00
Chris Guerrero
ede745cc34 Update aSubRecord.dbd.pod 2024-06-12 09:14:30 -07:00
54117d5371 Don't use build-ids. We don't build debug packages and it causes conflics for the copied over compatibility libraris readelf etc
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 2s
Base / Cross linux-aarch64 (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 1s
Base / Cross linux-arm gnueabi (push) Failing after 2s
Base / CentOS-7 (push) Failing after 2s
Base / Fedora-33 (push) Failing after 1s
Base / Fedora-latest (push) Failing after 2s
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
2024-06-12 15:37:41 +02:00
Michael Davidsaver
a864f16318 dbCa test sync. improvements 2024-06-11 19:37:23 -07:00
seifalrahman
4c20518864 modifying the condition from (status!=0) to (status>0) to skip the block in case the status variable ==-1 2024-06-11 18:45:33 -07:00
Michael Davidsaver
6ca716a77f iocsh: add more iocshSetError() 2024-06-11 13:52:03 -07:00
Michael Davidsaver
aa77b1c04a iocInit errors say ERROR 2024-06-11 11:14:07 -07:00
Michael Davidsaver
fe4247d57d Send .db parser errors to stderr 2024-06-11 11:14:07 -07:00
Michael Davidsaver
77490d4939 space in errPrintf() output 2024-06-11 11:14:07 -07:00
Michael Davidsaver
0495ac3bc5 WARN for FLNK uses CA without PROC 2024-06-11 11:14:07 -07:00
Michael Davidsaver
4a305a42a7 softMain log iocInit() failure. 2024-06-11 11:14:07 -07:00
cc134d4649 work around rpmbuild's problems to find internal perl modules 2024-06-07 17:20:12 +02:00
012c4c73f1 fix LD_LIBRARY_PATH for VxWorks license manager 2024-06-07 17:19:09 +02:00
96864abb6c Simplify cross build targets. In particular avoid rpath because that annoys rpmbuild 2024-06-07 17:19:01 +02:00
DW
11fba63d18 Fix histogram doc 2024-05-29 09:17:03 -05:00
Simon Rose
1db37bcd91 Update release notes 2024-05-29 09:15:35 -05:00
Simon Rose
beec00b403 Fix issue with compress record
The handling of N-to-M array compression was broken with the addition
of the partial buffer option, which broke the bounds check that was
being used.

Note that this also makes the partial buffer option more consistent;
if, for example, you have
```
record(compress, foo) {
  field(ALG, "N to 1 Average")
  field(INP, "bar NPP")
  field(NSAM, 2)
  field(N, 2)
  field(PBUF, YES)
}
```
(with `bar` having, e.g. length 3), then this will now behave as
expected on both of the samples.
2024-05-29 09:15:35 -05:00
DW
4966baf423 fix sizv for printf & fix doc 2024-05-20 09:18:26 -04:00
Michael Davidsaver
e5b4829074 bound lso/lsi to limit of dbAddr::field_size 2024-05-19 11:57:19 -04:00
Ralph Lange
d8b5616772 ci: bump checkout to v4 in check-editorconfig.yml
- fix node16.js usage warning
2024-05-16 10:07:12 +02:00
Ralph Lange
92615a77fe ci: fix last commit (GHA workaround) 2024-05-15 18:04:58 +02:00
Ralph Lange
b3f92d81db ci: add workaround for GHA node20@centos7 failures 2024-05-15 16:57:34 +02:00
Simon Rose
839f764bcb Clean up some potential memory leaks
The watchdog tasks are allocated, but not consistently removed. In
general this doesn't matter: they run in threads that will only
end when the process actually quits. For consistency and for the
purpose of future-proofing, I think there is value in having the
cleanup added in each case.
2024-05-15 09:26:09 -05:00
Simon Rose
4bb50fe664 Memory leak in caservertask.c 2024-05-15 09:26:09 -05:00
ad00947d48 use our own wine on RHEL9 2024-05-06 09:02:11 +02:00
2db99d46a7 need INSTALL_LOCATION realclean to properly clean up 2024-05-03 13:44:12 +02:00
Ralph Lange
c77f32b19c Merge pull request #482 from ericonr/calcout-docs
Fix calcout doc typo.
2024-05-03 04:04:41 +09:00
Érico Nogueira
66ce1c2076 Fix calcout doc typo. 2024-05-02 15:29:22 -03:00
11661455f1 move module pcas into local file 2024-05-02 16:20:01 +02:00
ecb02803c8 use versioned libraries from now on for all architectures 2024-05-02 16:20:01 +02:00
fcb720275a bump RPM version 2024-05-02 16:20:01 +02:00
87d492bffd Merge branch '7.0' into PSI-7.0 2024-04-30 14:40:00 +02:00
Érico Nogueira
1a9dc993c1 Fix gmtime messages in epicsTimeZoneTest. 2024-04-29 15:10:47 -07:00
b379c6f3a5 fix problems with LD_LIBRARY_PATH when not installing to final location (e.g. when building RPMs)
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Fedora-33 (push) Failing after 2s
Base / Fedora-latest (push) Failing after 1s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / CentOS-7 (push) Failing after 1s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2024-04-25 14:33:25 +02:00
da010afde9 fix rpath-link when FINAL_LOCATION is set 2024-04-25 14:33:25 +02:00
cb710920d0 fix bug that left ':'s behind and put only current (which is highest) EPICS version in PATH 2024-04-25 14:33:24 +02:00
87dea74dcd fix linking the caRepeater.service 2024-04-25 14:33:24 +02:00
d35c7fe5eb fix which files belong to which rpm and their dependencies 2024-04-25 14:33:24 +02:00
c5469efca1 change default permissions because rpmbuild likes the files owner-writable 2024-04-25 14:33:24 +02:00
fd436c40e8 fix problem removing broken links 2024-04-25 14:33:24 +02:00
8557d8adce fix permission of caGateway.service 2024-04-25 14:33:24 +02:00
a0c55f597b do not kill the caRepeater on update because that would kill dependent services like caCateways 2024-04-25 14:33:24 +02:00
9090f54f45 Re-added SHRLIB_SUFFIX change which avoids shared library version numbers
for older RHEL7 versions because of backward compatibility problems with RPM.
Remove the exception in CONFIG_SITE.Common.linuxCommon for release 7.0.8!
Create links with full version shared library names to allow programs built
against previous rpm version to run.
2024-04-25 14:33:13 +02:00
6085f9eb0b git ignore bpmbuild products 2024-04-23 11:55:52 +02:00
a1de706d2c update sub-submodules too 2024-04-23 11:55:52 +02:00
0b12a0cf7e fix Obsoletes: caRepeater version 2024-04-23 11:55:45 +02:00
Michael Davidsaver
cb1571783b link.h wrong type
Change to unsigned incorrectly increased size.

e88a186fc3
2024-04-02 08:35:25 -07:00
Freddie Akeroyd
5dfc6caf3c Accept should return SOCKET rather than int 2024-03-06 09:48:26 -06:00
Ralph Lange
cb49bd0133 Update ci-scripts to 3.4.1
Builds on AppVeyor (VS2019) started to fail
because of the Python version/distutils
2024-03-01 18:00:40 +01:00
Freddie Akeroyd
4720b61c1f Move call to setThreadName()
The call to setThreadName() is moved to avoid a race condition that
can happen with very short lived processes. If the process terminates
very quickly e.g. is a google test runner or the msi.exe command
called from a Makefile during a build, then very occasionally a
crash can occur during process termination if setThreadName() when called
from the newly created thread. This looks to be becauae the DLL it is
trying to call gets unloaded between it getting a handle to the DLL
and making the call. Moving the setThreadName() call to the creating
thread avoids this problem. The issue was only ever seen with statically
linked epics executables, I am unsure if the way a DLL based epics
program unloads might avoid this, or just make it less likely but
still possible. As mentioned above, the issue will only ever occur
to threads that are created during process termination and so would
not affect running IOCs
2024-02-21 09:59:36 -06:00
4383cf291e allow macros with defaults in dbLoadRecords without substitutions 2024-02-21 09:50:03 -06:00
Simon Rose
a6977ae731 Fix issue where VSCode makefile extension can delete files
The problem is that VSCode's make extension, in order to determine
some information about the project, runs
```
make --dry-run --always-make
```
which despite its name will actually try to remake the configure/*
files. Running `installEpics.pl` on these will delete them first,
then try copy them, resulting in an error.
2024-02-21 09:45:14 -06:00
e9dcdd8936 do not set EPICS_BASE as that changes the default EPICS version chosen by iocsh and takes precedence over the /usr/local/epics/base link
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / CentOS-7 (push) Failing after 1s
Base / Fedora-33 (push) Failing after 2s
Base / Fedora-latest (push) Failing after 1s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2024-01-29 17:07:43 +01:00
Michael Davidsaver
07cbf00187 posix: warn on epicsSocketCreate() without osiSockAttach() 2023-12-22 10:26:28 -08:00
Michael Davidsaver
c75b9ad0be add dbRecordNode::order
Keep track of parse order of record instances.
2023-12-22 10:26:28 -08:00
Michael Davidsaver
87acb98d1e ca: remove hostname length limit when parsing address lists 2023-12-22 10:26:28 -08:00
Michael Davidsaver
403e203325 quieting clang-tidy, use unsigned
places where we shouldn't be negative anyway
2023-12-22 10:26:28 -08:00
Michael Davidsaver
a7a56912eb default/epicsMessageQueue: initialize threadNode 2023-12-22 10:26:28 -08:00
Michael Davidsaver
fe4a32e425 default/epicsMessageQueue: avoid volatile flag
Only one place where eventSent was accessed
without locking.  Move this load earlier.
2023-12-22 10:26:28 -08:00
Michael Davidsaver
823386573f ipAddrToAsciiGlobal::run() keep scratch buffer as local 2023-12-22 10:26:28 -08:00
Michael Davidsaver
ea8247586f adjustToWorstCaseAlignment() simplify
Add some STATIC_ASSERT to check assumptions.

Only in-tree use is freeListLib to ensure chunks in
a malloc()'d block are aligned.
2023-12-22 10:26:28 -08:00
Michael Davidsaver
e88a186fc3 make link::flags bit field unsigned 2023-12-22 10:26:28 -08:00
Michael Davidsaver
20f32068c3 gha add workflow_dispatch 2023-12-22 10:26:28 -08:00
Andrew Johnson
8998341588 Update version numbers and submodules after release 2023-12-15 13:03:57 -06:00
Andrew Johnson
448fde0671 Set release version numbers
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 2s
Base / Cross linux-aarch64 (push) Failing after 1s
Base / Cross linux-arm gnueabi (push) Failing after 2s
Base / Cross linux-arm gnueabihf (push) Failing after 1s
Base / CentOS-7 (push) Failing after 2s
Base / Fedora-33 (push) Failing after 1s
Base / Fedora-latest (push) Failing after 2s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2023-12-14 16:42:10 -06:00
Andrew Johnson
477e36b1f0 Update submodules to tagged versions 2023-12-14 16:42:10 -06:00
Andrew Johnson
fad830bd14 Remove example sub-module 2023-12-14 16:42:10 -06:00
Andrew Johnson
331df3d7e4 UNRELEASED => 7.0.8 2023-12-14 16:42:10 -06:00
Andrew Johnson
4a53713f37 Update Release Procedures/Checklist 2023-12-14 16:31:42 -06:00
Andrew Johnson
2e6fd505d2 Use epicsSnprintf() for old MSVC compilers 2023-12-14 11:31:36 -06:00
Andrew Johnson
5ecf7d18a8 Clean up Clang 15 sprintf() warnings in libcom and ca 2023-12-13 13:34:25 -06:00
Andrew Johnson
56dbc949ff Add declarations to flex, cleans up Clang 15 warnings. 2023-12-12 13:44:08 -06:00
e2bb42d8d3 obsolete caRepeater rpm
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 2s
Base / Cross linux-aarch64 (push) Failing after 1s
Base / Cross linux-arm gnueabi (push) Failing after 2s
Base / Cross linux-arm gnueabihf (push) Failing after 1s
Base / CentOS-7 (push) Failing after 2s
Base / Fedora-33 (push) Failing after 1s
Base / Fedora-latest (push) Failing after 2s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2023-12-10 13:47:17 +01:00
Simon Rose
6a369acd0b Add newline to help text 2023-12-05 08:05:12 -08:00
Simon Rose
d9d35a4eab Allow auto-declarations for dbdExpand.pl 2023-12-01 09:19:03 -06:00
Ralph Lange
116881ad87 Use split() for fetching last tag with darcs
(setting $/='' breaks reading multi-line into an array)
2023-11-29 09:53:24 -06:00
96857d92bc fix problem with commands returning multiple trailing newlines 2023-11-29 09:53:24 -06:00
Érico Nogueira
0cf8c934f9 Set ASL0 for mbboDirect Bx fields.
Since the record's VAL field is ASL0, it doesn't make sense to gate
writes into the Bx fields with ASL1.
2023-11-29 09:44:03 -06:00
Michael Davidsaver
69d05fe5b0 Add ERROR to error messages 2023-11-26 15:25:09 -08:00
Michael Davidsaver
511bf1ffca const-ify dbLink arrays
external code really should never be modifying pamaplinkType[]
2023-11-25 14:52:16 -08:00
Uchenna Ezeobi
7a7028de56 Config: Fixed Hard coded LDFLAGS in MVME2500 2023-11-17 15:20:32 -06:00
Michael Davidsaver
7a65c001ce update submodules 2023-11-15 07:31:53 -08:00
Michael Davidsaver
0bc6ff3d4c release notes 2023-11-07 16:00:46 -08:00
Michael Davidsaver
f2fe9d1203 bi "Raw Soft Channel" use MASK
If set, apply MASK to value read into RVAL.
2023-11-07 15:53:41 -08:00
Michael Davidsaver
ffc2d0f23a incorrect error check on GetStdHandle()
Likely inconsequential as GetConsoleMode() should
return 0 when given an invalid handle.
2023-11-07 15:53:41 -08:00
Michael Davidsaver
a352865df9 print ANSI escapes to stderr
unconditionally print ANSI some escapes (to colorize errors)
to the stderr stream.
2023-11-07 15:53:22 -08:00
Michael Davidsaver
63740f2edd colorize more errlog messages 2023-11-07 15:53:22 -08:00
Jeremy Lorelli
f4be9daf4d Null check callback function in callbackRequest
Previously, calling callbackRequest(pcallback), where pcallback->callback
is NULL, would result in a crash on one of the callback threads.
2023-11-07 15:17:04 -08:00
Michael Davidsaver
3fa1932345 update ci-scripts 2023-11-07 15:14:09 -08:00
Michael Davidsaver
95bd5453d9 dbRecordField() add "did you mean..." hint for unknown field 2023-11-01 09:52:32 -05:00
Michael Davidsaver
eb3f8a004c const-ify dbCopyEntry() and dbCopyEntryContents() 2023-11-01 09:52:32 -05:00
Michael Davidsaver
9f868a1074 avoid hang during concurrent db_cancel_event()
cf. fab8fd7102
2023-11-01 09:24:44 -05:00
Michael Davidsaver
b41787b6bf doc 2023-10-22 17:42:36 -07:00
19b232545c gha: turn most warnings into errors in github build 2023-10-22 17:42:36 -07:00
Michael Davidsaver
2ca70d3aa2 iocsh: keep history file 2023-10-22 17:42:36 -07:00
JJL772
395015aac4 Com: Make STATIC_ASSERT macro typedefs unique 2023-10-22 17:42:36 -07:00
Michael Davidsaver
92cae86ff2 dbRecordsOnceOnly allow append only with "*"
with

> record(ai, "myrec") {}

dbRecordsOnceOnly!=0 currently disallows appending fields with either form:

> record("*", "myrec") {} # error
> record(ai, "myrec") {}  # error

Change the meaning such that dbRecordsOnceOnly!=0
allways allows appending when explicitly intended (rtype "*").

> record("*", "myrec") {} # allowed
> record(ai, "myrec") {}  # error

Also clearly label this parse error.
2023-10-22 17:42:36 -07:00
Jack Harper
49ea46ee5e iocsh: add comment to cvtArg explaining default iocsharg behaviour 2023-10-22 17:42:36 -07:00
Michael Davidsaver
df908f299b remove unused local 2023-10-22 17:42:36 -07:00
AlexWells
6dec68554c iocsh: Add underline separator between help outputs
Also tweaks the overall format of the message a bit.
Add tests for new help output format
2023-10-22 17:42:36 -07:00
Michael Davidsaver
badd8f518d update modules/pvData 2023-10-22 17:42:35 -07:00
Michael Davidsaver
766c9906b5 update ci-scripts 2023-10-22 14:46:28 -07:00
Jeremy Lorelli
60fa2d31da libCom: Fix buggy pointer dereference in postfix() 2023-09-26 09:52:13 -07:00
Michael Davidsaver
88ea1507f4 Fix compile w/ vs2012 2023-09-22 08:20:27 -07:00
Emilio Perez
8c08c57247 Allow adding error symbols after early initialization
This was acomplished by making errSymbolAdd add the error symbol directly
into the global hash table and removing errnumlist which is not needed
anymore.

Unit tests were added for checking the following cases:
- Adding a valid symbol and checking that it exists (fixed by this change)
- Getting an existing error symbol
- Getting a non existing error symbol
- Adding an invalid error symbol (fixed by this change)
- Adding an error symbol with a code that already
  exists (fixed by this change)

Therefore, issue #268 was fixed

error: statically allocate error symbol hash table

This will allow calling errSymbolAdd before errSymBld, therefore, a
function adding error symbols can now be run before iocInit or errlogInit

error: add a constant for the minimum module number

Make adding an identical error symbol not fail

A test case was also added which test that adding an error symbol
with same error code and message as one added before will not fail

Add locking to error symbol table

This protects the cases of:
- simultaneously adding and requesting of an error symbol
- simultaneously adding many error symbols

Update release notes regarding adding error symbols
2023-09-22 08:20:19 -07:00
Michael Davidsaver
45b3bce515 epicsThreadShow() zombies
Flag when the thread has returned, but the tracking
struct is still around.  eg. in need of joining.
2023-09-22 08:19:25 -07:00
Érico Nogueira
7c4a21eab4 libCom: detect support for backtrace() with __has_include.
This is necessary in order to build epics-base with musl libc, for
example, and any other C libraries which don't include this
functionality. In order to not regress builds with older compilers, we
still support the uclibc check. Furthermore, it has been checked that
uclibc-ng (the maintained version of uclibc) doesn't install the
<execinfo.h> header when the functionality is disabled [1] [2].

To avoid repetition, we don't define HAS_EXECINFO to 0 when it is not
available.

[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/Makefile.in?id=cdb07d2cd52af39feb425e6d36c02b30916b9f0a#n224
[2] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/Makefile.in?id=cdb07d2cd52af39feb425e6d36c02b30916b9f0a#n277
2023-09-21 08:18:49 -07:00
Michael Davidsaver
fab8fd7102 dbEvent: handle multiple db_event_cancel()
Allow for multiple db_event_cancel() (concurrent or
self-cancel) prior to event_task wakeup.

In db_event_cancel(), immediate free() only if idle
(not queued or in progress).  Otherwise, defer free()
to event task.  Avoids need to immediately expunge
canceled event from queue.  Allow event task to
process canceled events as normal (except no user_sub)
until npend==0.
2023-09-21 08:18:49 -07:00
Michael Davidsaver
3d25756065 privatize evSubscrip 2023-09-21 08:18:49 -07:00
Michael Davidsaver
5aca4c684c dbEvent minor 2023-09-14 08:54:40 +02:00
Michael Davidsaver
39b5c01c5d minor 2023-09-14 08:54:40 +02:00
Michael Davidsaver
3b22e5f710 doc dbLock.h 2023-09-14 08:54:40 +02:00
Michael Davidsaver
9f660f2238 add initHookAtPrepare 2023-09-05 08:54:48 +02:00
301 changed files with 3232 additions and 1645 deletions

2
.ci

Submodule .ci updated: 130e88b709...0e93b70855

14
.gitattributes vendored
View File

@@ -1,9 +1,11 @@
.ci/ export-ignore
.tools/ export-ignore
.github/ export-ignore
.appveyor/ export-ignore
.appveyor.yml export-ignore
README export-subst
.appveyor.yml export-ignore
.appveyor/ export-ignore
.ci/ export-ignore
.github/ export-ignore
.gitmodules export-ignore
.readthedocs.yml export-ignore
.tools/ export-ignore
README export-subst
#Which files need CRLF handling
# default to automatic

View File

@@ -8,6 +8,6 @@ jobs:
editorconfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: EditorConfig-Action
uses: greut/eclint-action@v0

View File

@@ -29,6 +29,7 @@ on:
- '.gitattributes'
- '**/*.html'
- '**/*.md'
workflow_dispatch:
env:
SETUP_PATH: .ci-local:.ci
@@ -59,7 +60,10 @@ jobs:
# Remove respective -Wno-error=... flag once it is fixed.
extra: "CMD_CXXFLAGS=-std=c++20
CMD_CPPFLAGS='-fdiagnostics-color
-fstack-protector-strong
-Wformat
-Werror
-Werror=format-security
-Wno-error=deprecated-declarations
-Wno-error=stringop-truncation
-Wno-error=restrict
@@ -67,8 +71,9 @@ jobs:
-Wno-error=nonnull
-Wno-error=dangling-pointer
-Wno-error=format-overflow
-Wno-error=format-security
-Wno-error=stringop-overread'"
-Wno-error=stringop-overread
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
CMD_LDFLAGS=-Wl,-z,relro"
- os: ubuntu-20.04
cmp: gcc
@@ -236,10 +241,10 @@ jobs:
matrix:
# Job names also name artifacts, character limitations apply
include:
- name: "CentOS-7"
image: centos:7
cmp: gcc
configuration: default
#- name: "CentOS-7"
# image: centos:7
# cmp: gcc
# configuration: default
- name: "Fedora-33"
image: fedora:33
@@ -283,6 +288,10 @@ jobs:
submodules: true
- name: Automatic core dumper analysis
uses: mdavidsaver/ci-core-dumper@master
if: matrix.image!='centos:7'
- name: Automatic core dumper analysis
uses: mdavidsaver/ci-core-dumper@node16
if: matrix.image=='centos:7'
- name: Prepare and compile dependencies
run: python .ci/cue.py prepare
- name: Build main module

2
.gitignore vendored
View File

@@ -20,3 +20,5 @@ O.*/
.iocsh_history
RPMS
SRPMS
BUILDROOT
*.rpm

View File

@@ -136,19 +136,20 @@ sed -i -e 's|^\./||' "$TDIR"/list.1
# Exclude files
sed \
-e '/\/\.ci\//d' \
-e '/\/\.appveyor\.yml$/d' \
-e '/\/\.appveyor\//d' \
-e '/\/\.ci-local\//d' \
-e '/\/\.tools\//d' \
-e '/\/jenkins\//d' \
-e '/\/\.ci\//d' \
-e '/\/\.cproject$/d' \
-e '/\/\.github\//d' \
-e '/\/\.gitmodules$/d' \
-e '/\/\.hgtags$/d' \
-e '/\/\.cproject$/d' \
-e '/\/\.project$/d' \
-e '/\/\.lgtm\.yml$/d' \
-e '/\/\.travis\.yml$/d' \
-e '/\/\.appveyor\.yml$/d' \
-e '/\/\.project$/d' \
-e '/\/\.readthedocs\.yml$/d' \
-e '/\/\.tools\//d' \
-e '/\/\.travis\.yml$/d' \
-e '/\/jenkins\//d' \
"$TDIR"/list.1 > "$TDIR"/list.2
if ! diff -U 0 "$TDIR"/list.1 "$TDIR"/list.2

View File

@@ -27,16 +27,16 @@ RANLIB = $(GNU_BIN)/$(CMPLR_PREFIX)ranlib$(CMPLR_SUFFIX)
ASAN_FLAGS_YES = -fsanitize=address
ASAN_LDFLAGS_YES = $(ASAN_FLAGS_YES)
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
PROF_CFLAGS_YES = -p
GPROF_CFLAGS_YES = -pg
CODE_CFLAGS = $(PROF_CFLAGS_$(PROFILE)) $(GPROF_CFLAGS_$(GPROF))
CODE_CFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
WARN_CFLAGS_YES = -Wall -Werror-implicit-function-declaration
WARN_CFLAGS_NO = -w
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES = -O3 -g
OPT_CFLAGS_NO = -g

View File

@@ -48,11 +48,11 @@ EPICS_VERSION = 7
EPICS_REVISION = 0
# EPICS_MODIFICATION must be a number >=0 and <256
EPICS_MODIFICATION = 7
EPICS_MODIFICATION = 8
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# Not included in the official EPICS version number if zero
EPICS_PATCH_LEVEL = 1
EPICS_PATCH_LEVEL = 2
# Immediately after an official release the EPICS_PATCH_LEVEL is incremented
# and the -DEV suffix is added (similar to the Maven -SNAPSHOT versions)

View File

@@ -2,7 +2,7 @@
EPICS_CA_MAJOR_VERSION = 4
EPICS_CA_MINOR_VERSION = 14
EPICS_CA_MAINTENANCE_VERSION = 3
EPICS_CA_MAINTENANCE_VERSION = 4
# Development flag, set to zero for release versions

View File

@@ -422,9 +422,9 @@ INSTALL_LIB_INSTALLS = $(addprefix $(INSTALL_LIB)/,$(notdir $(LIB_INSTALLS)))
#---------------------------------------------------------------
# Installed file permissions
BIN_PERMISSIONS = 555
LIB_PERMISSIONS = 444
SHRLIB_PERMISSIONS = 555
BIN_PERMISSIONS = 755
LIB_PERMISSIONS = 644
SHRLIB_PERMISSIONS = 755
INSTALL_PERMISSIONS = 444
#---------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
# Version number for the database APIs and shared library
EPICS_DATABASE_MAJOR_VERSION = 3
EPICS_DATABASE_MINOR_VERSION = 22
EPICS_DATABASE_MINOR_VERSION = 23
EPICS_DATABASE_MAINTENANCE_VERSION = 1
# Development flag, set to zero for release versions

View File

@@ -1,7 +1,7 @@
# Version number for the libcom APIs and shared library
EPICS_LIBCOM_MAJOR_VERSION = 3
EPICS_LIBCOM_MINOR_VERSION = 22
EPICS_LIBCOM_MINOR_VERSION = 23
EPICS_LIBCOM_MAINTENANCE_VERSION = 1
# Development flag, set to zero for release versions

View File

@@ -34,5 +34,9 @@ CFG += TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A)
include $(TOP)/configure/RULES
ifeq ($(GNU),YES)
# Pass compiler flags to preprocessor to enable _FORTIFY_SOURCE
TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A): CPPFLAGS += $(CFLAGS)
endif
TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A): toolchain.c
$(PREPROCESS.cpp)

View File

@@ -514,6 +514,13 @@ ifneq (,$(strip $(SHRLIB_VERSION)))
@$(RM) $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
ln -s $< $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
endif # SHRLIB_VERSION
else # SHRLIB_SUFFIX
ifeq ($(BUILD_CLASS),HOST)
ifneq (,$(strip $(SHRLIB_VERSION)))
@$(RM) $@.$(SHRLIB_VERSION)
ln -s $< $@.$(SHRLIB_VERSION)
endif # HOST
endif # SHRLIB_VERSION
endif # SHRLIB_SUFFIX
ifneq ($(INSTALL_TCLLIB),$(INSTALL_BIN))
@@ -545,11 +552,11 @@ endif # LOADABLE_SHRLIB_SUFFIX
ifneq ($(INSTALL_CONFIGS),)
$(INSTALL_CONFIG)/%: %
$(ECHO) "Installing config file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $(abspath $< $(@D))
$(INSTALL_CONFIG)/%: ../%
$(ECHO) "Installing config file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $(abspath $< $(@D))
endif
$(INSTALL_INCLUDE)/%: $(COMMON_DIR)/%

View File

@@ -1,6 +1,8 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
BUILD_CLASS = HOST
TOOLSET_LOCATION = /opt/rh
TOOLSET = devtoolset-12
STD_CXXFLAGS = -std=c++20

View File

@@ -1 +1,3 @@
include $(CONFIG)/os/CONFIG.Common.linux-clang
BUILD_CLASS = HOST

View File

@@ -1,6 +1,8 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
BUILD_CLASS = HOST
TOOLSET_LOCATION = /opt/rh
TOOLSET = gcc-toolset-12
STD_CXXFLAGS = -std=c++20

View File

@@ -1,3 +1,5 @@
include $(CONFIG)/os/CONFIG.Common.linux-clang
BUILD_CLASS = HOST
STD_CXXFLAGS = -std=c++2a

View File

@@ -1,6 +1,8 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
BUILD_CLASS = HOST
TOOLSET_LOCATION = /opt/rh
TOOLSET = gcc-toolset-12
STD_CXXFLAGS = -std=c++20

View File

@@ -1,3 +1,5 @@
include $(CONFIG)/os/CONFIG.Common.linux-clang
BUILD_CLASS = HOST
STD_CXXFLAGS = -std=c++2a

View File

@@ -8,7 +8,7 @@
#-------------------------------------------------------
# Unix valid build types
VALID_BUILDS = Host Ioc Command
VALID_BUILDS = $(if $(filter HOST,$(BUILD_CLASS)),Host) Ioc Command
#-------------------------------------------------------
# Unix prefix and suffix definitions

View File

@@ -1,3 +1,3 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc32
VXWORKS_VERSION = 6.9
#export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
#export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH:%=%:)$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib

View File

@@ -1,6 +1,6 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.9
#export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
#export LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH:%=%:)($(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
# -fno-implicit-fp causes error: "unable to find a register to spill in class 'FLOAT_REGS'"
ARCH_DEP_CFLAGS = -mcpu=604 -mstrict-align

View File

@@ -1,22 +1,16 @@
# Cross Debian 10 with gcc 8.3
# Debian 10
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
ARCH_CLASS = x86_64
LDLIBS_SHARED_YES=LDLIBS
SDK = gcc
SDK_DIR = /opt/xgcc/gcc-8.3.0-deb10
GNU_ARCH = x86_64-deb10-linux-gnu
SDKTARGETSYSROOT=$(SDK_DIR)/$(GNU_ARCH)/sys-root/
GNU_DIR = $(SDK_DIR)
GNU_BIN = $(GNU_DIR)/bin
GNU_TARGET_INCLUDE_DIR =
GNU_TARGET=x86_64-deb10-linux-gnu
ARCH_DEP_CPPFLAGS =
AS=$(GNU_BIN)/$(GNU_TARGET)-as
BUILD_CLASS = HOST
STD_CXXFLAGS = -std=c++17
ifneq ($(EPICS_HOST_ARCH),$(T_A))
# Cross compile
GNU_DIR = /opt/xgcc/gcc-8.3.0-deb10
GNU_TARGET = x86_64-deb10-linux-gnu
SYSROOT = $(GNU_DIR)/$(GNU_TARGET)/sys-root
CMPLR_PREFIX = $(GNU_TARGET)-
endif

View File

@@ -0,0 +1,17 @@
# Debian 12
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
BUILD_CLASS = HOST
STD_CXXFLAGS = -std=c++17
ifneq ($(EPICS_HOST_ARCH),$(T_A))
# Cross compile
GNU_DIR = /opt/xgcc/gcc-12.2.0-deb12
GNU_TARGET = x86_64-deb12-linux-gnu
SYSROOT = $(GNU_DIR)/$(GNU_TARGET)/sys-root
CMPLR_PREFIX = $(GNU_TARGET)-
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(SYSROOT)/lib/x86_64-linux-gnu
endif

View File

@@ -5,17 +5,10 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = ppc
SDK = gcc
SDK_DIR = /opt/xgcc/gcc-8.5.0
GNU_ARCH = powerpc-ppmac-linux-gnu
SDKTARGETSYSROOT=$(SDK_DIR)/$(GNU_ARCH)/sys-root/
GNU_DIR = $(SDK_DIR)
GNU_BIN = $(GNU_DIR)/bin/
GNU_TARGET_INCLUDE_DIR =
GNU_TARGET=powerpc-ppmac-linux-gnu
GNU_DIR = /opt/xgcc/gcc-8.5.0
GNU_TARGET = powerpc-ppmac-linux-gnu
ARCH_DEP_CPPFLAGS = -m32 -mcpu=440fp -mhard-float
ARCH_DEP_LDFLAGS+=-Wl,-rpath,/opt/xgcc/gcc-8.5.0/$(GNU_ARCH)/lib
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(SDKTARGETSYSROOT)/lib/powerpc-linux-gnu/
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(SDKTARGETSYSROOT)/usr/lib/powerpc-linux-gnu/
AS=$(GNU_BIN)/$(GNU_TARGET)-as
ARCH_DEP_CPPFLAGS = -m32 -mcpu=440fp -mhard-float
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(GNU_DIR)/$(GNU_TARGET)/sys-root/lib/powerpc-linux-gnu
STD_CXXFLAGS = -std=c++17

View File

@@ -42,12 +42,6 @@ ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
OP_SYS_CFLAGS += -isysroot $(SDK_DIR)
OP_SYS_LDFLAGS += -isysroot $(SDK_DIR)
#--------------------------------------------------
# Always compile in debugging symbol table information
#
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
#-------------------------------------------------------
# Compiler definitions:

View File

@@ -24,23 +24,17 @@ STATIC_LDFLAGS_NO=
STATIC_LDLIBS_YES= -Wl,-Bdynamic
# Set runtime path for shared libraries if LINKER_USE_RPATH=YES
SHRLIBDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%))
SHRLIBDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)) $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
SHRLIBDIR_RPATH_LDFLAGS_ORIGIN = $(shell $(MAKERPATH) -O '\$$ORIGIN' -F $(FINAL_DIR) -R $(LINKER_ORIGIN_ROOT) $(SHRLIB_DEPLIB_DIRS))
SHRLIBDIR_LDFLAGS += \
$(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Set runtime path for products if LINKER_USE_RPATH=YES
PRODDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%))
PRODDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)) $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
PRODDIR_RPATH_LDFLAGS_ORIGIN = $(shell $(MAKERPATH) -O '\$$ORIGIN' -F $(FINAL_DIR) -R $(LINKER_ORIGIN_ROOT) $(PROD_DEPLIB_DIRS))
PRODDIR_LDFLAGS += \
$(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
ifneq ($(LINKER_USE_RPATH:NO=),)
ifeq ($(T_A),$(EPICS_HOST_ARCH))
LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH:%=%:)$(INSTALL_LIB)
endif
endif
# Link libraries controlled by COMMANDLINE_LIBRARY
# The newest Linux versions only need readline, older ones need both
# readline and ncurses, and the oldest need readline and curses

View File

@@ -6,7 +6,6 @@ include $(CONFIG)/os/CONFIG.Common.linux-arm
GNU_DIR=/opt/moxa/arm-linux-4.4.2-v4
GNU_TARGET=arm
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(GNU_DIR)/arm-none-linux-gnueabi/lib
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(INSTALL_LIB)
COMMANDLINE_LIBRARY = READLINE_NCURSES

View File

@@ -10,7 +10,9 @@ GNU_TARGET = arm-linux-gnu
SYSROOT = /opt/LabVIEW-RT-19.5.1/arm/sysroots/armv7a-vfp-neon-nilrt-linux-gnueabi
GNU_BIN = /opt/RHEL7/bin
LD_LIBRARY_PATH=/usr/$$LIB:/opt/RHEL7/$$LIB
# Needed on RHEL9:
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)/usr/$$LIB:/opt/RHEL7/$$LIB
ARCH_DEP_CPPFLAGS += -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon
ARCH_DEP_CXXFLAGS += -I=/usr/include/c++/4.7.2/arm-nilrt-linux-gnueabi

View File

@@ -37,5 +37,8 @@ SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian-x64
# SDK_TARGET = arm-bcm2708hardfp-linux-gnueabi
# SDK_TARGET = arm-bcm2708-linux-gnueabi
# gcc 4.9.3 for 64 bit hosts
# arm-rpi-4.9.3-linux-gnueabihf
GNU_DIR = $(SDK_DIR)/$(SDK_TARGET)
GNU_TARGET = $(if $(filter arm-bcm2708%,SDK_TARGET),$(SDK_TARGET),arm-linux-gnueabihf)

View File

@@ -12,7 +12,10 @@ include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
SYSROOT = /opt/RHEL7
# "Cross" TOOLSET progs need to find their libraries
LD_LIBRARY_PATH = $(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB)
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)$(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB)
# The linker has problems to find indirectly referenced libraries
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(INSTALL_LIB)
# These programs have library problems when using them
# from SYSROOT but without TOOLSET.

View File

@@ -12,7 +12,7 @@ include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
SYSROOT = /opt/RHEL7
# "Cross" TOOLSET progs need to find their libraries
LD_LIBRARY_PATH = $(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB:)/usr/$$LIB:$(SYSROOT)/usr/$$LIB
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)$(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB:)/usr/$$LIB:$(SYSROOT)/usr/$$LIB
# The linker has problems to find indirectly referenced libraries
PROD_LDLIBS += $(LDLIBS)

View File

@@ -15,7 +15,6 @@ SYSROOT = /opt/RHEL8
# Thus only wrap the compiler.
WRAPPER = -wrapper env,LD_LIBRARY_PATH=$(TOOLSET_DIR:%=$(SYSROOT)%/usr/lib64:)/usr/lib64:$(SYSROOT)/usr/lib64
TARGET_CPPFLAGS += $(WRAPPER)
TARGET_PROD_LDFLAGS += $(WRAPPER)
# These programs as cross tools would also need LD_LIBRARY_PATH.
# But but our host versions work just fine.

View File

@@ -39,12 +39,6 @@ OP_SYS_CFLAGS += -fno-common
#
OP_SYS_CPPFLAGS += -Ddarwin
#
# Always compile in debugging symbol table information
#
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
#
# Libraries for command-line editing.
#

View 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

View File

@@ -0,0 +1,3 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
GNU_DIR=/usr

View 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

View File

@@ -0,0 +1,3 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
GNU_DIR=/usr

View File

@@ -0,0 +1,2 @@
# Debian 10
COMMANDLINE_LIBRARY=READLINE

View File

@@ -18,6 +18,8 @@ GNU_DIR = $(SYSROOT)$(TOOLSET_DIR)
TARGET_CPPFLAGS += $(SYSROOT:%=--sysroot=%)
TARGET_LDFLAGS += $(SYSROOT:%=--sysroot=%)
ifeq ($(filter SL% RHEL%,$(T_A)),)
VALID_BUILDS = Ioc Command
endif
# backward compatibility: Keep unversioned libs
# in order to prevent dynamic linking problems
# when minor changes increment *_MAINTENANCE_VERSION
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)

View File

@@ -92,6 +92,9 @@ WIND_BASE = /opt/VxWorks/VxWorks$(VXWORKS_VERSION)
#--------------------------------------------------
# Modules we cannot build with old compiler
# For the license counter
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
PV_MODULES = pv% normativeTypes
SKIP_BUILDS_5 = $(PV_MODULES)
SKIP_BUILDS_OLD = $(PV_MODULES)

View File

@@ -0,0 +1,5 @@
# Make sure hosts tools find their libraries during build
# even if FINAL_LOCATION differs from INSTALL_LOCATION
ifneq ($(FINAL_LOCATION:$(INSTALL_LOCATION)=),)
export LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH:%=%:)$(INSTALL_HOST_LIB)
endif

View File

@@ -6,11 +6,3 @@
# GNU_DIR used when COMMANDLINE_LIBRARY is READLINE
#GNU_DIR=C:/cygwin
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g

View File

@@ -3,10 +3,3 @@
# Site specific definitions for native linux-aarch64 builds
#-------------------------------------------------------
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g

View File

@@ -11,10 +11,6 @@ INSTALL_LOCATION=/usr/local/epics/base-$(EPICS_VERSION).$(EPICS_REVISION).$(EPIC
GNU_HOST_ARCH=i686
GNU_HOST_OS=linux
# set LD_LIBRARY_PATH may cause problems for eldk53-ppc4xxFP
# not exported LD_LIBRARY_PATH causes problem for RHEL7 cross compilation
export LD_LIBRARY_PATH=
# vxWorks for MVxxxx boards
#CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
#CROSS_COMPILER_TARGET_ARCHS += V67-ppc604

View File

@@ -4,5 +4,5 @@
#-------------------------------------------------------
# Needed by gcc
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(RTEMS_BASE)/lib
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH:%=%:)$(RTEMS_BASE)/lib

View File

@@ -21,8 +21,9 @@ CROSS_COMPILER_TARGET_ARCHS += windows-x64
#CROSS_COMPILER_TARGET_ARCHS += yocto21-aarch64
CROSS_COMPILER_TARGET_ARCHS += yocto40-aarch64
# Debian 10
# Debian
CROSS_COMPILER_TARGET_ARCHS += deb10-x86_64
CROSS_COMPILER_TARGET_ARCHS += deb12-x86_64
# Newer DeltaTau PowerPMAC
CROSS_COMPILER_TARGET_ARCHS += gcc8-ppc4xxFP

View File

@@ -47,3 +47,8 @@ COMMANDLINE_LIBRARY ?= EPICS
#else
COMMANDLINE_LIBRARY ?= $(strip $(if $(wildcard $(if $(GNU_DIR),$(GNU_DIR)/include/readline/readline.h)), READLINE, EPICS))
#endif
#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE>2
OP_SYS_CPPFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
#endif

View File

@@ -20,7 +20,139 @@ should also be read to understand what has changed since earlier releases:
**This version of EPICS has not been released yet.**
## Changes made on the 7.0 branch since 7.0.7
## Changes made on the 7.0 branch since 7.0.8.1
### DBE_PROPERTY event rate changed
Updating property fields now only post DBE_PROPERTY events if the
field actually changed.
### Allow to load the same alias multiple times
Aliases can now be defined multiple times as long as they still refer to the
same record, unless the shell variable dbRecordsOnceOnly is set.
This allows to load database files multiple times, even if they contain
alias definitions.
### Allow users to delete previously created records from the database
From this release, record instances and aliases that have already been loaded
by an IOC can be removed from the database again before the call to iocInit
by loading a second instance of the named records but using `"#"` in place of
the record type. Values for the fields are not required or advised, just use
an empty record body { }. This is useful when a template defines records that
are not wanted in some IOCs, without having to split or duplicate the original
template.
For example this will remove the record named "unwanted":
```
record("#", "unwanted") { }
```
-----
## EPICS Release 7.0.8.1
### Limit to `_FORTIFY_SOURCE=2`
GCC versions 12 and beyond and glibc have added some aggressive runtime
checks for buffer overflows in libc functions at runtime, and the
[Ubuntu 2024.04](https://wiki.ubuntu.com/ToolChain/CompilerFlags) release
increased their default gcc fortification level from 2 to 3.
This has started causing EPICS Base builds to fail on that version, and
other OS releases may make that configuration change with similar results.
This release detects a compiler configured with `_FORTIFY_SOURCE=3` and
overrides it to 2.
Later releases of Base will adjust the code, providing information to the
compiler to avoid triggering these incorrect protections.
### Fix issue with compress record
In Base 7.0.8, an update to the compress record was added to allow for certain
algorithms to use partially filled buffers in their computations. Unfortunately,
this broke the behaviour of the records in certain cases. This has been fixed.
### Various minor changes
These included fixing minor memory leaks and documentation corrections. The
`SIZV` field of lsi, lso and printf record VAL fields now can't exceed 32767
characters, to match an internal limit.
### `epicsSocketAccept()` now returns `SOCKET`, not `int`
This might have some effect on downstream modules still using `int`, but the
OS-specific osdSock.h headers which osiSock.h includes have all declared
`SOCKET` (in most casese as a typedef for `int`) for many releases.
This change removes a compiler warning on WIN32.
Further details and the discussion about this change can be found
[here](https://github.com/epics-base/epics-base/pull/458).
### `dbLoadRecords` allows macros with default values
Previously the parser assumed that files containing macro substitutions were
bad if no macro definitions were provided; that assumption was made incorrect
once macro substitutions were allowed to provide a default value.
### Hostname length limit in CA removed
Before this release, the CA client library only handled hostnames in address
list environment variables up to 255 characters long.
This limit has been removed.
-----
## EPICS Release 7.0.8
### bi "Raw Soft Channel" use MASK
If MASK is non-zero, The raw device support will now apply MASK to the
value read into RVAL.
eg. allows extraction of a bit from an input integer.
```
record(longin, "integer") {
field(VAL, "0xff")
}
record(bi, "bit1") {
field(DESC, "extract bit 1")
field(DTYP, "Raw Soft Channel")
field(INP , "integer")
field(MASK, "0x2")
field(ZNAM, "Clear")
field(ONAM, "Set")
}
```
### ANSI escapes in stderr
ANSI escape charactor sequences may now be printed to the stderr stream.
These escapes will appear in logs captured from that stream.
Tools which parse and/or render these logs may need to be adjusted to
either strip out the escapes, or to translate them into markup.
(see [ansi2html](https://pypi.org/project/ansi2html/) for example)
### Allow explicit append with `dbRecordsOnceOnly!=0`
Previously setting `dbRecordsOnceOnly!=0` prevented any further changes to a record via a .db file. eg.
```
record(ai, "myrec") {}
```
`dbRecordsOnceOnly!=0` previously disallowed appending fields with either form:
```
record("*", "myrec") {} # error
record(ai, "myrec") {} # error
```
Beginning with this release, `dbRecordsOnceOnly!=0` allows appending when explicitly intended (when record type is `"*"`).
```
record("*", "myrec") {} # allowed
record(ai, "myrec") {} # error
```
### PROC field changed to ASL0

View File

@@ -48,14 +48,14 @@ everything that has to be done since it's so easy to miss steps.</p>
<p>The following roles are used below:</p>
<dl>
<dt><strong>Release Manager</strong> ()</dt>
<dt><strong>Release Manager</strong></dt>
<dd>Responsible for managing and tagging the release</dd>
<dt><strong>Platform Developers</strong> (informal)</dt>
<dd>Responsible for individual operating system platforms</dd>
<dt><strong>Core Developers</strong></dt>
<dd>Responsible for maintaining the EPICS software</dd>
<dt><strong>Application Developers</strong></dt>
<dd>Responsible for support modules that depend on EPICS Base.</dd>
<dt><strong>APS Website Editor</strong> (Andrew Johnson)</dt>
<dd>Responsible for the APS EPICS website</dd>
<dt><strong>Website Editors</strong></dt>
<dd>Responsible for the EPICS websites</dd>
</dl>
<form>
@@ -72,23 +72,22 @@ everything that has to be done since it's so easy to miss steps.</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Email all developers about the upcoming release and ask for a list
of remaining tasks that must be finished.</td>
<td>Notify core developers about the upcoming release and ask about any
remaining tasks that must be finished.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>All developers</td>
<td>Check the bug tracker for any outstanding items and handle
appropriately. All bugs that have been fixed should have been marked
as Fix Committed.</td>
appropriately.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Set the Feature Freeze date, by which time all Git commits for
enhancements and new functionality should have been completed. After
this date, commits should only be made to fix problems that show up
during testing.</td>
<td>Set a Feature Freeze date, by which time all Git branches for
enhancements and new functionality should have been merged. After this
date, commits and merges should only be made to fix problems that show
up during testing.</td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -97,6 +96,7 @@ everything that has to be done since it's so easy to miss steps.</p>
<td>Ensure that documentation will be updated before the release date:
<ul>
<li>Release Notes</li>
<li>Doxygen annotations</li>
<li>Other documents</li>
</ul>
</td>
@@ -104,13 +104,8 @@ everything that has to be done since it's so easy to miss steps.</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Review and update this checklist for the upcoming release.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Create a release milestone on Launchpad. If a target release date is
known set "Date Targeted" to the expected release date.</td>
<td>Review and update this checklist for the upcoming release.
Update the release version number in the tags and messages below.</td>
</tr>
<tr>
<th colspan="3">Testing</th>
@@ -118,7 +113,7 @@ everything that has to be done since it's so easy to miss steps.</p>
<tr>
<td>&nbsp;</td>
<td>Platform Developers</td>
<td>Run the built-in test programs on all available host platforms using
<td>Run the internal test programs on all available host platforms using
<blockquote><tt>
make -s runtests
</tt></blockquote></td>
@@ -156,6 +151,7 @@ everything that has to be done since it's so easy to miss steps.</p>
<td>Check that documentation has been updated:
<ul>
<li>Release Notes</li>
<li>Doxygen annotations</li>
<li>Other documents</li>
</ul>
</td>
@@ -167,8 +163,8 @@ everything that has to be done since it's so easy to miss steps.</p>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>Release Manager</td>
<td>Obtain a positive <q>Ok to release</q> from developers.</td>
<td>Core Developers</td>
<td>Reach a consensus that the software is ready to release.</td>
</tr>
<tr>
<th colspan="3">Creating the final release version</th>
@@ -183,35 +179,56 @@ everything that has to be done since it's so easy to miss steps.</p>
<li><tt>git grep UNRELEASED</tt> and insert the module version to any
doxygen annotations that have a <tt>@since UNRELEASED</tt> comment.
Commit (don't push yet).</li>
<li>Check that the module's Release Notes have been updated to cover
all changes; add items as necessary, and set the module version
number and release date if appropriate. Convert to HTML and view in
a browser to check the formatting:
<blockquote><tt>
cd base-7.0/modules/&lt;module&gt;/documentation<br />
pandoc -f gfm -t html -o RELEASE_NOTES.html RELEASE_NOTES.md
</tt></blockquote>
Commit changes (don't push).</li>
number and release date if appropriate.
Commit these changes (don't push).</li>
<li>Edit the module's release version file
<tt>configure/CONFIG_<i>module</i>_VERSION</tt> and its top-level
<tt>Doxyfile</tt>; set the <tt>DEVELOPMENT_FLAG</tt> value to 0 and
remove <tt>-dev</tt> from the <tt>PROJECT_NUMBER</tt> string.
Commit changes (don't push).</li>
<li>Tag the module:
<tt>configure/CONFIG_<i>module</i>_VERSION</tt> and the
<tt>Doxyfile</tt>s in the top-level and/or documentation
directories. In these, set <tt>DEVELOPMENT_FLAG</tt> to 0 and remove
<tt>-dev</tt> from the <tt>PROJECT_NUMBER</tt> string. Commit these
changes (don't push):
<blockquote><tt>
git tag -m 'ANJ: Tag for EPICS 7.0.7' &lt;module-version&gt;
git ci -m 'Final commit for &lt;module-version&gt;'
</tt></blockquote>
</li>
<li>Tag the module:
<blockquote><tt>
git tag -m 'ANJ: Tag for EPICS 7.0.8.2' &lt;module-version&gt;
</tt></blockquote>
</li>
<li>Generate documentation or Release Notes using one of these:
<ul>
<li>For older modules with a RELEASE_NOTES.md file convert it to
HTML and view in a browser to check the formatting as follows:
<blockquote><tt>
cd base-7.0/modules/&lt;module&gt;/documentation<br />
pandoc -f gfm -t html -o RELEASE_NOTES.html RELEASE_NOTES.md
</tt></blockquote>
<li>For newer modules with release_notes.dox file, generate the
new github-pages website as follows:
<blockquote><tt>
cd base-7.0/modules/&lt;module&gt;/documentation<br />
make commit
git push --force upstream gh-pages
</tt></blockquote>
<i>Q: Delay this <tt>git push</tt> until later?</i></li>
</ul></li>
<li>Update the git submodule on the Base-7.0 branch to the
newly-tagged version, but don't commit yet:
newly-tagged version, check the module's status matches the tag:
<blockquote><tt>
cd base-7.0/modules<br />
git add &lt;module&gt;<br />
git submodule status --cached
</tt></blockquote>
Don't commit the submodule updates yet.
</li>
<li>Edit the module's release version file
@@ -221,7 +238,8 @@ everything that has to be done since it's so easy to miss steps.</p>
<tt>PROJECT_NUMBER</tt> string, appending <tt>-dev</tt> to the new
module version number. Commit changes.</li>
<li>Push commits and the new tag to the submodule's GitHub repository:
<li>Push commits and the new tag to the submodule's GitHub repository
(assumed to be the <tt>upstream</tt> remote):
<blockquote><tt>
cd base-7.0/modules/&lt;module&gt;<br />
git push --follow-tags upstream master
@@ -270,10 +288,9 @@ everything that has to be done since it's so easy to miss steps.</p>
<td>Tag the epics-base module in Git:
<blockquote><tt>
cd base-7.0<br />
git tag -m 'ANJ: Tagged for release' R7.0.7
git tag -m 'ANJ: Tagged for release' R7.0.8.2
</tt></blockquote>
<p>Don't push anything to the Launchpad repository
yet.</p>
<p>Don't push to GitHub yet.</p>
</td>
</tr>
<tr>
@@ -305,12 +322,12 @@ everything that has to be done since it's so easy to miss steps.</p>
files and directories that are only used for continuous integration:
<blockquote><tt>
cd base-7.0<br />
./.tools/make-tar.sh R7.0.7 ../base-7.0.7.tar.gz base-7.0.7/
./.tools/make-tar.sh R7.0.8.2 ../base-7.0.8.2.tar.gz base-7.0.8.2/
</tt></blockquote>
Create a GPG signature file of the tarfile as follows:
<blockquote><tt>
cd ..<br />
gpg --armor --sign --detach-sig base-7.0.7.tar.gz
gpg --armor --sign --detach-sig base-7.0.8.2.tar.gz
</tt></blockquote>
</td>
</tr>
@@ -318,8 +335,9 @@ everything that has to be done since it's so easy to miss steps.</p>
<td><input type="checkbox"></td>
<td>Release Manager</td>
<td>Test the tar file by extracting its contents and building it on at
least one supported platform. When this succeeds the commits and new git
tag can be pushed to the Launchpad repository:
least one supported platform. If this succeeds the commits and new git
tag can be pushed to the GitHub repository's 7.0 branch (assumed to be
the <tt>upstream</tt> remote):
<blockquote><tt>
git push --follow-tags upstream 7.0
</tt></blockquote>
@@ -367,7 +385,7 @@ everything that has to be done since it's so easy to miss steps.</p>
</tr>
<tr>
<th colspan="3">Publish to epics-controls</th>
<th colspan="3">Publish to epics-controls.org</th>
</tr>
<tr>
<td><input type="checkbox"></td>
@@ -375,7 +393,7 @@ everything that has to be done since it's so easy to miss steps.</p>
<td>Upload the tar file and its <tt>.asc</tt> signature file to the
epics-controls web-server.
<blockquote><tt>
scp base-7.0.7.tar.gz base-7.0.7.tar.gz.asc epics-controls:download/base<br />
scp base-7.0.8.2.tar.gz base-7.0.8.2.tar.gz.asc epics-controls:download/base<br />
</tt></blockquote>
</td>
</tr>
@@ -392,22 +410,22 @@ everything that has to be done since it's so easy to miss steps.</p>
</tr>
<tr>
<th colspan="3">Publish to Launchpad</th>
<th colspan="3">Publish to GitHub</th>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>Release Manager</td>
<td>Go to the Launchpad milestone for this release. Click the Create
release button and add the release date. Put a URL for the release page
in the Release notes box, and click the Create release button. Upload
the tar file and its <tt>.asc</tt> signature file to the new Launchpad
release page.</td>
<td>Go to the GitHub
<a href="https://github.com/epics-base/epics-base/releases/new?tag=R7.0.8.2">
Create release from tag R7.0.8.2</a> page.
Upload the tar file and its <tt>.asc</tt> signature file to the new
GitHub release page.</td>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>Release Manager</td>
<td>Find all Launchpad bug reports with the status Fix Committed which
have been fixed in this release and mark them Fix Released.</td>
<td>We used to close out bug reports in Launchpad at release-time, this
would be the time to do that if we have an equivalent on GitHub.</td>
</tr>
<tr>

View File

@@ -1,8 +1,6 @@
_OLD_EXTGLOB=$(shopt -p extglob)
shopt -s extglob
test -n "$EPICS_BASE" || export EPICS_BASE=$(ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/ | head -n1)
test -n "$EPICS_HOST_ARCH" || export EPICS_HOST_ARCH=$(/bin/sed "s%cpe:/o:redhat:enterprise_linux:\([0-9]*\).*%RHEL\1-`/bin/uname -m`%" /etc/system-release-cpe)
PATH=${PATH//\/usr\/local\/epics\/base-+([0-9]).+([0-9]).+([0-9])\/bin\/$EPICS_HOST_ARCH}:$(echo $(ls -dvr /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/$EPICS_HOST_ARCH) | tr ' ' :)
PATH=${PATH//?(:)\/usr\/local\/epics\/base-+([0-9]).+([0-9]).+([0-9])\/bin\/$EPICS_HOST_ARCH}:$EPICS_BASE/bin/$EPICS_HOST_ARCH
eval $_OLD_EXTGLOB
unset _OLD_EXTGLOB

View File

@@ -1,19 +1,22 @@
# Always make sure EpicsVersion.Version-Release matches the git tag!
%define EpicsVersion 7.0.7
%define EpicsVersion 7.0.8
Name: epics-base-%{EpicsVersion}
Summary: EPICS Base %{EpicsVersion}
Version: 1
Release: 3%{?dist}
Version: 2
Release: 2%{?dist}
License: EPICS Open License
Group: Development/Languages
URL: https://git.psi.ch/epics_base/base-7.0
Obsoletes: caRepeater = 1
%define module_name %{name}
%define prog_folder /usr/local/epics/base-%{EpicsVersion}
%define debug_package %{nil}
%define _build_id_links none
# do not strip libraries
%global __strip /bin/true
@@ -26,6 +29,7 @@ URL: https://git.psi.ch/epics_base/base-7.0
%if %{defined rhel}
%global epics_host_arch RHEL%{rhel}-%{_host_cpu}
%endif
# else define epics_host_arch as suitable
%description
EPICS is a set of Open Source software tools, libraries and applications
@@ -39,6 +43,12 @@ This RPM is a binary-only package.
%package host-devel
Requires: make >= 3.80
BuildRequires: make >= 3.80
BuildRequires: gfa-cross-compiler-links
%if %{?rhel} >= 9
BuildRequires: gfa-wine
%else
BuildRequires: wine
%endif
Summary: Minimal stuff needed to build EPICS host apps
Requires: %{name} = %{version}-%{release}
@@ -73,11 +83,9 @@ Requires: perl-File-Find perl-File-Basename perl-File-Copy perl-FindBin pe
BuildRequires: perl-File-Find perl-File-Basename perl-File-Copy perl-FindBin perl-Getopt-Std perl-POSIX
%endif
%if 0%{?rhel} == 7
# Perl auto-detection is broken
# It does not find all EPICS internal packages
%global __requires_exclude_from ^%{prog_folder}/bin/.*\\.pl$
%endif
%description host-devel
Contains headers etc to build EPICS host applications.
@@ -97,8 +105,11 @@ Contains EPICS binaries that run on other RHEL versions.
%package wine
Summary: EPICS base %{EpicsVersion} for wine
Requires: %{name} = %{version}-%{release}
%if %{?rhel} >= 9
Requires: gfa-wine
%else
Requires: wine
BuildRequires: wine
%endif
%description wine
Allows to run EPICS in wine.
@@ -121,7 +132,6 @@ This package can be relocated.
Summary: EPICS base %{EpicsVersion} for development environments
Requires: %{name} = %{version}-%{release}
Requires: %{name}-host-devel = %{version}-%{release}
Requires: %{name}-boot = %{version}-%{release}
Requires: gfa-cross-compiler-links
BuildArch: noarch
AutoReqProv: no
@@ -168,7 +178,7 @@ The documentation of EPICS base %{EpicsVersion}.
# Our sources are locally in this directory
# and here we also build
# RPMS and SRPMS will be stored here, too
# RPMS will be stored here, too
%define _topdir %(pwd)
%define _sourcedir %{_topdir}
%define _builddir %{_topdir}
@@ -176,72 +186,83 @@ The documentation of EPICS base %{EpicsVersion}.
%prep
%{__rm} -rf %{buildroot}/usr/lib
%{__rm} -f modules/RELEASE.*.local
git submodule update --init modules
git submodule update --init --recursive modules
%{__mkdir_p} RPMS
%build
%if %{defined epics_host_arch}
export EPICS_HOST_ARCH=%{epics_host_arch}
%endif
%{__make} -j $RPM_BUILD_NCPUS INSTALL_LOCATION=%{buildroot}/%{prog_folder} FINAL_LOCATION=%{prog_folder}
%{__make} INSTALL_LOCATION=%{buildroot}/%{prog_folder} copysrc
%{__make} INSTALL_LOCATION=%{buildroot}%{prog_folder} FINAL_LOCATION=%{prog_folder}
%{__make} INSTALL_LOCATION=%{buildroot}%{prog_folder} copysrc
# remove files we do not need
shopt -s extglob
%{__rm} -f %{buildroot}/%{prog_folder}/bin/{V,RTEMS}*/{*Harness,softIoc,softIocPVA}
%{__rm} -f %{buildroot}/%{prog_folder}/bin/RTEMS*/TEMP.*
%{__rm} -f %{buildroot}%{prog_folder}/bin/{V,RTEMS}*/{*Harness,softIoc,softIocPVA}
%{__rm} -f %{buildroot}%{prog_folder}/bin/RTEMS*/TEMP.*
# fix permissions of caRepeater.service
%{__chmod} 644 %{buildroot}%{prog_folder}/bin/*/caRepeater.service
# install the profile script
%{__install} epics-base.sh %{buildroot}/%{prog_folder}/bin
/bin/sed 's!\$EPICS_BASE!%{prog_folder}!' epics-base.sh > %{buildroot}%{prog_folder}/bin/epics-base.sh
# copy over old libraries for compatibility
%if %{?rhel} > 7
%{__cp} /opt/RHEL7/lib64/libreadline.so.6 %{buildroot}%{prog_folder}/lib/RHEL7-x86_64
%endif
%if %{?rhel} > 8
%{__cp} /opt/RHEL7/lib64/libtinfo.so.5 %{buildroot}%{prog_folder}/lib/RHEL7-x86_64
%{__cp} /opt/RHEL8/lib64/libreadline.so.7 %{buildroot}%{prog_folder}/lib/RHEL8-x86_64
%endif
# Do not use install section because build already installed
# and install will delete our buildroot!
%clean
%{__make} realclean
%{__make} INSTALL_LOCATION=%{buildroot}%{prog_folder} realclean
%{__rm} -f modules/RELEASE.*.local
%{__rm} -rf %{buildroot}
%{__cp} %{_rpmdir}/*/%{name}*%{version}-%{release}.*.rpm %{_sourcedir}
# Link caRepeater and profile script to highest installed EPICS version after install and uninstall
%post
shopt -s extglob
if [ -e /etc/profile.d/epics-base.sh ]
then
%{__rm} -f /etc/profile.d/epics-base.sh
fi
%{__rm} -f /etc/profile.d/epics-base.sh
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/epics-base.sh | /usr/bin/head -n1)" /etc/profile.d/
SYSTEMD_DIR=$(pkg-config systemd --variable=systemdsystemunitdir)
if [ -n "$SYSTEMD_DIR" ]
then
systemctl is-enabled caRepeater.service 2>/dev/null && systemctl disable --now caRepeater.service
test -e $SYSTEMD_DIR/caRepeater.service && %{__rm} $SYSTEMD_DIR/caRepeater.service
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service | /usr/bin/head -n1)" $SYSTEMD_DIR/
%{__rm} -f $SYSTEMD_DIR/caRepeater.service
LATEST_REPEATER=$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service | /usr/bin/head -n1)
%{__ln_s} $LATEST_REPEATER $SYSTEMD_DIR/
systemctl daemon-reload
killall caRepeater 2>/dev/null
systemctl enable --now caRepeater.service
systemctl reenable caRepeater.service
systemctl start caRepeater.service
fi
%postun
shopt -s extglob
if [ -e /etc/profile.d/epics-base.sh ]
then
%{__rm} -f /etc/profile.d/epics-base.sh
fi
%{__rm} -f /etc/profile.d/epics-base.sh
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/epics-base.sh 2>/dev/null | /usr/bin/head -n1)" /etc/profile.d/ 2>/dev/null
SYSTEMD_DIR=$(pkg-config systemd --variable=systemdsystemunitdir)
if [ -n "$SYSTEMD_DIR" ]
then
systemctl disable --now caRepeater.service
%{__rm} -f $SYSTEMD_DIR/caRepeater.service
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service 2>/dev/null | /usr/bin/head -n1)" $SYSTEMD_DIR/ 2>/dev/null
systemctl daemon-reload
if [ -e $SYSTEMD_DIR/caRepeater.service ]
LATEST_REPEATER=$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service 2>/dev/null | /usr/bin/head -n1)
if [ -z "$LATEST_REPEATER" ]
then
killall caRepeater 2>/dev/null
systemctl enable --now caRepeater.service
systemctl disable caRepeater.service
# Do not stop or restart caRepeater.service
# because EPICS clients cannot handle that.
# Next reboot will take care of this.
fi
%{__rm} -f $SYSTEMD_DIR/caRepeater.service
if [ -n "$LATEST_REPEATER" ]
then
%{__ln_s} $LATEST_REPEATER $SYSTEMD_DIR/ 2>/dev/null
systemctl reenable caRepeater.service
fi
systemctl daemon-reload
fi
%files
@@ -258,36 +279,49 @@ fi
%{prog_folder}/db
%{prog_folder}/bin/epics-base.sh
%{prog_folder}/lib/perl/EpicsHostArch.pl
%{prog_folder}/lib/perl/CA.pm
%dir %{prog_folder}/lib/perl
%dir %{prog_folder}/lib/perl/*
%dir %{prog_folder}/lib/perl/*/*-linux-thread-multi
%{prog_folder}/lib/perl/*/*-linux-thread-multi/libCap5.so
# Install host binaries but avoid installing *.pl scripts
# and other development tools
%if %{defined rhel}
%dir %{prog_folder}/bin/RHEL%{rhel}*
%{prog_folder}/bin/RHEL%{rhel}*/[Scips]*[^.]??
%{prog_folder}/bin/RHEL%{rhel}*/p2p
%{prog_folder}/bin/RHEL%{rhel}*/msi
%dir %{prog_folder}/lib/RHEL%{rhel}*
%{prog_folder}/lib/RHEL%{rhel}*/*.so*
%endif
%dir %{prog_folder}/bin/%{epics_host_arch}*
%{prog_folder}/bin/%{epics_host_arch}*/[Scips]*[^.]??
%{prog_folder}/bin/%{epics_host_arch}*/p2p
%{prog_folder}/bin/%{epics_host_arch}*/msi
%dir %{prog_folder}/lib/%{epics_host_arch}*
%{prog_folder}/lib/%{epics_host_arch}*/*.so*
###########################################
%files compat
%if %{?rhel} > 7
%{prog_folder}/bin/RHEL7*
%dir %{prog_folder}/bin/RHEL7*
%{prog_folder}/bin/RHEL7*/[Scips]*[^.]??
%{prog_folder}/bin/RHEL7*/p2p
%{prog_folder}/bin/RHEL7*/msi
%dir %{prog_folder}/lib/RHEL7*
%{prog_folder}/lib/RHEL7*/*.so*
%endif
%if %{?rhel} > 8
%{prog_folder}/bin/RHEL8*
%dir %{prog_folder}/bin/RHEL8*
%{prog_folder}/bin/RHEL8*/[Scips]*[^.]??
%{prog_folder}/bin/RHEL8*/p2p
%{prog_folder}/bin/RHEL8*/msi
%dir %{prog_folder}/lib/RHEL8*
%{prog_folder}/lib/RHEL8*/*.so*
%endif
%if %{?rhel} > 9
%{prog_folder}/bin/RHEL9*
%dir %{prog_folder}/bin/RHEL9*
%{prog_folder}/bin/RHEL9*/[Scips]*[^.]??
%{prog_folder}/bin/RHEL9*/p2p
%{prog_folder}/bin/RHEL9*/msi
%dir %{prog_folder}/lib/RHEL9*
%{prog_folder}/lib/RHEL9*/*.so*
%endif
@@ -300,18 +334,52 @@ fi
###########################################
%files boot
# including files to build on some Linux cross archs
# hence some configure/* and lib/perl/* listed twice
%defattr(-,root,root,-)
%dir %{prog_folder}
%dir %{prog_folder}/configure
%{prog_folder}/configure/CONFIG_BASE_VERSION
%{prog_folder}/configure/RELEASE
%{prog_folder}/configure/CONFIG*
%{prog_folder}/configure/RULES*
%dir %{prog_folder}/configure/os
%{prog_folder}/configure/os/CONFIG.Common.UnixCommon
%{prog_folder}/configure/os/CONFIG.Common.linuxCommon
%{prog_folder}/configure/os/CONFIG.Common.linux-clang
%{prog_folder}/configure/os/CONFIG.Common.linux-%{_host_cpu}*
%{prog_folder}/configure/os/CONFIG.Common.[a-z]*-*
%{prog_folder}/configure/os/CONFIG.UnixCommon.Common
%{prog_folder}/configure/os/CONFIG.[a-z]*-*.Common
%{prog_folder}/configure/os/CONFIG.[a-z]*-*.[a-z]*-*
%{prog_folder}/configure/os/CONFIG.linux-*.Common
%{prog_folder}/configure/os/CONFIG.linux-*.linux-*
%{prog_folder}/configure/os/CONFIG_SITE.Common.linuxCommon
%{prog_folder}/configure/os/CONFIG_SITE.Common.linux-*
%{prog_folder}/configure/os/CONFIG_SITE.[a-z]*-*.Common
%{prog_folder}/configure/os/CONFIG_SITE.linux-*.Common
%{prog_folder}/configure/os/CONFIG_SITE.linux-*.UnixCommon
%{prog_folder}/configure/os/CONFIG_SITE.linux-*.linux-*
%dir %{prog_folder}/include
%{prog_folder}/include/*.h
%{prog_folder}/include/compiler
%dir %{prog_folder}/include/os
%{prog_folder}/include/os/Linux/
%{prog_folder}/include/pv/
%{prog_folder}/include/pva/
%{prog_folder}/include/valgrind/
%{prog_folder}/include/flex.skel.static
%dir %{prog_folder}/dbd
%{prog_folder}/dbd/softIoc*.dbd
%{prog_folder}/db
%dir %{prog_folder}/lib
# avoid pulling in pkgconfig and perl
%dir %{prog_folder}/lib/[a-z]*-*
%{prog_folder}/lib/[a-z]*-*/*.so*
%dir %{prog_folder}/lib/perl
%{prog_folder}/lib/perl/EPICS
%{prog_folder}/lib/perl/DBD*
%dir %{prog_folder}/bin
# avoid pulling in host files again
@@ -319,8 +387,11 @@ fi
# including all Windows dlls (hence listed twice: here and in wine)
%dir %{prog_folder}/bin/[a-z]*
%{prog_folder}/bin/[a-z]*/[Scips]*[^.]??
%{prog_folder}/bin/[a-z]*/p2p
%{prog_folder}/bin/[a-z]*/msi*
%{prog_folder}/bin/[a-z]*/acctst*
%{prog_folder}/bin/[a-z]*/*.dll
%{prog_folder}/bin/[a-z]*/registerRecordDeviceDriver*
# vxWorks and RTEMS
%dir %{prog_folder}/bin/V*
@@ -333,29 +404,95 @@ fi
%files host-devel
%defattr(-,root,root,-)
%{prog_folder}/configure
%{prog_folder}/cfg
%{prog_folder}/include
%dir %{prog_folder}/include
%{prog_folder}/include/*.h
%{prog_folder}/include/compiler
%dir %{prog_folder}/include/os
%{prog_folder}/include/os/Linux/
%{prog_folder}/include/os/WIN32/
%{prog_folder}/include/pv/
%{prog_folder}/include/pva/
%{prog_folder}/include/valgrind/
%{prog_folder}/include/flex.skel.static
%{prog_folder}/templates
%if %{defined rhel}
%{prog_folder}/bin/RHEL%{rhel}*/[^Scips]*[^.]??
%{prog_folder}/bin/RHEL%{rhel}*/*.??
%endif
%{prog_folder}/lib/pkgconfig
%{prog_folder}/lib/perl
%{prog_folder}/lib/win*
%{prog_folder}/lib/RTEMS*
%dir %{prog_folder}/cfg
%{prog_folder}/cfg/CONFIG*
%{prog_folder}/cfg/TOOLCHAIN.%{epics_host_arch}*.%{epics_host_arch}*
%{prog_folder}/cfg/TOOLCHAIN.%{epics_host_arch}*.win*
%dir %{prog_folder}/configure
%{prog_folder}/configure/RELEASE
%{prog_folder}/configure/CONFIG*
%{prog_folder}/configure/RULES*
%dir %{prog_folder}/configure/os
%{prog_folder}/configure/os/CONFIG.Common.UnixCommon
%{prog_folder}/configure/os/CONFIG.Common.linuxCommon
%{prog_folder}/configure/os/CONFIG.Common.linux-clang
%{prog_folder}/configure/os/CONFIG.Common.linux-%{_host_cpu}*
%{prog_folder}/configure/os/CONFIG.Common.%{epics_host_arch}*
%{prog_folder}/configure/os/CONFIG.UnixCommon.Common
%{prog_folder}/configure/os/CONFIG.%{epics_host_arch}*.Common
%{prog_folder}/configure/os/CONFIG.%{epics_host_arch}*.%{epics_host_arch}*
%{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.Common
%{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.linux-%{__isa_name}*
%{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.win*
%{prog_folder}/configure/os/CONFIG.Linux.win*
%{prog_folder}/configure/os/CONFIG.win*.win*
%{prog_folder}/configure/os/CONFIG_SITE.Common.linuxCommon
%{prog_folder}/configure/os/CONFIG_SITE.Common.linux-%{__isa_name}*
%{prog_folder}/configure/os/CONFIG_SITE.%{epics_host_arch}*.Common
%{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.Common
%{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.UnixCommon
%{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.linux-%{__isa_name}*
%{prog_folder}/bin/%{epics_host_arch}*/[^Scips]*[^.]??
%{prog_folder}/bin/%{epics_host_arch}*/*.??
%dir %{prog_folder}/lib/pkgconfig
%{prog_folder}/lib/pkgconfig/epics-base.pc
%{prog_folder}/lib/pkgconfig/epics-base-%{epics_host_arch}*.pc
%{prog_folder}/lib/perl/EPICS
%{prog_folder}/lib/perl/DBD*
%{prog_folder}/dbd
###########################################
%files devel
%defattr(-,root,root,-)
%{prog_folder}/bin/[a-z]*/[^Scips]*[^.]??
%{prog_folder}/include/os/vxWorks/
%{prog_folder}/include/os/RTEMS/
%exclude %{prog_folder}/cfg/TOOLCHAIN.%{epics_host_arch}*.%{epics_host_arch}*
%exclude %{prog_folder}/cfg/TOOLCHAIN.%{epics_host_arch}*.win*
%{prog_folder}/cfg/TOOLCHAIN.*
%exclude %{prog_folder}/configure/os/CONFIG.Common.%{epics_host_arch}*
%exclude %{prog_folder}/configure/os/CONFIG.Common.UnixCommon
%exclude %{prog_folder}/configure/os/CONFIG.Common.linuxCommon
%exclude %{prog_folder}/configure/os/CONFIG.Common.linux-clang
%exclude %{prog_folder}/configure/os/CONFIG.Common.linux-%{_host_cpu}*
%exclude %{prog_folder}/configure/os/CONFIG.UnixCommon.Common
%exclude %{prog_folder}/configure/os/CONFIG.%{epics_host_arch}*.Common
%exclude %{prog_folder}/configure/os/CONFIG.%{epics_host_arch}*.%{epics_host_arch}*
%exclude %{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.Common
%exclude %{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.linux-%{__isa_name}*
%exclude %{prog_folder}/configure/os/CONFIG.linux-%{__isa_name}*.win*
%exclude %{prog_folder}/configure/os/CONFIG.Linux.win*
%exclude %{prog_folder}/configure/os/CONFIG.win*.win*
%exclude %{prog_folder}/configure/os/CONFIG_SITE.Common.linuxCommon
%exclude %{prog_folder}/configure/os/CONFIG_SITE.Common.linux-%{__isa_name}*
%exclude %{prog_folder}/configure/os/CONFIG_SITE.%{epics_host_arch}*.Common
%exclude %{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.Common
%exclude %{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.UnixCommon
%exclude %{prog_folder}/configure/os/CONFIG_SITE.linux-%{__isa_name}*.linux-%{__isa_name}*
%{prog_folder}/configure/os/
%exclude %{prog_folder}/lib/pkgconfig/epics-base.pc
%exclude %{prog_folder}/lib/pkgconfig/epics-base-%{epics_host_arch}*.pc
%{prog_folder}/lib/pkgconfig/
%exclude %{prog_folder}/bin/%{epics_host_arch}*/[^Scips]*[^.]??
%exclude %{prog_folder}/bin/%{epics_host_arch}*/*.??
%exclude %{prog_folder}/bin/*/[^Scips]*[^.]??
%exclude %{prog_folder}/bin/*/*.??
# VxWorks and RTEMS need static libs
%{prog_folder}/lib/V*
%{prog_folder}/lib/RTEMS*
%{prog_folder}/lib/win*
###########################################
@@ -363,7 +500,9 @@ fi
%defattr(-,root,root,-)
# Install bulky static libs for Linux targets only on request
%dir %{prog_folder}/lib/RHEL*
%{prog_folder}/lib/RHEL*/*.a
%dir %{prog_folder}/lib/[a-z]*
%{prog_folder}/lib/[a-z]*/*.a
###########################################

View File

@@ -34,12 +34,6 @@ pvDatabase_DEPEND_DIRS = pvAccess
SUBMODULES += pva2pva
pva2pva_DEPEND_DIRS = pvAccess
SUBMODULES += example
example_DEPEND_DIRS = pva2pva pvaClient
SUBMODULES += pcas
pcas_DEPEND_DIRS = ca
# Allow sites to add extra submodules
-include Makefile.local

2
modules/Makefile.local Normal file
View File

@@ -0,0 +1,2 @@
SUBMODULES += pcas
pcas_DEPEND_DIRS = ca

View File

@@ -118,7 +118,6 @@ EXPAND_VARS = INSTALL_BIN=$(FINAL_LOCATION)/bin/$(T_A)
SRC_DIRS += $(CURDIR)/test
PROD_HOST += ca_test
ca_test_SRCS = ca_test_main.c ca_test.c
ca_test_LIBS = ca Com
ca_test_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
OBJS_vxWorks += ca_test

View File

@@ -2575,7 +2575,8 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
SEVCHK ( ca_get ( DBR_FLOAT, chan, &temp ), NULL );
SEVCHK ( ca_pend_io ( timeoutToPendIO ), NULL );
/* printf ( "flow control bypassed %u events\n", flowCtrlCount ); */
if (0)
printf ( "flow control bypassed %u events\n", flowCtrlCount );
showProgressEnd ( interestLevel );
}

View File

@@ -25,6 +25,7 @@
#include <stdexcept>
#include <string> // vxWorks 6.0 requires this include
#include "epicsStdio.h"
#include "dbDefs.h"
#include "epicsGuard.h"
#include "epicsVersion.h"
@@ -1008,7 +1009,7 @@ bool cac::defaultExcep (
char buf[512];
char hostName[64];
iiu.getHostName ( guard, hostName, sizeof ( hostName ) );
sprintf ( buf, "host=%s ctx=%.400s", hostName, pCtx );
epicsSnprintf( buf, sizeof(buf), "host=%s ctx=%.400s", hostName, pCtx );
this->notify.exception ( guard, status, buf, 0, 0u );
return true;
}
@@ -1312,7 +1313,7 @@ void cac::pvMultiplyDefinedNotify ( msgForMultiplyDefinedPV & mfmdpv,
const char * pChannelName, const char * pAcc, const char * pRej )
{
char buf[256];
sprintf ( buf, "Channel: \"%.64s\", Connecting to: %.64s, Ignored: %.64s",
epicsSnprintf( buf, sizeof(buf), "Channel: \"%.64s\", Connecting to: %.64s, Ignored: %.64s",
pChannelName, pAcc, pRej );
{
callbackManager mgr ( this->notify, this->cbMutex );

View File

@@ -676,7 +676,7 @@ union db_access_val{
(type)%(LAST_TYPE+1) == DBR_DOUBLE)
#define dbf_type_to_text(type) \
( ((type) >= -1 && (type) < dbf_text_dim-2) ? \
( ((type+1) >= 0 && (type) < dbf_text_dim-2) ? \
dbf_text[type+1] : dbf_text_invalid )
#define dbf_text_to_type(text, type) \

View File

@@ -21,6 +21,9 @@
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include <vector>
#include <exception>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
@@ -28,6 +31,7 @@
#include "envDefs.h"
#include "epicsAssert.h"
#include "epicsString.h"
#include "epicsStdioRedirect.h"
#include "errlog.h"
#include "osiWireFormat.h"
@@ -35,39 +39,6 @@
#include "addrList.h"
#include "iocinf.h"
/*
* getToken()
*/
static char *getToken ( const char **ppString, char *pBuf, unsigned bufSIze )
{
bool tokenFound = false;
const char *pToken;
unsigned i;
pToken = *ppString;
while ( isspace (*pToken) && *pToken ){
pToken++;
}
for ( i=0u; i<bufSIze; i++ ) {
if ( isspace (pToken[i]) || pToken[i]=='\0' ) {
pBuf[i] = '\0';
*ppString = &pToken[i];
if ( i != 0 ) {
tokenFound = true;
}
break;
}
pBuf[i] = pToken[i];
}
if ( tokenFound ) {
pBuf[bufSIze-1] = '\0';
return pBuf;
}
return NULL;
}
/*
* addAddrToChannelAccessAddressList ()
*/
@@ -77,9 +48,7 @@ extern "C" int epicsStdCall addAddrToChannelAccessAddressList
{
osiSockAddrNode *pNewNode;
const char *pStr;
const char *pToken;
struct sockaddr_in addr;
char buf[256u]; /* large enough to hold an IP address or hostname */
int status, ret = -1;
pStr = envGetConfigParamPtr (pEnv);
@@ -87,31 +56,45 @@ extern "C" int epicsStdCall addAddrToChannelAccessAddressList
return ret;
}
while ( ( pToken = getToken (&pStr, buf, sizeof (buf) ) ) ) {
status = aToIPAddr ( pToken, port, &addr );
if (status<0) {
fprintf ( stderr, "%s: Parsing '%s'\n", __FILE__, pEnv->name);
fprintf ( stderr, "\tBad internet address or host name: '%s'\n", pToken);
continue;
try {
std::vector<char> scratch(pStr, pStr+strlen(pStr)+1); // copy chars and trailing nil
char *save = NULL;
for(const char *pToken = epicsStrtok_r(&scratch[0], " \t\n\r", &save);
pToken;
pToken = epicsStrtok_r(NULL, " \t\n\r", &save))
{
if(!pToken[0]) {
continue;
}
status = aToIPAddr ( pToken, port, &addr );
if (status<0) {
fprintf ( stderr, "%s: Parsing '%s'\n", __FILE__, pEnv->name);
fprintf ( stderr, "\tBad internet address or host name: '%s'\n", pToken);
continue;
}
if ( ignoreNonDefaultPort && ntohs ( addr.sin_port ) != port ) {
continue;
}
pNewNode = (osiSockAddrNode *) calloc (1, sizeof(*pNewNode));
if (pNewNode==NULL) {
fprintf ( stderr, "addAddrToChannelAccessAddressList(): no memory available for configuration\n");
break;
}
pNewNode->addr.ia = addr;
/*
* LOCK applied externally
*/
ellAdd (pList, &pNewNode->node);
ret = 0; /* success if anything is added to the list */
}
if ( ignoreNonDefaultPort && ntohs ( addr.sin_port ) != port ) {
continue;
}
pNewNode = (osiSockAddrNode *) calloc (1, sizeof(*pNewNode));
if (pNewNode==NULL) {
fprintf ( stderr, "addAddrToChannelAccessAddressList(): no memory available for configuration\n");
break;
}
pNewNode->addr.ia = addr;
/*
* LOCK applied externally
*/
ellAdd (pList, &pNewNode->node);
ret = 0; /* success if anything is added to the list */
} catch(std::exception&) { // only bad_alloc currently possible
ret = -1;
}
return ret;

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2003 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
TOP=..
include $(TOP)/configure/CONFIG

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 1998 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
/*caExample.c*/
#include <stddef.h>
#include <stdlib.h>

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 2000 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
/*caMonitor.c*/
/* This example accepts the name of a file containing a list of pvs to monitor.

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
TOP=..
include $(TOP)/configure/CONFIG

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env perl
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
use strict;
# This construct sets @INC to search lib/perl of all RELEASE entries

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env perl
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
use strict;
# This construct sets @INC to search lib/perl of all RELEASE entries

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env perl
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
use strict;
# This construct sets @INC to search lib/perl of all RELEASE entries

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env perl
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
use strict;
# This construct sets @INC to search lib/perl of all RELEASE entries

View File

@@ -343,6 +343,7 @@ static int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
default :
break;
}
free(pvs[n].value);
}
return 0;
}
@@ -388,7 +389,7 @@ int main (int argc, char *argv[])
int digits = 0; /* getopt() no. of float digits */
int nPvs; /* Number of PVs */
pv* pvs; /* Array of PV structures */
pv* pvs = NULL; /* Array of PV structures */
LINE_BUFFER(stdout); /* Configure stdout buffering */
@@ -556,6 +557,7 @@ int main (int argc, char *argv[])
result = caget(pvs, nPvs, request, format, type, count);
/* Shut down Channel Access */
free(pvs);
ca_context_destroy();
return result;

View File

@@ -23,4 +23,4 @@ dbCore_SRCS += asIocRegister.c
PROD_HOST += ascheck
ascheck_SRCS = ascheck.c
ascheck_LIBS = dbCore ca Com
ascheck_LIBS = dbCore ca

View File

@@ -225,6 +225,11 @@ static void asCaTask(void)
if(asCaDebug) printf("asCaTask has cleared all channels\n");
epicsEventSignal(asCaTaskWait);
}
/* ATM never reached, just a placeholder */
cantProceed("Unreachable. Perpetual thread.");
taskwdRemove(0);
}
void asCaStart(void)

View File

@@ -90,7 +90,7 @@ static const iocshFuncDef asprulesFuncDef = {
"asprules",1,asprulesArgs,
"List rules of an Access Security Group.\n"
"If no Group is specified then list the rules for all groups\n"
"Example: asprules mygroup"
"Example: asprules mygroup\n"
};
static void asprulesCallFunc(const iocshArgBuf *args)
{

View File

@@ -224,6 +224,8 @@ got_header:
fprintf(outFile,"}\n");
fclose(inFile);
fclose(outFile);
free(outFilename);
free(pname);
return(0);
}

View File

@@ -112,7 +112,7 @@ void dbSpcAsRegisterCallback(SPC_ASCALLBACK func)
long dbPutSpecial(DBADDR *paddr,int pass)
{
long int (*pspecial)()=NULL;
long int (*pspecial)(struct dbAddr *, int)=NULL;
rset *prset;
dbCommon *precord = paddr->precord;
long status=0;
@@ -145,63 +145,66 @@ long dbPutSpecial(DBADDR *paddr,int pass)
}
static void get_enum_strs(DBADDR *paddr, char **ppbuffer,
rset *prset,long *options)
rset *prset, long *options)
{
short field_type=paddr->field_type;
dbFldDes *pdbFldDes = paddr->pfldDes;
dbMenu *pdbMenu;
dbDeviceMenu *pdbDeviceMenu;
char **papChoice;
unsigned long no_str;
char *ptemp;
struct dbr_enumStrs *pdbr_enumStrs=(struct dbr_enumStrs*)(*ppbuffer);
unsigned int i;
struct dbr_enumStrs *penum=(struct dbr_enumStrs*)(*ppbuffer);
/* advance output buffer on success or failure for next option */
*ppbuffer = dbr_enumStrs_size + (char*)penum;
memset(pdbr_enumStrs,'\0',dbr_enumStrs_size);
switch(field_type) {
case DBF_ENUM:
if( prset && prset->get_enum_strs ) {
(*prset->get_enum_strs)(paddr,pdbr_enumStrs);
} else {
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
}
break;
case DBF_MENU:
pdbMenu = (dbMenu *)pdbFldDes->ftPvt;
no_str = pdbMenu->nChoice;
papChoice= pdbMenu->papChoiceValue;
goto choice_common;
case DBF_DEVICE:
pdbDeviceMenu = (dbDeviceMenu *)pdbFldDes->ftPvt;
if(!pdbDeviceMenu) {
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
break;
}
no_str = pdbDeviceMenu->nChoice;
papChoice = pdbDeviceMenu->papChoice;
goto choice_common;
choice_common:
i = sizeof(pdbr_enumStrs->strs)/
sizeof(pdbr_enumStrs->strs[0]);
if(i<no_str) no_str = i;
pdbr_enumStrs->no_str = no_str;
ptemp = &(pdbr_enumStrs->strs[0][0]);
for (i=0; i<no_str; i++) {
if(papChoice[i]==NULL) *ptemp=0;
else {
strncpy(ptemp,papChoice[i],
sizeof(pdbr_enumStrs->strs[0]));
*(ptemp+sizeof(pdbr_enumStrs->strs[0])-1) = 0;
}
ptemp += sizeof(pdbr_enumStrs->strs[0]);
}
break;
default:
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
break;
memset(penum, 0, dbr_enumStrs_size);
/* from this point
* on success, return early
* on failure, jump or fall through to clear *options bit.
*/
if(paddr->field_type == DBF_ENUM) {
if( prset && prset->get_enum_strs ) {
(*prset->get_enum_strs)(paddr,penum);
return;
}
} else if(paddr->field_type == DBF_MENU || paddr->field_type == DBF_DEVICE) {
char **ppchoices;
epicsUInt32 i, nchoices = 0;
if(paddr->field_type == DBF_MENU) {
dbMenu *pmenu = paddr->pfldDes->ftPvt;
nchoices = pmenu->nChoice;
ppchoices= pmenu->papChoiceValue;
} else if(paddr->field_type == DBF_DEVICE) {
dbDeviceMenu *pdevs = paddr->pfldDes->ftPvt;
if(!pdevs)
goto nostrs;
nchoices = pdevs->nChoice;
ppchoices = pdevs->papChoice;
}
if(nchoices > NELEMENTS(penum->strs))
nchoices = NELEMENTS(penum->strs); /* availible > capacity, truncated list */
penum->no_str = nchoices;
for(i=0; i<nchoices; i++) {
if(ppchoices[i]) {
strncpy(penum->strs[i], ppchoices[i],
sizeof(penum->strs[i]));
/* strs[i][] allowed to omit trailing nil */
} else {
penum->strs[i][0] = '\0';
}
}
*ppbuffer = ((char *)*ppbuffer) + dbr_enumStrs_size;
return;
} else {
/* other DBF_* fall through to error */
}
nostrs:
/* indicate option data not available. distinct from no_str==0 */
*options = (*options)^DBR_ENUM_STRS;
}
static void get_graphics(DBADDR *paddr, char **ppbuffer,
@@ -1350,6 +1353,7 @@ long dbPut(DBADDR *paddr, short dbrType,
long status = 0;
dbFldDes *pfldDes;
int isValueField;
int propertyUpdate = paddr->pfldDes->prop && precord->mlis.count;
if (special == SPC_ATTRIBUTE)
return S_db_noMod;
@@ -1394,12 +1398,31 @@ long dbPut(DBADDR *paddr, short dbrType,
if (nRequest < 1) {
recGblSetSevr(precord, LINK_ALARM, INVALID_ALARM);
} else {
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
paddr->pfield, paddr);
if (propertyUpdate && paddr->field_size <= MAX_STRING_SIZE) {
char propBuffer[MAX_STRING_SIZE];
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
&propBuffer, paddr);
if (!status) {
if (memcmp(paddr->pfield, &propBuffer, paddr->field_size) != 0) {
memcpy(paddr->pfield, &propBuffer, paddr->field_size);
} else {
/* suppress DBE_PROPERTY event if property did not change */
propertyUpdate = 0;
}
}
} else {
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
paddr->pfield, paddr);
}
nRequest = 1;
}
}
/* Post property updates before second dbPutSpecial */
/* which may post DBE_VALUE and/or DBE_LOG events */
if (propertyUpdate && !status)
db_post_events(precord, NULL, DBE_PROPERTY);
/* Always do special processing if needed */
if (special) {
long status2 = dbPutSpecial(paddr, 1);
@@ -1416,12 +1439,6 @@ long dbPut(DBADDR *paddr, short dbrType,
if (precord->mlis.count &&
!(isValueField && pfldDes->process_passive))
db_post_events(precord, pfieldsave, DBE_VALUE | DBE_LOG);
/* If this field is a property (metadata) field,
* then post a property change event (even if the field
* didn't change).
*/
if (precord->mlis.count && pfldDes->prop)
db_post_events(precord, NULL, DBE_PROPERTY);
done:
paddr->pfield = pfieldsave;
return status;

View File

@@ -225,6 +225,7 @@ void testdbCaWaitForEvent(DBLINK *plink, unsigned long cnt, enum testEvent event
assert(plink->type==CA_LINK);
pca = (caLink *)plink->value.pv_link.pvt;
caLinkInc(pca);
epicsMutexMustLock(pca->lock);
assert(!pca->monitor && !pca->connect && !pca->userPvt);
@@ -239,6 +240,8 @@ void testdbCaWaitForEvent(DBLINK *plink, unsigned long cnt, enum testEvent event
dbScanUnlock(plink->precord);
epicsEventMustWait(evt);
/* ensure worker has finished executing */
dbCaSync();
dbScanLock(plink->precord);
epicsMutexMustLock(pca->lock);
@@ -250,6 +253,7 @@ void testdbCaWaitForEvent(DBLINK *plink, unsigned long cnt, enum testEvent event
epicsEventDestroy(evt);
epicsMutexUnlock(pca->lock);
caLinkDec(pca);
dbScanUnlock(plink->precord);
}
@@ -287,16 +291,15 @@ void dbCaSync(void)
epicsEventMustWait(wake);
/* Worker holds workListLock when calling epicsEventMustTrigger()
* we cycle through workListLock to ensure worker call to
* we hold workListLock to ensure worker call to
* epicsEventMustTrigger() returns before we destroy the event.
*/
epicsMutexMustLock(workListLock);
epicsMutexUnlock(workListLock);
assert(templink.refcount==1);
epicsMutexDestroy(templink.lock);
epicsEventDestroy(wake);
epicsMutexUnlock(workListLock);
}
void dbCaCallbackProcess(void *userPvt)

View File

@@ -14,6 +14,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <string>
#include <stdexcept>
@@ -165,7 +167,7 @@ unsigned long dbChannelIO::nativeElementCount (
{
guard.assertIdenticalMutex ( this->mutex );
long elements = dbChannelElements ( this->dbch );
if ( elements >= 0u ) {
if ( elements >= 0 ) {
return static_cast < unsigned long > ( elements );
}
return 0u;

View File

@@ -15,13 +15,21 @@ typedef struct dbCommonPvt {
/* Thread which is currently processing this record */
struct epicsThreadOSD* procThread;
struct dbCommon common;
/* actually followed by:
* struct dbCommon common;
*/
} dbCommonPvt;
static EPICS_ALWAYS_INLINE
dbCommonPvt* dbRec2Pvt(struct dbCommon *prec)
{
return CONTAINER(prec, dbCommonPvt, common);
return (dbCommonPvt*)((char*)prec - sizeof(dbCommonPvt));
}
static EPICS_ALWAYS_INLINE
dbCommon* dbPvt2Rec(struct dbCommonPvt *pvt)
{
return (dbCommon*)&pvt[1];
}
#endif // DBCOMMONPVT_H

View File

@@ -94,7 +94,7 @@ static long cvt_st_UInt32(const char *from, void *pfield, const dbAddr *paddr)
status = epicsParseFloat64(from, &dval, &end);
if (!status &&
dval >=0 &&
dval <= ULONG_MAX)
dval <= UINT_MAX)
*to = dval;
}
return status;

View File

@@ -13,6 +13,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <limits.h>
#include "epicsMutex.h"

View File

@@ -12,6 +12,8 @@
* Author Jeff Hill
*/
#define USE_TYPED_DBEVENT
#include <stdlib.h>
#include "epicsMutex.h"

View File

@@ -302,7 +302,7 @@ static long getStringUlong(const dbAddr *paddr,
epicsFloat64 dval;
status = epicsParseFloat64(psrc, &dval, &end);
if (!status && 0 <= dval && dval <= ULONG_MAX)
if (!status && 0 <= dval && dval <= UINT_MAX)
*pdst = dval;
}
if (status)
@@ -1052,7 +1052,7 @@ static long putStringUlong(dbAddr *paddr,
epicsFloat64 dval;
status = epicsParseFloat64(psrc, &dval, &end);
if (!status && 0 <= dval && dval <= ULONG_MAX)
if (!status && 0 <= dval && dval <= UINT_MAX)
*pdst = dval;
}
if (status)

View File

@@ -7,20 +7,38 @@
* EPICS Base is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* dbConvertFast.h */
/** @file dbConvertFast.h
* @brief Data conversion for scalar values
*
* The typedef FASTCONVERTFUNC is defined in link.h as:
* @code
* long convert(const void *from, void *to, const struct dbAddr *paddr);
* @endcode
*
* The arrays declared here provide pointers to the fast conversion
* routine where the first array index is the data type for the first
* "from" pointer arg, and the second array index is the data type for
* the second "to" pointer arg. The array index values are a subset of
* the DBF_ enum values defined in dbFldTypes.h
*/
#ifndef INCdbConvertFasth
#define INCdbConvertFasth
#include "dbFldTypes.h"
#include "dbCoreAPI.h"
#include "link.h"
#ifdef __cplusplus
extern "C" {
#endif
DBCORE_API extern long (*dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1])();
DBCORE_API extern long (*dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1])();
/** Function pointers for get conversions */
DBCORE_API extern const FASTCONVERTFUNC
dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1];
/** Function pointers for put conversions */
DBCORE_API extern const FASTCONVERTFUNC
dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1];
#ifdef __cplusplus
}

View File

@@ -19,8 +19,6 @@
#include "dbConvertFast.h"
#include "dbConvertJSON.h"
typedef long (*FASTCONVERT)();
typedef struct parseContext {
int depth;
short dbrType;
@@ -42,7 +40,7 @@ static int dbcj_boolean(void *ctx, int val) {
static int dbcj_integer(void *ctx, long long num) {
parseContext *parser = (parseContext *) ctx;
epicsInt64 val64 = num;
FASTCONVERT conv = dbFastPutConvertRoutine[DBF_INT64][parser->dbrType];
FASTCONVERTFUNC conv = dbFastPutConvertRoutine[DBF_INT64][parser->dbrType];
if (parser->elems > 0) {
conv(&val64, parser->pdest, NULL);
@@ -54,7 +52,7 @@ static int dbcj_integer(void *ctx, long long num) {
static int dbcj_double(void *ctx, double num) {
parseContext *parser = (parseContext *) ctx;
FASTCONVERT conv = dbFastPutConvertRoutine[DBF_DOUBLE][parser->dbrType];
FASTCONVERTFUNC conv = dbFastPutConvertRoutine[DBF_DOUBLE][parser->dbrType];
if (parser->elems > 0) {
conv(&num, parser->pdest, NULL);

View File

@@ -19,6 +19,8 @@
*/
#define EPICS_PRIVATE_API
#define USE_TYPED_DBEVENT
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
@@ -98,8 +100,8 @@ struct event_user {
unsigned char extra_labor; /* if set call extra labor func */
unsigned char flowCtrlMode; /* replace existing monitor */
unsigned char extraLaborBusy;
void (*init_func)();
epicsThreadId init_func_arg;
void (*init_func)(void *);
void *init_func_arg;
};
typedef struct {

View File

@@ -32,6 +32,15 @@ struct dbChannel;
struct db_field_log;
struct evSubscrip;
#ifdef USE_TYPED_DBEVENT
struct dbEventContext; // use dbEventCtx
typedef struct evSubscrip* dbEventSubscription;
typedef struct dbEventContext* dbEventCtx;
#else
typedef void * dbEventSubscription;
typedef void * dbEventCtx;
#endif
DBCORE_API int db_event_list (
const char *name, unsigned level);
DBCORE_API int dbel (
@@ -39,8 +48,6 @@ DBCORE_API int dbel (
DBCORE_API int db_post_events (
void *pRecord, void *pField, unsigned caEventMask );
typedef void * dbEventCtx;
typedef void EXTRALABORFUNC (void *extralabor_arg);
DBCORE_API dbEventCtx db_init_events (void);
DBCORE_API int db_start_events (
@@ -63,7 +70,6 @@ DBCORE_API void db_init_event_freelists (void);
typedef void EVENTFUNC (void *user_arg, struct dbChannel *chan,
int eventsRemaining, struct db_field_log *pfl);
typedef void * dbEventSubscription;
DBCORE_API dbEventSubscription db_add_event (
dbEventCtx ctx, struct dbChannel *chan,
EVENTFUNC *user_sub, void *user_arg, unsigned select);

File diff suppressed because it is too large Load Diff

View File

@@ -133,7 +133,7 @@ void dbInitLink(struct link *plink, short dbfType)
plink->value.pv_link.pvlMask |= pvlOptFWD;
}
else {
errlogPrintf("Forward-link uses Channel Access "
errlogPrintf(ERL_WARNING ": Forward-link uses Channel Access "
"without pointing to PROC field\n"
" %s.%s => %s\n",
precord->name, dbLinkFieldName(plink),

View File

@@ -307,7 +307,7 @@ typedef struct lset {
*
* @param plink the link
* @param dbrType data type code
* @param pbuffer where to put the value
* @param pbuffer where the data is
* @param nRequest number of elements to send
* @returns status value
*/
@@ -324,7 +324,7 @@ typedef struct lset {
*
* @param plink the link
* @param dbrType data type code
* @param pbuffer where to put the value
* @param pbuffer where the data is
* @param nRequest number of elements to send
* @returns status value
*/

View File

@@ -918,7 +918,7 @@ long dblsr(char *recordname,int level)
pdbFldDes = pdbRecordType->papFldDes[pdbRecordType->link_ind[link]];
plink = (DBLINK *)((char *)precord + pdbFldDes->offset);
if(plink->type != DB_LINK) continue;
pdbAddr = (DBADDR *)(plink->value.pv_link.pvt);
pdbAddr = &((dbChannel *)(plink->value.pv_link.pvt))->addr;
printf("\t%s",pdbFldDes->name);
if(pdbFldDes->field_type==DBF_INLINK) {
printf("\t INLINK");

View File

@@ -15,6 +15,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <string>
#include <stdexcept>

View File

@@ -155,7 +155,7 @@ void scanStop(void)
{
int i;
if (scanCtl == ctlExit) return;
if (scanCtl == ctlInit || scanCtl == ctlExit) return;
scanCtl = ctlExit;
interruptAccept = FALSE;
@@ -264,7 +264,7 @@ void scanAdd(struct dbCommon *precord)
} else if (scan == menuScanI_O_Intr) {
ioscan_head *piosh = NULL;
int prio;
DEVSUPFUN get_ioint_info;
long (*get_ioint_info)(int, struct dbCommon *, IOSCANPVT*);
if (precord->dset == NULL){
recGblRecordError(-1, (void *)precord,
@@ -332,7 +332,7 @@ void scanDelete(struct dbCommon *precord)
} else if (scan == menuScanI_O_Intr) {
ioscan_head *piosh = NULL;
int prio;
DEVSUPFUN get_ioint_info;
long (*get_ioint_info)(int, struct dbCommon *, IOSCANPVT*);
if (precord->dset==NULL) {
recGblRecordError(-1, (void *)precord,

View File

@@ -14,6 +14,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <string>
#include <stdexcept>

View File

@@ -680,7 +680,7 @@ long dbtpf(const char *pname, const char *pvalue)
long dbior(const char *pdrvName,int interest_level)
{
drvSup *pdrvSup;
struct drvet *pdrvet;
drvet *pdrvet;
dbRecordType *pdbRecordType;
if (!pdbbase) {

View File

@@ -14,6 +14,7 @@
#include <string.h>
#define EPICS_PRIVATE_API
#define USE_TYPED_DBEVENT
#include "dbmf.h"
#include "epicsUnitTest.h"
@@ -50,6 +51,7 @@ void testdbPrepare(void)
{
if(!testEvtLock)
testEvtLock = epicsMutexMustCreate();
initHookAnnounce(initHookAfterPrepareDatabase);
}
void testdbReadDatabase(const char* file,
@@ -94,6 +96,7 @@ void testIocShutdownOk(void)
void testdbCleanup(void)
{
initHookAnnounce(initHookBeforeCleanupDatabase);
dbFreeBase(pdbbase);
db_cleanup_events();
initHookFree();

View File

@@ -62,7 +62,7 @@ void recGblRecordError(long status, void *pdbc,
dbCommon *precord = pdbc;
char errMsg[256] = "";
if (status)
if ( status>0 )
errSymLookup(status, errMsg, sizeof(errMsg));
errlogPrintf("recGblRecordError: %s %s PV: %s\n",

View File

@@ -11,6 +11,8 @@
SRC_DIRS += $(IOCDIR)/dbStatic
USR_CFLAGS += -DUSE_TYPED_DRVET
INC += dbBase.h
INC += dbFldTypes.h
INC += dbStaticLib.h

View File

@@ -21,6 +21,7 @@
#include "dbDefs.h"
#include "recSup.h"
#include "devSup.h"
#include "drvSup.h"
typedef struct dbMenu {
ELLNODE node;
@@ -33,7 +34,7 @@ typedef struct dbMenu {
typedef struct drvSup {
ELLNODE node;
char *name;
struct drvet *pdrvet;
drvet *pdrvet;
}drvSup;
typedef struct devSup {
@@ -118,6 +119,10 @@ typedef struct dbRecordNode {
char *recordname;
ELLLIST infoList; /*LIST head of info nodes*/
int flags;
/** Parse order of this record()
* @since 7.0.8.1
*/
unsigned order;
struct dbRecordNode *aliasedRecnode; /* NULL unless flags|DBRN_FLAGS_ISALIAS */
}dbRecordNode;
@@ -184,5 +189,9 @@ typedef struct dbBase {
struct gphPvt *pgpHash;
short ignoreMissingMenus;
short loadCdefs;
/** Total number of records.
* @since 7.0.8.1
*/
unsigned no_records;
}dbBase;
#endif

View File

@@ -225,7 +225,7 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp,
char **macPairs;
if (ellCount(&tempList)) {
epicsPrintf("dbReadCOM: Parser stack dirty %d\n", ellCount(&tempList));
fprintf(stderr, ERL_WARNING ": dbReadCOM: Parser stack dirty %d\n", ellCount(&tempList));
}
if (getIocState() != iocVoid) {
@@ -247,23 +247,23 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp,
}
my_buffer = dbCalloc(MY_BUFFER_SIZE,sizeof(char));
freeListInitPvt(&freeListPvt,sizeof(tempListNode),100);
if(substitutions) {
if(macCreateHandle(&macHandle,NULL)) {
epicsPrintf("macCreateHandle error\n");
status = -1;
goto cleanup;
}
macParseDefns(macHandle,(char *)substitutions,&macPairs);
if(macPairs ==NULL) {
macDeleteHandle(macHandle);
macHandle = NULL;
} else {
macInstallMacros(macHandle,macPairs);
free((void *)macPairs);
mac_input_buffer = dbCalloc(MY_BUFFER_SIZE,sizeof(char));
}
macSuppressWarning(macHandle,dbQuietMacroWarnings);
if (substitutions == NULL)
substitutions = "";
if(macCreateHandle(&macHandle,NULL)) {
fprintf(stderr, ERL_ERROR ": macCreateHandle failed\n");
status = -1;
goto cleanup;
}
macParseDefns(macHandle,substitutions,&macPairs);
if(macPairs == NULL) {
macDeleteHandle(macHandle);
macHandle = NULL;
} else {
macInstallMacros(macHandle,macPairs);
free(macPairs);
mac_input_buffer = dbCalloc(MY_BUFFER_SIZE,sizeof(char));
}
macSuppressWarning(macHandle,dbQuietMacroWarnings);
pinputFile = dbCalloc(1,sizeof(inputFile));
if (filename) {
pinputFile->filename = macEnvExpand(filename);
@@ -294,7 +294,7 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp,
status = pvt_yy_parse();
if (ellCount(&tempList) && !yyAbort)
epicsPrintf("dbReadCOM: Parser stack dirty w/o error. %d\n", ellCount(&tempList));
fprintf(stderr, ERL_WARNING ": dbReadCOM: Parser stack dirty w/o error. %d\n", ellCount(&tempList));
while (ellCount(&tempList))
popFirstTemp(); /* Memory leak on parser failure */
@@ -401,15 +401,15 @@ static void dbIncludePrint(void)
inputFile *pinputFile = pinputFileNow;
while (pinputFile) {
epicsPrintf(" in");
fprintf(stderr, " in");
if (pinputFile->path)
epicsPrintf(" path \"%s\" ",pinputFile->path);
fprintf(stderr, " path \"%s\" ",pinputFile->path);
if (pinputFile->filename) {
epicsPrintf(" file \"%s\"",pinputFile->filename);
fprintf(stderr, " file \"%s\"",pinputFile->filename);
} else {
epicsPrintf(" standard input");
fprintf(stderr, " standard input");
}
epicsPrintf(" line %d\n",pinputFile->line_num);
fprintf(stderr, " line %d\n",pinputFile->line_num);
pinputFile = (inputFile *)ellPrevious(&pinputFile->node);
}
return;
@@ -434,7 +434,7 @@ static void dbIncludeNew(char *filename)
pinputFile->filename = macEnvExpand(filename);
pinputFile->path = dbOpenFile(savedPdbbase, pinputFile->filename, &fp);
if (!fp) {
epicsPrintf("Can't open include file \"%s\"\n", filename);
fprintf(stderr, "Can't open include file \"%s\"\n", filename);
yyerror(NULL);
free((void *)pinputFile->filename);
free((void *)pinputFile);
@@ -696,7 +696,7 @@ static void dbRecordtypeEmpty(void)
ptempListNode = (tempListNode *)ellFirst(&tempList);
pdbRecordType = ptempListNode->item;
epicsPrintf("Declaration of recordtype(%s) preceeded full definition.\n",
fprintf(stderr, "Declaration of recordtype(%s) preceeded full definition.\n",
pdbRecordType->name);
yyerrorAbort(NULL);
}
@@ -801,7 +801,7 @@ static void dbDevice(char *recordtype,char *linktype,
int i,link_type;
pgphentry = gphFind(savedPdbbase->pgpHash,recordtype,&savedPdbbase->recordTypeList);
if(!pgphentry) {
epicsPrintf("Record type \"%s\" not found for device \"%s\"\n",
fprintf(stderr, "Record type \"%s\" not found for device \"%s\"\n",
recordtype, choicestring);
yyerror(NULL);
return;
@@ -814,7 +814,7 @@ static void dbDevice(char *recordtype,char *linktype,
}
}
if(link_type==-1) {
epicsPrintf("Bad link type \"%s\" for device \"%s\"\n",
fprintf(stderr, "Bad link type \"%s\" for device \"%s\"\n",
linktype, choicestring);
yyerror(NULL);
return;
@@ -1077,16 +1077,16 @@ int dbRecordNameValidate(const char *name)
if(i==0) {
/* first character restrictions */
if(c=='-' || c=='+' || c=='[' || c=='{') {
errlogPrintf("Warning: Record/Alias name '%s' should not begin with '%c'\n", name, c);
fprintf(stderr, "Warning: Record/Alias name '%s' should not begin with '%c'\n", name, c);
}
}
/* any character restrictions */
if(c < ' ') {
errlogPrintf("Warning: Record/Alias name '%s' should not contain non-printable 0x%02x\n",
fprintf(stderr, "Warning: Record/Alias name '%s' should not contain non-printable 0x%02x\n",
name, c);
} else if(c==' ' || c=='\t' || c=='"' || c=='\'' || c=='.' || c=='$') {
epicsPrintf(ERL_ERROR ": Bad character '%c' in Record/Alias name \"%s\"\n",
fprintf(stderr, ERL_ERROR ": Bad character '%c' in Record/Alias name \"%s\"\n",
c, name);
yyerrorAbort(NULL);
return 1;
@@ -1113,15 +1113,29 @@ static void dbRecordHead(char *recordType, char *name, int visible)
status = dbFindRecord(pdbentry, name);
if (status == 0)
return; /* done */
epicsPrintf(ERL_ERROR ": Record \"%s\" not found\n", name);
fprintf(stderr, ERL_ERROR ": Record \"%s\" not found\n", name);
yyerror(NULL);
duplicate = TRUE;
return;
}
if (recordType[0] == '#' && recordType[1] == 0) {
status = dbFindRecord(pdbentry, name);
if (status == 0) {
dbDeleteRecord(pdbentry);
} else {
fprintf(stderr, ERL_WARNING ": Unable to delete record \"%s\". Not found.\n"
" at file %s line %d\n",
name, pinputFileNow->filename, pinputFileNow->line_num);
}
popFirstTemp();
dbFreeEntry(pdbentry);
duplicate = TRUE;
return;
}
status = dbFindRecordType(pdbentry, recordType);
if (status) {
epicsPrintf("Record \"%s\" is of unknown type \"%s\"\n",
fprintf(stderr, "Record \"%s\" is of unknown type \"%s\"\n",
name, recordType);
yyerrorAbort(NULL);
return;
@@ -1132,14 +1146,14 @@ static void dbRecordHead(char *recordType, char *name, int visible)
status = dbCreateRecord(pdbentry,name);
if (status == S_dbLib_recExists) {
if (strcmp(recordType, dbGetRecordTypeName(pdbentry)) != 0) {
epicsPrintf(ERL_ERROR ": Record \"%s\" of type \"%s\" redefined with new type "
fprintf(stderr, ERL_ERROR ": Record \"%s\" of type \"%s\" redefined with new type "
"\"%s\"\n", name, dbGetRecordTypeName(pdbentry), recordType);
yyerror(NULL);
duplicate = TRUE;
return;
}
else if (dbRecordsOnceOnly) {
epicsPrintf(ERL_ERROR ": Record \"%s\" already defined and dbRecordsOnceOnly set.\n"
fprintf(stderr, ERL_ERROR ": Record \"%s\" already defined and dbRecordsOnceOnly set.\n"
"Used record type \"*\" to append.\n",
name);
yyerror(NULL);
@@ -1147,7 +1161,7 @@ static void dbRecordHead(char *recordType, char *name, int visible)
}
}
else if (status) {
epicsPrintf("Can't create record \"%s\" of type \"%s\"\n",
fprintf(stderr, "Can't create record \"%s\" of type \"%s\"\n",
name, recordType);
yyerrorAbort(NULL);
}
@@ -1167,7 +1181,7 @@ static void dbRecordField(char *name,char *value)
pdbentry = ptempListNode->item;
status = dbFindField(pdbentry,name);
if (status) {
epicsPrintf("%s Record \"%s\" does not have a field \"%s\"\n",
fprintf(stderr, "%s Record \"%s\" does not have a field \"%s\"\n",
dbGetRecordTypeName(pdbentry), dbGetRecordName(pdbentry), name);
if(dbGetRecordName(pdbentry)) {
DBENTRY temp;
@@ -1183,17 +1197,17 @@ static void dbRecordField(char *name,char *value)
}
dbFinishEntry(&temp);
if(bestSim>0.0) {
epicsPrintf(" Did you mean \"%s\"?", bestFld->name);
fprintf(stderr, " Did you mean \"%s\"?", bestFld->name);
if(bestFld->prompt)
epicsPrintf(" (%s)", bestFld->prompt);
epicsPrintf("\n");
fprintf(stderr, " (%s)", bestFld->prompt);
fprintf(stderr, "\n");
}
}
yyerror(NULL);
return;
}
if (pdbentry->indfield == 0) {
epicsPrintf("Can't set \"NAME\" field of record \"%s\"\n",
fprintf(stderr, "Can't set \"NAME\" field of record \"%s\"\n",
dbGetRecordName(pdbentry));
yyerror(NULL);
return;
@@ -1211,7 +1225,7 @@ static void dbRecordField(char *name,char *value)
char msg[128];
errSymLookup(status, msg, sizeof(msg));
epicsPrintf("Can't set \"%s.%s\" to \"%s\" %s : %s\n",
fprintf(stderr, "Can't set \"%s.%s\" to \"%s\" %s : %s\n",
dbGetRecordName(pdbentry), name, value, pdbentry->message ? pdbentry->message : "", msg);
dbPutStringSuggest(pdbentry, value);
yyerror(NULL);
@@ -1242,31 +1256,57 @@ static void dbRecordInfo(char *name, char *value)
status = dbPutInfo(pdbentry,name,value);
if (status) {
epicsPrintf("Can't set \"%s\" info \"%s\" to \"%s\"\n",
fprintf(stderr, "Can't set \"%s\" info \"%s\" to \"%s\"\n",
dbGetRecordName(pdbentry), name, value);
yyerror(NULL);
return;
}
}
static long createAlias(DBENTRY *pdbentry, const char *alias)
{
DBENTRY tempEntry;
long status;
dbRecordNode *precnode = pdbentry->precnode;
if (precnode->aliasedRecnode) precnode = precnode->aliasedRecnode;
dbInitEntry(pdbentry->pdbbase, &tempEntry);
status = dbFindRecord(&tempEntry, alias);
if (status == 0) {
if (tempEntry.precnode->aliasedRecnode != precnode) {
if (tempEntry.precnode->aliasedRecnode)
fprintf(stderr, ERL_ERROR ": Alias \"%s\" for \"%s\": name already used by an alias for \"%s\"\n",
alias, dbGetRecordName(pdbentry),
tempEntry.precnode->aliasedRecnode->recordname);
else
fprintf(stderr, ERL_ERROR ": Alias \"%s\" for \"%s\": name already used by a record\n",
alias, dbGetRecordName(pdbentry));
status = S_dbLib_recExists;
} else if (dbRecordsOnceOnly) {
fprintf(stderr, ERL_ERROR ": Alias \"%s\" already defined and dbRecordsOnceOnly set.\n",
alias);
status = S_dbLib_recExists;
}
} else {
status = dbCreateAlias(pdbentry, alias);
}
dbFinishEntry(&tempEntry);
return status;
}
static void dbRecordAlias(char *name)
{
DBENTRY *pdbentry;
tempListNode *ptempListNode;
long status;
if(dbRecordNameValidate(name))
return;
if (duplicate) return;
ptempListNode = (tempListNode *)ellFirst(&tempList);
pdbentry = ptempListNode->item;
status = dbCreateAlias(pdbentry, name);
if (status) {
epicsPrintf("Can't create alias \"%s\" for \"%s\"\n",
name, dbGetRecordName(pdbentry));
if (createAlias(pdbentry, name) != 0) {
yyerror(NULL);
return;
}
}
@@ -1280,13 +1320,11 @@ static void dbAlias(char *name, char *alias)
dbInitEntry(savedPdbbase, pdbEntry);
if (dbFindRecord(pdbEntry, name)) {
epicsPrintf("Alias \"%s\" refers to unknown record \"%s\"\n",
fprintf(stderr, "Alias \"%s\" refers to unknown record \"%s\"\n",
alias, name);
yyerror(NULL);
}
else if (dbCreateAlias(pdbEntry, alias)) {
epicsPrintf("Can't create alias \"%s\" referring to \"%s\"\n",
alias, name);
else if (createAlias(pdbEntry, alias) != 0) {
yyerror(NULL);
}
dbFinishEntry(pdbEntry);

View File

@@ -1219,7 +1219,9 @@ long dbNextRecordType(DBENTRY *pdbentry)
char * dbGetRecordTypeName(DBENTRY *pdbentry)
{
return(pdbentry->precordType->name);
dbRecordType *pdbRecordType = pdbentry->precordType;
if(!pdbRecordType) return NULL;
return(pdbRecordType->name);
}
int dbGetNRecordTypes(DBENTRY *pdbentry)
@@ -1477,6 +1479,17 @@ long dbDeleteAliases(DBENTRY *pdbentry)
return 0;
}
static void dbDeleteRecordLinks(dbRecordType *rtyp, struct dbCommon *prec)
{
short i;
for (i=0; i<rtyp->no_links; i++) {
dbFldDes *pflddes = rtyp->papFldDes[rtyp->link_ind[i]];
DBLINK *plink = (DBLINK *)(((char *)prec) + pflddes->offset);
dbFreeLinkContents(plink);
}
}
long dbDeleteRecord(DBENTRY *pdbentry)
{
dbBase *pdbbase = pdbentry->pdbbase;
@@ -1492,6 +1505,7 @@ long dbDeleteRecord(DBENTRY *pdbentry)
preclist = &precordType->recList;
ellDelete(preclist, &precnode->node);
dbPvdDelete(pdbbase, precnode);
dbDeleteRecordLinks(precordType, precnode->precord);
while (!dbFirstInfo(pdbentry)) {
dbDeleteInfo(pdbentry);
}
@@ -2204,12 +2218,12 @@ long dbInitRecordLinks(dbRecordType *rtyp, struct dbCommon *prec)
*/
} else if(dbCanSetLink(plink, &link_info, devsup)!=0) {
errlogPrintf(ERL_ERROR ": %s.%s: can't initialize link type %d with \"%s\" (type %s)\n",
prec->name, pflddes->name, plink->type, plink->text, pamaplinkType[link_info.ltype].strvalue);
errlogPrintf(ERL_ERROR ": %s.%s: can't initialize link type %s with \"%s\" (type %s)\n",
prec->name, pflddes->name, pamaplinkType[plink->type].strvalue, plink->text, pamaplinkType[link_info.ltype].strvalue);
} else if(dbSetLink(plink, &link_info, devsup)) {
errlogPrintf(ERL_ERROR ": %s.%s: failed to initialize link type %d with \"%s\" (type %s)\n",
prec->name, pflddes->name, plink->type, plink->text, pamaplinkType[link_info.ltype].strvalue);
errlogPrintf(ERL_ERROR ": %s.%s: failed to initialize link type %s with \"%s\" (type %s)\n",
prec->name, pflddes->name, pamaplinkType[plink->type].strvalue, plink->text, pamaplinkType[link_info.ltype].strvalue);
}
free(plink->text);
plink->text = NULL;

View File

@@ -66,7 +66,17 @@ void devExtend(dsxt *pdsxt)
pthisDevSup->pdsxt = pdsxt;
}
}
/* Ensure that: sizeof(dbCommonPvt) + pdbRecordType->rec_size
* accounts for necessary alignment of record type struct
*/
typedef struct {
dbCommonPvt prefix;
/* ensure no padding needed... */
dbCommon suffix;
} dbCommonPvtAlignmentTest;
STATIC_ASSERT(offsetof(dbCommonPvtAlignmentTest, suffix)==sizeof(dbCommonPvt));
long dbAllocRecord(DBENTRY *pdbentry,const char *precordName)
{
dbRecordType *pdbRecordType = pdbentry->precordType;
@@ -90,8 +100,8 @@ long dbAllocRecord(DBENTRY *pdbentry,const char *precordName)
precordName, pdbRecordType->name, pdbRecordType->rec_size);
return(S_dbLib_noRecSup);
}
ppvt = dbCalloc(1, offsetof(dbCommonPvt, common) + pdbRecordType->rec_size);
precord = &ppvt->common;
ppvt = dbCalloc(1, sizeof(dbCommonPvt) + pdbRecordType->rec_size);
precord = dbPvt2Rec(ppvt);
ppvt->recnode = precnode;
precord->rdes = pdbRecordType;
precnode->precord = precord;

Some files were not shown because too many files have changed in this diff Show More