Commit Graph

30 Commits

Author SHA1 Message Date
Andrew Johnson
2aea693faf Merged Jeff's 3.15_libcom_from_cvs_trunk branch. 2014-08-25 16:27:18 -05:00
Andrew Johnson
b7f8f17227 blockingSockTest: Undo member renames using m_ prefix
Using the m_ prefix to denote class data members is dangerous in
code that has to compile on VxWorks 5.5 (which 3.15 does) because
the net/mbuf.h header contains the following macro definitions:

#define m_next          mBlkHdr.mNext
#define m_len           mBlkHdr.mLen
#define m_data          mBlkHdr.mData
#define m_type          mBlkHdr.mType
#define m_flags         mBlkHdr.mFlags
#define m_nextpkt       mBlkHdr.mNextPkt
#define m_act           m_nextpkt
#define m_pkthdr        mBlkPktHdr
#define m_ext           pClBlk
#define m_extBuf        m_ext->clNode.pClBuf
#define m_extFreeRtn    m_ext->pClFreeRtn
#define m_extSize       m_ext->clSize
#define m_extRefCnt     m_ext->clRefCnt
#define m_extArg1       m_ext->clFreeArg1
#define m_extArg2       m_ext->clFreeArg2
#define m_extArg3       m_ext->clFreeArg3
#define  m_copy(m, o, l)        m_copym((m), (o), (l), M_DONTWAIT)
#define  m_copym(m, o, l, w)    netMblkChainDup(_pNetDpool, (m), (o), (l), (w))
#define  m_freem(m)             netMblkClChainFree(m)
#define  m_free(m)              netMblkClFree(m)    
#define m_mbufs         mNum
#define m_drops         mDrops
#define m_wait          mWait
#define m_drain         mDrain
#define m_mtypes        mTypes

While the names in the original change all appear to be safe, I
don't want us to start using this convention because we will then
have to police commits more closely or risk build failures in the
future when someone who doesn't know about or remember the issue
can't or doesn't try building their code against VxWorks 5.5.

I don't particularly like the this-> convention to mark member
names either, but until the VxWorks 5.5 support requirement goes
away the m_ convention is worse. Another common convention of
using a leading underscore is not safe either, those names are
reserved for the C/C++ implementation.
2014-08-02 14:02:43 -05:00
Andrew Johnson
4b18edc586 Merged changes from 3.14 branch.
Up to revno 12479.
2014-03-13 15:04:31 -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
3fd8d4515c libCom/test: Finish converting blockingSockTest to epicsUnitTest
Don't call assert() from a test program,
it stops the tests from running if the assert fails.
2014-02-20 16:36:58 -06: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
Michael Davidsaver
79bc3f2265 Make blockingSockTest use a free port number
Instead of using the CA server port 5064 which is often
in use, have the listening socket pick a free port.
2012-12-06 14:31:50 -06:00
Jeff Hill
fa24d119dd use verify instead of assert (in tests) 2009-08-24 17:07:03 +00:00
Andrew Johnson
aa530b295b =/== bug; not sure how this got through. 2008-08-25 21:38:10 +00:00
Andrew Johnson
b6ee45dbab Added virtual destructors (in most cases protected) to remove g++ warnings:
'class ...' has virtual functions but non-virtual destructor
2008-07-28 16:19:50 +00:00
Andrew Johnson
11a865805e Make test bail out if socket bind fails; usually there's a CAS running. 2006-12-11 16:52:36 +00:00
Jeff Hill
2fdf182a5d socket related data structures should use socket byte swap 2006-11-18 00:25:54 +00:00
Andrew Johnson
e66768314f Converted to use epicsUntiTest.h. 2006-11-13 20:21:05 +00:00
Andrew Johnson
6c19051727 Major reorganization:
Removed all Main.cpp files, use the macro in testMain.h instead and
defaulted all argc/argv parameters.
Converted all real test programs to use epicsUnitTest.h.
Moved performance measurements from epicsThreadTest to epicsThreadPerform.
Moved epicsOkToBlockTest tests into epicsThreadTest.
On a host arch,  make test  inside the O.arch directory runs all tests.
2006-11-09 22:38:41 +00:00
W. Eric Norum
a16bc712d8 Allow calls from C test harnesses. 2006-10-26 18:10:34 +00:00
Jeff Hill
d50d793467 instantiate server 2005-11-08 16:18:57 +00:00
Jeff Hill
e76362d84b fixed gnu warnings 2004-10-08 17:15:09 +00:00
Jeff Hill
7ecc2d0535 new #include 2004-10-08 15:20:16 +00:00
Jeff Hill
7617d78f36 fixed sunpro warnings 2004-09-24 16:33:42 +00:00
Andrew Johnson
751e52a314 Fix some warnings on solaris-sparc. 2004-06-02 20:55:09 +00:00
Andrew Johnson
becd80c4d8 Patch from Jeff Hill, fixes a Tornado 2.2 build problem. 2004-06-02 20:43:21 +00:00
Jeff Hill
3dff2767c7 fixed gnu compiler detected issues 2004-05-13 20:05:47 +00:00
Jeff Hill
cbcc94ba9e fixed missing ansi header 2004-05-13 19:55:25 +00:00
Jeff Hill
c91c7b32f0 use TCP circuits 2004-05-13 19:53:28 +00:00
Jeff Hill
a4c47660f3 added socket unblock mechanism test 2004-05-13 15:33:23 +00:00
Jeff Hill
800d614eed added socket unblock mechanism test 2004-05-13 15:22:25 +00:00
Jeff Hill
22bc683370 rearranged test order 2004-05-13 15:08:29 +00:00
Jeff Hill
87b4d8db21 added socket unblock mechanism test 2004-05-13 14:48:28 +00:00
Jeff Hill
37958418e4 added socket unblock mechanism test 2004-05-13 14:35:24 +00:00
Jeff Hill
965a511c47 added socket unblock mechanism test 2004-05-12 20:51:25 +00:00