Commit Graph

290 Commits

Author SHA1 Message Date
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
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
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
Andrew Johnson
588ea50bfb Split libCom/Makefile into individual subdirectories.
The new Makefile fragments in the subdirectories are incomplete and will
not work individually.  Build rules are placed in a separate RULES file.
This approach keeps the instructions for building each file local and
easier to find than in a large Makefile in the parent directory.
2011-02-25 00:49:03 -06:00
Michael Davidsaver
4910c76925 move alarm.h to libCom/misc 2010-12-17 14:05:59 -05:00
Andrew Johnson
9a831f9dc5 libCom: Simplify libCom/Makefile by splitting into parts
Each SRC_DIR gets its own Makefile fragment, and where it needs
private build rules a RULES files.

If this pattern gets used elsewhere we could automate the include
lines (search $(SRC_DIRS) for Makefiles and RULES files?).
2010-12-10 15:23:42 -06:00
Andrew Johnson
6f8c946d76 libCom: Recognize -pre and -rc in version snapshot. 2010-10-08 15:17:55 -05:00
Andrew Johnson
fbda9f3280 RCS keyword updates for Bazaar
Replaced $Id$ and $Header$ keywords with $Revision-Id$
Deleted $Log$ keywords and any log messages
2010-10-05 14:27:37 -05:00
Andrew Johnson
5d17059cb1 libCom: Changes to epicsVersion.h generation
Use DEV instead of CVS in names.
Lower-case the -rc<n> status strings.
Rename CVS_DATE to COMMIT_DATE.
No Bazaar equivalent to the CVS tag $Name$ exists.
Modernize and "use strict" in the Perl code.
2010-10-05 13:33:35 -05:00
Andrew Johnson
534ca2c86e Make ellFree() a 1-argument macro, calls ellFree2() with free as freeFunc. 2009-08-28 18:34:38 +00:00
Andrew Johnson
4868904839 Added CONTAINER macro, from Micheal Davidsaver (BNL). 2009-08-04 16:31:06 +00:00
Andrew Johnson
4e0ab97038 (M. Davidsaver): static keyword is part of C89,
remove all uses and internal definitions of LOCAL macro
2009-07-09 16:37:24 +00:00
Andrew Johnson
d7d0531394 offsetof is required by C89 (M. Davidsaver) 2009-07-09 16:19:57 +00:00
Andrew Johnson
d6fcbe14ab Cleaned up dbDefs.h and errMdef.h
Added various #include lines needed in other sources.
2009-07-09 15:27:43 +00:00
Andrew Johnson
a66a192ed5 Expand READONLY macro, deprecate. 2009-06-05 19:56:33 +00:00
Andrew Johnson
f0652aa1b6 allocations MustSucceed 2009-04-23 22:19:46 +00:00
Andrew Johnson
31d149d8d9 Fixed 64 bit compiler warnings from Tom Palaia/MacOS. 2009-04-23 18:49:40 +00:00
Andrew Johnson
d545a8f04f Added test code, fixed bug found in epicsStrnEscapedFromRawSize(). 2009-04-10 19:58:34 +00:00
Andrew Johnson
f3d07ad12f ellLib changes: ANSIfication patch; moved test code out of ellLib.c into
its own unit test program in libCom/test; changed ellFree() to take a
function pointer for the free() routine, so it can be used on Windows;
modified epicsExit and dbBkpt to use it and pass in the free routine.
2009-04-09 16:51:05 +00:00
Andrew Johnson
ca269744a6 Flush result output, allows Test::Harness to display progress. 2009-04-07 21:28:58 +00:00
Ralph Lange
7fccc59fe9 ANSIfication of stuff (mostly missing argument types in declarations) 2009-04-03 17:46:26 +00:00
Andrew Johnson
7228190dde Fix memory leak. 2009-04-03 01:57:11 +00:00
Ralph Lange
433e400c4d Fix in calculating the needed buffer length for escaped strings. 2009-04-02 13:05:42 +00:00
Ralph Lange
73470d5f4c Added new functions to escape non-printable characters. (epicsString) 2009-04-02 02:13:04 +00:00
Andrew Johnson
7eeb70a8d9 Added epicsStrHash() and epicsMemHash(), after analyzing several hash
functions found online and the two already in Base (which both perform
a memory lookup per character and are not as good as this one).
2009-03-19 17:44:22 +00:00
Jeff Hill
c5f15a3e17 fixed bug introduced after R3.14.9, but before R3.14.10-RC1 and R3.14.10-RC2 2008-10-21 20:26:48 +00:00
Jeff Hill
dff447028f improved fix for mantis 316 2008-09-27 01:37:01 +00:00