workaround for visual c++ 6.0 not compatible with c++ standards

This commit is contained in:
Jeff Hill
2003-03-19 15:44:31 +00:00
parent f156dbef42
commit 55b51195f4
2 changed files with 7 additions and 6 deletions

View File

@@ -31,6 +31,7 @@ extern "C" void eventCallBack ( struct event_handler_args args )
*/
void caEventRate ( const char *pName, unsigned count )
{
unsigned i;
static const double initialSamplePeriod = 1.0;
static const double maxSamplePeriod = 60.0 * 5.0;
@@ -40,7 +41,7 @@ void caEventRate ( const char *pName, unsigned count )
chid * pChidTable = new chid [ count ];
assert ( pChidTable );
for ( unsigned i = 0u; i < count; i++ ) {
for ( i = 0u; i < count; i++ ) {
int status = ca_search ( pName, & pChidTable[i] );
SEVCHK ( status, NULL );
}
@@ -57,7 +58,7 @@ void caEventRate ( const char *pName, unsigned count )
fflush ( stdout );
unsigned eventCount = 0u;
for ( unsigned i = 0u; i < count; i++ ) {
for ( i = 0u; i < count; i++ ) {
status = ca_add_event ( DBR_FLOAT,
pChidTable[i], eventCallBack, &eventCount, NULL);
SEVCHK ( status, __FILE__ );

View File

@@ -53,16 +53,16 @@ extern "C" void epicsThreadCallEntryPoint ( void * pPvt )
char name [128];
epicsThreadGetName ( pThread->id, name, sizeof ( name ) );
errlogPrintf (
"epicsThread: Unexpected C++ exception \"%s\" - terminating \"%s\"",
"epicsThread: Unexpected C++ exception \"%s\" - terminating thread \"%s\"",
except.what (), name );
std::unexpected ();
return;
}
catch ( ... ) {
char name [128];
epicsThreadGetName ( pThread->id, name, sizeof ( name ) );
errlogPrintf (
"epicsThread: Unknown C++ exception - terminating \"%s\"", name );
std::unexpected ();
"epicsThread: Unknown C++ exception - terminating thread \"%s\"", name );
return;
}
}