From 96d928fa510dc24c6dc96801ef6d861cf936393e Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Mon, 4 Feb 2002 15:14:43 +0000 Subject: [PATCH] Changes for HP-UX 11 - first semi-stable version --- src/libCom/cxxTemplates/resourceLib.h | 10 +++++----- src/libCom/fdmgr/fdManager.cpp | 3 +-- src/libCom/fdmgr/fdmgr.cpp | 4 ++-- src/libCom/osi/os/posix/osdTime.cpp | 6 ++++-- src/libCom/test/Makefile | 2 -- src/libCom/test/epicsListTest.cpp | 9 ++++++--- src/libCom/test/epicsMutexTest.cpp | 8 +++++--- src/libCom/timer/epicsTimer.h | 12 +++++++----- src/libCom/timer/timerPrivate.h | 2 +- 9 files changed, 31 insertions(+), 25 deletions(-) diff --git a/src/libCom/cxxTemplates/resourceLib.h b/src/libCom/cxxTemplates/resourceLib.h index 89f474584..2acdf2426 100644 --- a/src/libCom/cxxTemplates/resourceLib.h +++ b/src/libCom/cxxTemplates/resourceLib.h @@ -737,7 +737,7 @@ intId::intId (const T &idIn) // intId::operator == () // template -inline bool intId::operator == +inline bool intId::operator == // X aCC 361 (const intId &idIn) const { return this->id == idIn.id; @@ -747,7 +747,7 @@ inline bool intId::operator == // intId::getId () // template -inline const T intId::getId () const +inline const T intId::getId () const // X aCC 361 { return this->id; } @@ -756,7 +756,7 @@ inline const T intId::getId () const // const unsigned intId::minIndexBitWidth () // template -inline const unsigned intId::minIndexBitWidth () +inline const unsigned intId::minIndexBitWidth () // X aCC 361 { return MIN_INDEX_WIDTH; } @@ -766,7 +766,7 @@ inline const unsigned intId::minIndexBitWidth // const unsigned intId::maxIndexBitWidth () // template -inline const unsigned intId::maxIndexBitWidth () +inline const unsigned intId::maxIndexBitWidth () // X aCC 361 { return sizeof (resTableIndex) * CHAR_BIT; } @@ -813,7 +813,7 @@ inline resTableIndex integerHash ( unsigned MIN_INDEX_WIDTH, // intId::hash() // template -inline resTableIndex intId::hash () const +inline resTableIndex intId::hash () const // X aCC 361 { return integerHash ( MIN_INDEX_WIDTH, MAX_ID_WIDTH, this->id ); } diff --git a/src/libCom/fdmgr/fdManager.cpp b/src/libCom/fdmgr/fdManager.cpp index cf925e3bf..564af4c05 100644 --- a/src/libCom/fdmgr/fdManager.cpp +++ b/src/libCom/fdmgr/fdManager.cpp @@ -1,4 +1,3 @@ - // // $Id$ // @@ -94,7 +93,7 @@ epicsShareFunc fdManager::fdManager () : pTimerQueue ( 0 ) assert (status); for ( i=0u; i < sizeof (this->fdSets) / sizeof ( this->fdSets[0u] ); i++ ) { - FD_ZERO ( &this->fdSets[i] ); + FD_ZERO ( &this->fdSets[i] ); // X aCC 392 } this->maxFD = 0; this->processInProg = 0u; diff --git a/src/libCom/fdmgr/fdmgr.cpp b/src/libCom/fdmgr/fdmgr.cpp index d3b926bc6..30c67c31e 100644 --- a/src/libCom/fdmgr/fdmgr.cpp +++ b/src/libCom/fdmgr/fdmgr.cpp @@ -234,7 +234,7 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_clear_timeout (fdctx *pfdctx, return 0; } -extern "C" epicsShareFunc int epicsShareAPI fdmgr_add_callback ( +extern "C" epicsShareFunc int epicsShareAPI fdmgr_add_callback ( // X aCC 361 fdctx *pfdctx, SOCKET fd, enum fdi_type fdi, pCallBackFDMgr pFunc, void *pParam) { oldFdmgr *pfdm = static_cast (pfdctx); @@ -276,7 +276,7 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_add_callback ( } } -extern "C" epicsShareFunc int epicsShareAPI fdmgr_clear_callback ( +extern "C" epicsShareFunc int epicsShareAPI fdmgr_clear_callback ( // X aCC 361 fdctx *pfdctx, SOCKET fd, enum fdi_type fdi) { oldFdmgr *pfdm = static_cast (pfdctx); diff --git a/src/libCom/osi/os/posix/osdTime.cpp b/src/libCom/osi/os/posix/osdTime.cpp index 2c78f4436..c8ee473bd 100644 --- a/src/libCom/osi/os/posix/osdTime.cpp +++ b/src/libCom/osi/os/posix/osdTime.cpp @@ -49,7 +49,8 @@ extern "C" epicsShareFunc int epicsShareAPI epicsTimeGetEvent (epicsTimeStamp *p return epicsTimeERROR; } -int epicsTime_gmtime ( const time_t *pAnsiTime, struct tm *pTM ) +int epicsTime_gmtime ( const time_t *pAnsiTime, // X aCC 361 + struct tm *pTM ) { struct tm * pRet = gmtime_r ( pAnsiTime, pTM ); if ( pRet ) { @@ -60,7 +61,8 @@ int epicsTime_gmtime ( const time_t *pAnsiTime, struct tm *pTM ) } } -int epicsTime_localtime ( const time_t *clock, struct tm *result ) +int epicsTime_localtime ( const time_t *clock, // X aCC 361 + struct tm *result ) { struct tm * pRet = localtime_r ( clock, result ); if ( pRet ) { diff --git a/src/libCom/test/Makefile b/src/libCom/test/Makefile index 08f29b04c..590f30a46 100644 --- a/src/libCom/test/Makefile +++ b/src/libCom/test/Makefile @@ -4,8 +4,6 @@ include $(TOP)/configure/CONFIG PROD_LIBS += Com -USR_LIBS_hpux += cma - #epicsListTest_SRCS += epicsListTest.cpp PROD_HOST += epicsListTest #epicsListTest build fails for vxWorks-ppc604 on win32-x86 host diff --git a/src/libCom/test/epicsListTest.cpp b/src/libCom/test/epicsListTest.cpp index c1408ca75..271523418 100644 --- a/src/libCom/test/epicsListTest.cpp +++ b/src/libCom/test/epicsListTest.cpp @@ -5,7 +5,10 @@ // Test code for the epics::List class #include "epicsList.h" -#include +#include + +using std::cout; +using std::endl; #ifdef vxWorks #define MAIN epicsListTest @@ -41,10 +44,10 @@ int MAIN(int /*argc*/, char* /*argv[]*/) { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }; int i; - + for (i=0; i<10; i++) apf[i] = new fred(names[i]); - + epicsList Fred; test(Fred.empty()); test(Fred.size() == 0); diff --git a/src/libCom/test/epicsMutexTest.cpp b/src/libCom/test/epicsMutexTest.cpp index c540d3df7..02eb99bd7 100644 --- a/src/libCom/test/epicsMutexTest.cpp +++ b/src/libCom/test/epicsMutexTest.cpp @@ -2,7 +2,7 @@ /* * Author: Marty Kraimer Date: 26JAN2000 - * Jeff HIll (added mutex performance test ) + * Jeff Hill (added mutex performance test ) */ /********************COPYRIGHT NOTIFICATION********************************** @@ -135,7 +135,7 @@ void verifyTryLock () epicsThreadCreate ( "verifyTryLockThread", 40, epicsThreadGetStackSize(epicsThreadStackSmall), - (EPICSTHREADFUNC )verifyTryLockThread, &verify ); + verifyTryLockThread, &verify ); epicsEventWait ( verify.done ); @@ -196,7 +196,9 @@ extern "C" void epicsMutexTest(int nthreads,int verbose) pinfo[i]->threadnum = i; pinfo[i]->mutex = mutex; arg[i] = pinfo[i]; - id[i] = epicsThreadCreate(name[i],40,stackSize,(EPICSTHREADFUNC)mutexThread,arg[i]); + id[i] = epicsThreadCreate(name[i],40,stackSize, + mutexThread, + arg[i]); printf("semTest created mutexThread %d id %p time %ld\n", i, id[i],time(&tp)); } diff --git a/src/libCom/timer/epicsTimer.h b/src/libCom/timer/epicsTimer.h index 410417d67..009fc8eaf 100644 --- a/src/libCom/timer/epicsTimer.h +++ b/src/libCom/timer/epicsTimer.h @@ -44,7 +44,7 @@ public: virtual epicsShareFunc void show ( unsigned int level ) const; }; -class epicsTimer { +class epicsTimer { // X aCC 655 public: virtual void destroy () = 0; // requires existence of timer queue virtual void start ( epicsTimerNotify &, const epicsTime & ) = 0; @@ -62,7 +62,7 @@ protected: virtual ~epicsTimer () = 0; // use destroy }; -class epicsTimerQueue { +class epicsTimerQueue { // X aCC 655 public: virtual epicsTimer & createTimer () = 0; virtual void show ( unsigned int level ) const = 0; @@ -70,7 +70,8 @@ protected: virtual ~epicsTimerQueue () = 0; }; -class epicsTimerQueueActive : public epicsTimerQueue { +class epicsTimerQueueActive // X aCC 655 + : public epicsTimerQueue { public: static epicsShareFunc epicsTimerQueueActive & allocate ( bool okToShare, unsigned threadPriority = epicsThreadPriorityMin + 10 ); @@ -79,7 +80,7 @@ protected: virtual ~epicsTimerQueueActive () = 0; }; -class epicsTimerQueueNotify { +class epicsTimerQueueNotify { // X aCC 655 public: // called when a new timer is inserted into the queue and the // delay to the next expire has changed @@ -88,7 +89,8 @@ protected: virtual ~epicsTimerQueueNotify () = 0; }; -class epicsTimerQueuePassive : public epicsTimerQueue { +class epicsTimerQueuePassive // X aCC 655 + : public epicsTimerQueue { public: static epicsShareFunc epicsTimerQueuePassive & create ( epicsTimerQueueNotify & ); virtual ~epicsTimerQueuePassive () = 0; diff --git a/src/libCom/timer/timerPrivate.h b/src/libCom/timer/timerPrivate.h index 532c60bb0..364ec18ac 100644 --- a/src/libCom/timer/timerPrivate.h +++ b/src/libCom/timer/timerPrivate.h @@ -99,7 +99,7 @@ private: friend class timer; }; -class timerQueueActiveMgrPrivate { +class timerQueueActiveMgrPrivate { // X aCC 655 public: timerQueueActiveMgrPrivate (); protected: