fixed sun pro warnings
This commit is contained in:
+2
-2
@@ -33,7 +33,7 @@ threadPrivateId cacRecursionLock;
|
||||
|
||||
static threadOnceId caClientContextIdOnce = OSITHREAD_ONCE_INIT;
|
||||
|
||||
static void ca_client_exit_handler ()
|
||||
extern "C" void ca_client_exit_handler ()
|
||||
{
|
||||
if ( caClientContextId ) {
|
||||
threadPrivateDelete ( caClientContextId );
|
||||
@@ -42,7 +42,7 @@ static void ca_client_exit_handler ()
|
||||
}
|
||||
|
||||
// runs once only for each process
|
||||
static void ca_init_client_context ( void * )
|
||||
extern "C" void ca_init_client_context ( void * )
|
||||
{
|
||||
caClientContextId = threadPrivateCreate ();
|
||||
if ( caClientContextId ) {
|
||||
|
||||
@@ -12,7 +12,7 @@ static bool subsequentConnect = false;
|
||||
|
||||
osiTime begin;
|
||||
|
||||
static void connHandler ( struct connection_handler_args args )
|
||||
extern "C" void caConnTestConnHandler ( struct connection_handler_args args )
|
||||
{
|
||||
if ( args.op == CA_OP_CONN_UP ) {
|
||||
if ( connCount == 0u ) {
|
||||
@@ -71,7 +71,8 @@ void caConnTest ( const char *pNameIn, unsigned channelCountIn, double delayIn )
|
||||
printf ( "creating channels\n" );
|
||||
|
||||
for ( i = 0u; i < channelCount; i++ ) {
|
||||
status = ca_search_and_connect ( pNameIn, &pChans[i], connHandler, 0 );
|
||||
status = ca_search_and_connect ( pNameIn,
|
||||
&pChans[i], caConnTestConnHandler, 0 );
|
||||
SEVCHK ( status, "CA search problems" );
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@
|
||||
#include "nciu_IL.h"
|
||||
#include "ioCounter_IL.h"
|
||||
|
||||
static void cacRecursionLockExitHandler ()
|
||||
extern "C" void cacRecursionLockExitHandler ()
|
||||
{
|
||||
if ( cacRecursionLock ) {
|
||||
threadPrivateDelete ( cacRecursionLock );
|
||||
@@ -29,7 +29,7 @@ static void cacRecursionLockExitHandler ()
|
||||
}
|
||||
}
|
||||
|
||||
static void cacInitRecursionLock ( void * )
|
||||
extern "C" void cacInitRecursionLock ( void * )
|
||||
{
|
||||
cacRecursionLock = threadPrivateCreate ();
|
||||
if ( cacRecursionLock ) {
|
||||
|
||||
+12
-2
@@ -34,6 +34,11 @@ void getCallback::destroy ()
|
||||
delete this;
|
||||
}
|
||||
|
||||
void getCallback::completionNotify ()
|
||||
{
|
||||
cacNotify::completionNotify ();
|
||||
}
|
||||
|
||||
void getCallback::completionNotify ( unsigned type, unsigned long count, const void *pData )
|
||||
{
|
||||
struct event_handler_args args;
|
||||
@@ -46,8 +51,7 @@ void getCallback::completionNotify ( unsigned type, unsigned long count, const v
|
||||
(*this->pFunc) (args);
|
||||
}
|
||||
|
||||
void getCallback::exceptionNotify (int status,
|
||||
const char * /* pContext */)
|
||||
void getCallback::exceptionNotify (int status, const char * /* pContext */)
|
||||
{
|
||||
struct event_handler_args args;
|
||||
args.usr = this->pPrivate;
|
||||
@@ -59,6 +63,12 @@ void getCallback::exceptionNotify (int status,
|
||||
(*this->pFunc) (args);
|
||||
}
|
||||
|
||||
void getCallback::exceptionNotify ( int status, const char *pContext,
|
||||
unsigned type, unsigned long count )
|
||||
{
|
||||
cacNotify::exceptionNotify ( status, pContext, type, count);
|
||||
}
|
||||
|
||||
void * getCallback::operator new ( size_t size )
|
||||
{
|
||||
return getCallback::freeList.allocate ( size );
|
||||
|
||||
+10
-4
@@ -60,8 +60,10 @@ private:
|
||||
caEventCallBackFunc *pFunc;
|
||||
void *pPrivate;
|
||||
~getCallback (); // allocate only out of pool
|
||||
virtual void completionNotify (unsigned type, unsigned long count, const void *pData);
|
||||
virtual void exceptionNotify (int status, const char *pContext);
|
||||
void completionNotify ();
|
||||
void completionNotify (unsigned type, unsigned long count, const void *pData);
|
||||
void exceptionNotify (int status, const char *pContext);
|
||||
void exceptionNotify ( int status, const char *pContext, unsigned type, unsigned long count );
|
||||
static tsFreeList < class getCallback, 1024 > freeList;
|
||||
};
|
||||
|
||||
@@ -78,8 +80,10 @@ private:
|
||||
caEventCallBackFunc *pFunc;
|
||||
void *pPrivate;
|
||||
~putCallback (); // allocate only out of pool
|
||||
virtual void completionNotify ();
|
||||
virtual void exceptionNotify ( int status, const char *pContext );
|
||||
void completionNotify ();
|
||||
void completionNotify ( unsigned type, unsigned long count, const void *pData );
|
||||
void exceptionNotify ( int status, const char *pContext );
|
||||
void exceptionNotify ( int status, const char *pContext, unsigned type, unsigned long count );
|
||||
static tsFreeList < class putCallback, 1024 > freeList;
|
||||
};
|
||||
|
||||
@@ -98,8 +102,10 @@ private:
|
||||
caEventCallBackFunc *pFunc;
|
||||
void *pPrivate;
|
||||
|
||||
void completionNotify ();
|
||||
void completionNotify ( unsigned type, unsigned long count, const void *pData );
|
||||
void exceptionNotify ( int status, const char *pContext );
|
||||
void exceptionNotify ( int status, const char *pContext, unsigned type, unsigned long count );
|
||||
|
||||
~oldSubscription (); // must allocate from pool
|
||||
static tsFreeList < struct oldSubscription, 1024 > freeList;
|
||||
|
||||
@@ -27,7 +27,7 @@ tsFreeList < struct oldChannel, 1024 > oldChannel::freeList;
|
||||
* out so that we will not decrement the pending
|
||||
* recv count in the future.
|
||||
*/
|
||||
static void cacAlreadyConnHandler (struct connection_handler_args)
|
||||
extern "C" void cacAlreadyConnHandler ( struct connection_handler_args )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,11 @@ oldChannel &oldSubscription::channel ()
|
||||
return this->chan;
|
||||
}
|
||||
|
||||
void oldSubscription::completionNotify ()
|
||||
{
|
||||
cacNotify::completionNotify ();
|
||||
}
|
||||
|
||||
void oldSubscription::completionNotify (unsigned type, unsigned long count, const void *pData)
|
||||
{
|
||||
struct event_handler_args args;
|
||||
@@ -39,11 +44,10 @@ void oldSubscription::completionNotify (unsigned type, unsigned long count, cons
|
||||
args.count = count;
|
||||
args.status = ECA_NORMAL;
|
||||
args.dbr = pData;
|
||||
(*this->pFunc) (args);
|
||||
( *this->pFunc ) (args);
|
||||
}
|
||||
|
||||
void oldSubscription::exceptionNotify (int status,
|
||||
const char * /* pContext */ )
|
||||
void oldSubscription::exceptionNotify ( int status, const char * /* pContext */ )
|
||||
{
|
||||
struct event_handler_args args;
|
||||
|
||||
@@ -53,7 +57,13 @@ void oldSubscription::exceptionNotify (int status,
|
||||
args.count = 0;
|
||||
args.status = status;
|
||||
args.dbr = 0;
|
||||
(*this->pFunc) (args);
|
||||
( *this->pFunc ) (args);
|
||||
}
|
||||
|
||||
void oldSubscription::exceptionNotify ( int status, const char *pContext,
|
||||
unsigned type, unsigned long count )
|
||||
{
|
||||
cacNotify::exceptionNotify ( status, pContext, type, count );
|
||||
}
|
||||
|
||||
void oldSubscription::destroy ()
|
||||
|
||||
+13
-2
@@ -47,8 +47,13 @@ void putCallback::completionNotify ()
|
||||
(*this->pFunc) (args);
|
||||
}
|
||||
|
||||
void putCallback::exceptionNotify (int status,
|
||||
const char * /* pContext */ )
|
||||
void putCallback::completionNotify ( unsigned type,
|
||||
unsigned long count, const void *pData )
|
||||
{
|
||||
cacNotify::completionNotify ( type, count, pData );
|
||||
}
|
||||
|
||||
void putCallback::exceptionNotify (int status, const char * /* pContext */ )
|
||||
{
|
||||
struct event_handler_args args;
|
||||
|
||||
@@ -61,6 +66,12 @@ void putCallback::exceptionNotify (int status,
|
||||
(*this->pFunc) (args);
|
||||
}
|
||||
|
||||
void putCallback::exceptionNotify ( int status,
|
||||
const char *pContext, unsigned type, unsigned long count )
|
||||
{
|
||||
cacNotify::exceptionNotify ( status, pContext, type, count );
|
||||
}
|
||||
|
||||
void * putCallback::operator new ( size_t size )
|
||||
{
|
||||
return putCallback::freeList.allocate ( size );
|
||||
|
||||
+19
-19
@@ -267,28 +267,28 @@ epicsShareFunc void epicsShareAPI caStartRepeaterIfNotInstalled ( unsigned repea
|
||||
struct sockaddr_in bd;
|
||||
int flag;
|
||||
|
||||
if ( repeaterPort <= 0xffff ) {
|
||||
tmpSock = socket ( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
|
||||
if ( tmpSock != INVALID_SOCKET ) {
|
||||
ca_uint16_t port = static_cast < ca_uint16_t > ( repeaterPort );
|
||||
memset ( (char *) &bd, 0, sizeof ( bd ) );
|
||||
bd.sin_family = AF_INET;
|
||||
bd.sin_addr.s_addr = htonl ( INADDR_ANY );
|
||||
bd.sin_port = htons ( port );
|
||||
status = bind ( tmpSock, (struct sockaddr *) &bd, sizeof ( bd ) );
|
||||
if ( status < 0 ) {
|
||||
if ( SOCKERRNO == SOCK_EADDRINUSE ) {
|
||||
installed = true;
|
||||
}
|
||||
else {
|
||||
ca_printf ( "caStartRepeaterIfNotInstalled () : bind failed\n");
|
||||
}
|
||||
if ( repeaterPort > 0xffff ) {
|
||||
ca_printf ( "caStartRepeaterIfNotInstalled () : strange repeater port specified\n");
|
||||
return;
|
||||
}
|
||||
|
||||
tmpSock = socket ( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
|
||||
if ( tmpSock != INVALID_SOCKET ) {
|
||||
ca_uint16_t port = static_cast < ca_uint16_t > ( repeaterPort );
|
||||
memset ( (char *) &bd, 0, sizeof ( bd ) );
|
||||
bd.sin_family = AF_INET;
|
||||
bd.sin_addr.s_addr = htonl ( INADDR_ANY );
|
||||
bd.sin_port = htons ( port );
|
||||
status = bind ( tmpSock, (struct sockaddr *) &bd, sizeof ( bd ) );
|
||||
if ( status < 0 ) {
|
||||
if ( SOCKERRNO == SOCK_EADDRINUSE ) {
|
||||
installed = true;
|
||||
}
|
||||
else {
|
||||
ca_printf ( "caStartRepeaterIfNotInstalled () : bind failed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
ca_printf ( "caStartRepeaterIfNotInstalled () : strange repeater port specified\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* turn on reuse only after the test so that
|
||||
|
||||
Reference in New Issue
Block a user