Commit Graph

314 Commits

Author SHA1 Message Date
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
Andrew Johnson
64c9d7a32a Many tweaks to build on Windows.
There might be some more to come since I'm not committing
this from my Win32 system.
2012-07-17 14:33:31 -05:00
Andrew Johnson
3bfc6dcf64 errlog in tests
Take eltc(0) out of testPlan() and explicitly add it to those tests
that should suppress expected errlog output.
2012-07-06 17:47:56 -05:00
Andrew Johnson
da9982f875 libCom: Fix unsigned overflow limits in epicsParse*
The strtoul() routine accepts negative numbers.  This fix
ensures we handle them properly, and adds suitable tests.

Also fix the test for 1e300, in case the compiler gives a
slightly different literal constant than strtod() returns.
2012-06-30 15:34:29 -05:00
Andrew Johnson
fb61234431 Change the epicsParse APIs to return a units pointer.
This lets us use epicsParseDouble() for scan rate parsing.

Ensure the scanOnce thread is a higher priority than the fastest
periodic scan thread, irrespective of how many threads there are.
2012-06-29 14:41:35 -05:00
Andrew Johnson
fb6dfe6210 merged remove-hpux-artifacts branch 2012-06-22 17:32:10 -05:00
Andrew Johnson
269fb01c63 libCom: Add routines for parsing strings into epicsTypes
Adds new routines for converting numeric strings into the
standard epicsInt8, epicsUInt8, epicsInt16, epicsUInt16,
epicsInt32 and epicsUInt32 types, along with Long, ULong,
Double and Float.  These all provide error checking and
detection of extraneous characters.  The epicsScanDouble
and epicsScanFloat routines originally in epicsStdlib.h
are replaced by macros that call the epicsParse routine,
and this also provides epicsScanLong and epicsScanULong
to match.

A test file is added to ensure conversions work properly
and report appropriate errors.  This file also checks the
native strtod() routine if not used to check whether the
epicsStrtod() code is required on this platform.
2012-06-22 14:06:52 -05:00
Andrew Johnson
c708bb1bac epicsTypes: Added epicsInt64 and epicsUInt64
With size checks for them in epicsTypesTest.
Also added static checks of type sizes there, since we can.
2012-06-08 16:28:31 -05:00
Andrew Johnson
958b40f74c libCom: Silence errlog when running tests
Removes extraneous noise.
2012-06-05 15:53:32 -05:00
Andrew Johnson
cec6aee81b HPUX: Delete void * operator new(size_t) methods
These were apparently needed by the HPUX compiler even though it
never actually executed them.  They are never used.
2012-04-12 11:28:23 -05:00
Andrew Johnson
2a20d48ca4 HPUX: Remove all // X aCC comments
These were added to suppress warnings from the HPUX compiler.
2012-04-12 11:13:50 -05:00
Andrew Johnson
e39c5aad8b libCom: Cleaned up bldEnvData.pl and makeEpicsVersion.pl
Added a -q flag, and cleaned up and simplified the code.
Added -h (help) options, and make more use of other modules.
2012-04-05 17:28:19 -05:00
Michael Davidsaver
5c8e6e9224 libCom: printf spec for cantProceed 2011-10-28 15:30:08 -05:00
Andrew Johnson
dbaa045afc Merged compiler-specific include files branch. 2011-09-01 11:42:37 -05:00
Andrew Johnson
c5212ea23c libCom: epicsVersion.h changes
Make version numbers easier to compare.
2011-08-30 17:50:53 -05:00
Till Straumann
b71aa81a47 - compute and print stack trace (on select architectures) from cantProceed and epicsAssert 2011-08-26 14:40:15 -07:00
Jeff Hill
be1c21fc51 o changed the build system so that we can implement functionality which is compiler specific in a separate file for each compiler. This will avoid accumulating MxN ifdef's where M is the number of OS and N is the number of comilers (worst case). This will make it easier to find code that is compiler specific centralizing all of it under libCom/osi/compiler. That should make it mush easier to port EPICS to run on a new compiler.
o refactored compilerDependencies.h into code that is compiler specific (one libCom/osi/compiler/xxx/compilerDependent.h for each comiler) and code that isnt  libCom/osi/compilerDependencies.h (this is a new location and is no longer in libCom/misc).
2011-08-17 13:57:46 -06:00
Andrew Johnson
2fb7df8548 libCom: __attribute__((deprecated)) not in gcc 2.x
Only apply this attribute for gcc 3 and later.
2011-06-20 13:52:32 -05:00
Michael Davidsaver
f7fc564556 Fold antelope/flex and asHost into libCom
Build lexer and parser from libCom/Makefile.
Since libCom now includes asLib.c and asLib_lex.c we must build
antelope and flex without linking them to Com.  This works because
they only need epicsTempFile anyway.  However make doesn't like a
subdirectory with the same name as a target object, so the antelope
source directory is now called yacc.  The two main.c files were also
renamed to avoid other build problems.

Merge asHost into Com and remove mentions in CONFIG_BASE

Lots of noise since SRCS must be renamed to Com_SRCS
2011-02-25 15:39:44 -06:00