Commit Graph

332 Commits

Author SHA1 Message Date
Ralph Lange
23fd4e202b ca: Fix client bug (race condition) in ipAddrToAsciiEngine 2016-05-25 12:26:32 +02:00
Andrew Johnson
04a9fdb4e3 Clean up warnings from gcc 5.2 2016-05-16 17:02:34 -05:00
Andrew Johnson
5a605fa0c3 Set various EPICS_VERSION_* environment variables
These are set at the same time as the ARCH variable.
Had to add EPICS_VERSION_SHORT and EPICS_VERSION_FULL to epicsVersion.h.

This uses more uniform names, should we change epicsVersion.h names?
We would continue to support the old names in parallel for some time.
2016-04-28 18:58:07 -05:00
Andrew Johnson
76c422c5fd Merge Cygwin fix from 3.14, fix in rsrv too 2016-02-26 17:10:35 -06:00
Andrew Johnson
fee62836cd Use OS __CYGWIN__ macro, deprecate our CYGWIN32 2016-02-26 16:27:13 -06:00
Andrew Johnson
5ee778b0c2 Merged changes from Base-3.14, to revno 12613 2016-02-25 14:13:40 -06:00
Michael Davidsaver
04fee51795 ipAddrToAsciiAsync.: don't try to join the daemon thread
This isn't really necessary and may unnecessarily delay
things (~10 sec. on Linux) if a query to an unreachable
DNS server is in progress.
2016-01-21 13:00:50 -05:00
Andrew Johnson
83c2414ad0 Merged changes from 3.14 branch to revno 12594 2015-07-23 10:13:07 -05:00
Andrew Johnson
002bafdf07 Add testHarnessDone 2015-07-17 18:06:58 -05:00
Andrew Johnson
e8c9783e06 Merged changes from 3.14 branch up to revno 12530 2015-03-02 10:35:35 -06:00
Andrew Johnson
dda4eb3a58 Fix more MS idiocy
Windows has signed characters, but if you pass a negative
value (i.e. a character with value >= 0x80) into the debug
version of its isprint() runtime library function it asserts.
2015-02-18 16:36:42 -06:00
Andrew Johnson
30b789aa49 Fix epicsStrnEscapedFromRaw() and epicsStrnRawFromEscaped()
Major rewrites; the original epicsStrnRawFromEscaped() could read
beyond the end of the input buffer if the input count ended in the
middle of an octal or hex escape sequence. Zero termination did not
always match the return count, and hex escapes were always 2 digits,
contrary to the C standard.

New versions don't use epicsSnprintf() or sscanf() for hex and octal
conversions, so should be slightly faster.

Added 81 new tests to check the above issues.
2014-12-01 11:34:58 -06:00
Michael Davidsaver
924350b362 epicsExit: add epicsExitLater() to trigger process exit without blocking 2014-11-13 11:58:35 -05:00
Andrew Johnson
6f7fc7bf8e Merged changes from 3.14 branch
Up to revno 12504.
2014-11-07 15:57:13 -06:00
Andrew Johnson
2ab2470317 Fix epicsStrtod() implementation to detect overflow
The VxWorks version of strtod() that we use returns Inf
instead of setting errno on overflow.
2014-11-07 13:25:16 -06:00
Andrew Johnson
53d9a07f64 Fix buffer overflow in epicsStrnRawFromEscaped
lp:1388313
2014-11-05 10:06:02 -06:00
Andrew Johnson
79b70d651c Flag epicsBoolean with EPICS_DEPRECATED 2014-10-31 17:26:48 -05:00
Andrew Johnson
6c14dc194c Replace the epicsBoolean type in epicsTypes.h 2014-10-30 14:40:19 -05:00
Andrew Johnson
97e445f78d Merged epicsInt64-library-support branch 2014-10-06 20:28:35 -05:00
Andrew Johnson
abc3417623 Merged stacktrace-1 branch 2014-09-26 12:46:16 -05:00
Andrew Johnson
7a9407d7ab libCom: Clean up MS compiler warnings.
This doesn't fix the Microsoft link failure though, that may
need an upgrade of MS Visual Studio on our Hudson Windows VM.
2014-09-04 11:07:59 -05:00
Till Straumann
32c6888e1b - removed message about a stack trace going to be printed 2014-08-29 15:02:20 -07:00
Till Straumann
ccb5be72dd - consistent naming: 'StackTrace' everywhere... 2014-08-28 10:49:22 -07:00
Andrew Johnson
7629cf818a Add epicsScanLLong and epicsScanULLong macros and tests. 2014-08-27 23:29:19 -07:00
Andrew Johnson
b0cdaddebc Added 64bit and long long epicsParse* functions 2014-08-27 22:21:30 -07:00
Andrew Johnson
2aea693faf Merged Jeff's 3.15_libcom_from_cvs_trunk branch. 2014-08-25 16:27:18 -05:00
Andrew Johnson
5e0bf53fec epicsTypes.h: Don't use C99 types
The __STDC_VERSION__ >= 199901L test never succeeds
in C++, and there were issues with the epicsInt8
definition anyway (int8_t is signed, but char might
not be).

I also removed the epicsBoolean enum which we never use.
2014-08-15 12:24:31 -05:00
Andrew Johnson
f1a59aa64a Use epicsUInt types, stdint.h is not found on all platforms 2014-08-02 13:09:07 -05:00
Andrew Johnson
68bcc77885 Merged alarm-strings branch. 2014-07-31 10:17:24 -05:00
Andrew Johnson
3ff49fc9b2 Fixed build errors, remove dependency on std.
Build errors: Include guard missing from epicsUnitTest.h;
    dbShutdownTest.c was calling the non-universal strcasecmp()
    instead of epicsStrCaseCmp().

ioc/db/test no longer depends on std. I modified
    xRecord to make it a working record type, and simplified the
    other test programs so they all use the same new expanded
    dbd file rather than each making their own. I also added
    dbShutdownTest() to epicsRunDbTests().
2014-07-10 14:27:44 -05:00
Andrew Johnson
60a0c7f181 Make epicsExit subsystem reusable.
Calling epicsAtExit() after epicsExitCallAtExits() now
recreates the per-process list and registers the routine.
2014-06-23 16:28:25 -04:00
Michael Davidsaver
a28a561d8a epicsExit: optional debug printing
Add a flag to cause a string to be printed
before each handler is run to show the order.
2014-06-23 16:28:18 -04:00
Andrew Johnson
4b18edc586 Merged changes from 3.14 branch.
Up to revno 12479.
2014-03-13 15:04:31 -05:00
Andrew Johnson
f5b9db9583 libCom: Fix epicsString.h comparison functions
The string comparison functions epicsStrCaseCmp() and
epicsStrnCaseCmp() were returning incorrect results
when the strings did not match.

These functions now match their BSD equivalents, and
have working tests to confirm their operation.
2014-03-11 17:12:41 -05:00
Andrew Johnson
5bdd9ddca6 Windows: Fix static builds on MinGW
Xiaoqiang Wang proposed some fixes that allow static builds on
the MinGW targets to succeed. Some additional changes made to
blockingSockTest.cpp also clean that up.
2014-02-25 15:56:13 -06:00
Andrew Johnson
502366fdc3 epicsMutex C++ API: New constructor and newEpicsMutex macro
The new constructor accepts source file & line number.
The macro passes these in.
2014-02-07 14:13:12 -06:00
Andrew Johnson
97636a45e0 libCom: Remove epicsShareAPI from epicsExit APIs
Passing epicsExitCallAtExits into atexit() was generating
a warning about passing in a __stdcall routine pointer.
2013-12-16 14:52:29 -06:00
Andrew Johnson
78a4e462d5 libCom: Recognize hex literals in epicsStrtod()
Allows Windows and VxWorks to accept hex integers as a double.
2013-12-02 11:12:19 -06:00
Andrew Johnson
4d64941bd2 libCom: truncateFile size arg should be unsigned long
It gets compared against LONG_MAX and cast to a long, so now
we have architectures where int != long we must distinguish them
2013-11-15 17:24:33 -06:00
Andrew Johnson
f146f9ea6e Move the string array declarations into alarm.h
This also removes all internal use of alarmString.h which
is now deprecated again (see 3.14.5, Jan 2004).
2013-11-12 16:18:17 -06:00
Jeff Hill
6f67091628 fixed ms compiler build 2013-11-07 17:37:17 -07:00
Jeff Hill
4d54b91a3a o fixed compile errors in, and proper diagnostic from, casPVI.cc
o suprressed some compile time warnings in bucketLib.c
o cleaned up cxx templates README
o removed use of tsMinMax from libCom in favor of the standard library 
     (calls to  tsMinMax still exist in other components in base, but they are being removed)
o removed sharable library export of certain private member functions from class fdManager
o fixed aToIPAddr to correctly lookup all of the different IP addresses string types on all OS types
    independent of the OS interfae variations
o removed use of inet_aton from vxWorks implementation of hostToIPAddr
   o this function is for converting a host name to an ip address _only_
   o the aToIPAddr wrapper is supposed to do the dotted ip ascii string to ip address structure 
   conversion independent of OS spoecific interface variations, when it works correctly
o fixed some spelling issues in comments
o added additional optimizations for processors w/o floating point ALU to addNanoSec in epicsTime
o removed tabs and junk comments from win32 osdProcess.c
o moved PLL update in win32 osdTime.c from timer to a dedicated thread
o added missing epicsExportShared symbols define to osiNTPTime.c
o fixed server ctor should not modify arguments of its caller in blockingSockTest
o removed sunpro specific ifdef nolomger needed from epicsTimeTest.cpp
2013-11-07 10:26:03 -07:00
Andrew Johnson
2ecf8803c3 Move alarm string arrays into libCom
Using idea from Peter Heesterman:
 * Instanciate the alarm strings once in libCom
 * Remove the epicsAlarmGlobal macro
 * Make sure the decorations are right
2013-08-20 16:59:28 -05:00
Andrew Johnson
2be5e15346 Merged changes from 3.14 branch
Up to revno 12420 inclusive.
2013-06-07 18:08:38 -05:00
Andrew Johnson
ef5d88d3e5 libCom: Back-ported aToIPAddr fix from 3.15 branch.
Cherry-picked 3.15 revno 12398 with some changes.
2013-06-07 17:03:55 -05:00
Andrew Johnson
5bc15b72a1 libCom: Add some missing #include guards.
There are still quite a few missing in libCom/osi/os/*
2013-04-11 12:56:56 -05:00
Michael Davidsaver
f5b7693a58 libCom: aToIPAddr() finds numeric hostnames
Hostnames that begin with one or more digits were not being looked up
by name, causing problems at BNL.
This commit also changes the vxWorks implementation of hostToIPAddr()
to use inet_aton() instead of inet_addr().
2013-01-04 09:33:13 -06:00
Andrew Johnson
d9013bffe9 libCom: Expand comments on -fvisibility in shareLib.h 2012-08-03 17:37:15 -05:00
Andrew Johnson
97490f6977 Reworking of DLL build rules.
Allows static libraries and DLLs to be built without having
to do a 'make clean' in between on Cygwin and MinGW targets.
The Cygwin build still crashes when SHARED_LIBRARIES = YES
though, loading Com.dll seems to cause the problem.
2012-07-27 16:24:39 -05:00
Andrew Johnson
7f04d825ce Add some missing epicsShareClass decorations.
Also set the gcc-4 visibility attribute in shareLib.h
2012-07-17 23:41:06 -05:00