Martin Konrad
f9820577c1
Replace usleep call by nanosleep
...
Also improve behavior in case signals are delivered to the sleeping
thread. This fixes a potential security weakness reported by codacy
(interaction of usleep with SIGALRM and other timer functions such
as sleep(), alarm(), setitimer(), and nanosleep() is unspecified).
2020-03-04 11:19:02 -05:00
Andrew Johnson
dbd6f7e807
Adding tests for epicsThreadClass API
...
Two tests are disabled which hang the parent in the epicsThread destuctor
2020-01-23 14:26:33 -06:00
Michael Davidsaver
f64f84744e
more fun with isinf() and friends.
...
GNU libstdc++ prior to GCC 6.1.0, the overlay math.h always
includes math.h from glibc, which defines isinf() and friends.
GCC 6.1.0 includes a change (6c8ced3f4f867b72a623fe2f23efa204c5786a28)
so that the overlay math.h never includes the glibc math.h
when compiling c++.
The overlay math.h sometimes includes "using std::isinf"
Determined by inspecting libc math.h when building gcc.
2019-12-18 20:30:23 -08:00
Andrew Johnson
475963453c
Merge Martin Konrad's retire-epicsexcept branch into 3.15
2019-12-17 23:48:45 -06:00
Michael Davidsaver
feb938fae2
minor epicsTimerTest
...
(cherry picked from commit 7acd7c6145 )
2019-12-16 13:16:31 -08:00
Michael Davidsaver
e068191684
epicsTimerTest loosen test threshold
...
(cherry picked from commit f955199805 )
2019-12-16 13:16:30 -08:00
Michael Davidsaver
33f2d8c4aa
debug epicsTimerTest
...
(cherry picked from commit 2af0c10470 )
2019-12-16 13:16:29 -08:00
Michael Davidsaver
60a092fa50
posix/epicsMath.h
...
Include "<cmath>" for c++11 and pull in
non-namespace versions of isnan() and friends.
2019-12-16 11:40:13 -08:00
Michael Davidsaver
24f08460bb
Revert "libcom: fix colliding isnan/isinf between C99 and C++0x for gcc-4"
...
This reverts commit 09ec3af337 .
2019-12-16 11:40:13 -08:00
Michael Davidsaver
247fea0fa9
Revert "libcom: properly declare isnan() in C++ code"
...
This reverts commit 2e89a60c2d .
2019-12-16 11:40:13 -08:00
Michael Davidsaver
b0418e5274
epicsSockResolveTest add detail
2019-12-16 11:40:13 -08:00
Ralph Lange
2e89a60c2d
libcom: properly declare isnan() in C++ code
2019-12-11 14:51:16 +01:00
Ralph Lange
09ec3af337
libcom: fix colliding isnan/isinf between C99 and C++0x for gcc-4
...
This fix can be removed once support for gcc-4 is dropped in 2038
2019-12-06 10:52:38 +01:00
Ralph Lange
70e9d46d75
libcom: import some C99 math (isnan etc.) into global namespace
2019-12-05 16:44:59 +01:00
Martin Konrad
b37bfe3ed0
Retire unused epicsExcept.h
...
Due to a syntax error this header has been unusable since 2001
(since 34ea7db15b ), and no one
noticed. Let's remove it.
2019-11-12 12:12:47 -05:00
Andrew Johnson
3881328f2f
Merge branch 'vxworks-tz-support' into 3.15
2019-10-22 15:32:46 -05:00
Michael Davidsaver
73fec88168
replace CALLBACK -> epicsCallback
...
git grep -l -w CALLBACK -- src|xargs sed -i -e 's/\bCALLBACK\b/epicsCallback/g'
with exceptions in callback.h
2019-09-09 16:22:20 -07:00
Michael Davidsaver
2db2f1a53f
Merge remote-tracking branch 'konrad/fix-compiler-warnings' into 3.15
...
* konrad/fix-compiler-warnings:
epicsTime: rely on implicit copy constructor
iocLogServer: check return values
Fix potential buffer overflow in iocLogServer
Fix weird use of strncpy
2019-06-24 18:21:32 -07:00
Andrew Johnson
e75a72ef76
VxWorks: Mark undetected underflow parse test as ToDo
2019-06-07 17:22:40 -05:00
Andrew Johnson
33e099a51b
Fix VxWorks osiSockOptMcastLoop_t => char
...
Repairs osiSockTest
2019-06-07 17:21:18 -05:00
Andrew Johnson
96998f55e0
Have VxWorks call tz2timezone() once clock is sync'd
2019-06-07 14:55:26 -05:00
Andrew Johnson
b57f02ece2
epicsTimeTo[GM]TM(): Allow pNSecDest==NULL
2019-06-07 13:26:24 -05:00
Andrew Johnson
b0db6568ea
Replace EPICS_TIMEZONE envParam with EPICS_TZ
...
Adjust rtems_init() to use it.
2019-06-07 13:24:39 -05:00
Andrew Johnson
30812c23f0
Internal cleanup in osiClockTime.c
2019-06-07 13:17:35 -05:00
Andrew Johnson
5cfff383b2
Synchronization hook support for osiClockTime
2019-06-07 13:16:42 -05:00
Martin Konrad
1f95d0db12
epicsTime: rely on implicit copy constructor
...
When a custom copy constructor is defined the assignment operator
also needs to be defined explicitly. For this simple class the
implicit copy ctor/assignment operator are sufficient, though. This
fixes a warning emitted by GCC9.
2019-04-25 11:00:39 -04:00
Martin Konrad
e02c5c3026
iocLogServer: check return values
...
No serious issues here just fixing some warnings.
2019-04-24 22:25:31 -04:00
Martin Konrad
8e9d75ad71
Fix potential buffer overflow in iocLogServer
2019-04-24 22:25:31 -04:00
Eric Norum
d41355e0fc
Add error checking to the copy-back loop in truncateFile()
2018-12-14 16:06:38 -06:00
Eric Norum
a5aa5459e3
Drop extraneous extern "C"
2018-12-14 16:06:37 -06:00
Eric Norum
6201d37756
Remove epicsTempName() routine
...
It's unsafe and generates obnoxious warnings on modern compilers.
This also replaces internal useage with epicsTempFile().
There appears to be no external code that calls this routine.
2018-12-14 16:06:36 -06:00
Andrew Johnson
49f5527cd7
iocsh: Add protection if realloc() fails
2018-12-06 16:35:30 -06:00
Andrew Johnson
ee90dffd40
Add flush to the iocsh errlog command
2018-12-06 16:33:20 -06:00
Ralph Lange
4e865a03d8
libCom/osi: fix epicsEnvUnset for WIN32 and solaris
2018-10-11 15:12:10 +02:00
Ralph Lange
9a4febd3bc
Merge Dirk Zimoch's 'epicsEnvUnset' branch into 3.15
2018-10-11 11:42:19 +02:00
Ralph Lange
9943796f7f
libCom/osi: fix recent epicsStdio.h change for gcc 2.x
2018-10-08 15:46:50 +02:00
3cb72ec209
Merge branch '3.15' into epicsEnvUnset
...
Conflicts:
documentation/RELEASE_NOTES.html
2018-10-08 11:02:03 +02:00
c3995a9d63
added simple test case for epicsEnvUnset
2018-10-08 10:48:09 +02:00
ce3eadde34
add missing epicsEnvUnset to header
2018-10-08 10:37:34 +02:00
Ralph Lange
d35835659c
libCom/osi: Add epicsStdio functions to std namespace; allow to skip macro magic
...
(fixes lp:1786927)
2018-10-05 10:54:10 +02:00
65714033ea
remove compiler warning
2018-10-03 15:29:30 +02:00
7151fbe498
implement epicsEnvUnset
2018-10-03 15:18:59 +02:00
Andrew Johnson
150d764d28
Merge 3.14.12.8 (+ the Travis fix) into 3.15
2018-09-17 16:15:55 -05:00
Ralph Lange
6a2ed4b333
libcom/osi/windows: log errors using fprintf() instead of pop-up
...
(fixes lp:1785712)
2018-09-05 21:47:25 +02:00
Andrew Johnson
6c5505ad3e
osiClockTime again: Don't compile ClockTimeSync() on iOS either
2018-08-17 13:48:00 -05:00
Andrew Johnson
58d4242b68
osiClockTime: Only call clock_setting() on embedded OSs
...
An update to Apple's XCode broke the iOS build because they have
added Posix CLOCK_REALTIME support since this code was written and
now if you compile a call to clock_settime() it stops the build.
2018-08-17 13:09:33 -05:00
Andrew Johnson
8ffea9de27
Remove macLib warning indicators
...
Only add ',undefined' tags to macLib output when we aren't
suppressing warnings, e.g. using msi's -V flag.
2018-08-10 14:12:19 -05:00
Andrew Johnson
c09b6e2f1b
libCom: Add and use a -o<filename> option to e_flex
...
Note that like the -S option the filename must follow immediately in
the same command-line argument with no space.
2018-07-21 01:47:33 -05:00
Andrew Johnson
f892731b3f
Fix epicsCalcTest for gcc 7.1.0 on minGW
...
Another case where the compile-time evaluation returns +1
but at run-time isnan() returns -1.
2018-06-29 15:03:45 -05:00
Andrew Johnson
ac367398b3
Merge fix for lp: #1747091 from 3.14 into 3.15
2018-02-02 17:49:00 -06:00