fixed compatibility problems with vxWorks 5.4 gnu compiler

This commit is contained in:
Jeff Hill
2004-09-30 19:15:45 +00:00
parent 23be13bd5b
commit c106bc9740
2 changed files with 10 additions and 11 deletions

View File

@@ -18,15 +18,16 @@
#include "epicsEvent.h"
#include "epicsStdioRedirect.h"
/*
* exception payload
*/
class epicsEvent::invalidSemaphore : public std::exception
// vxWorks 5.4 gcc fails during compile when I use std::exception
using namespace std;
// exception payload
class epicsEvent::invalidSemaphore : public exception
{
const char * what () const;
const char * what () const throw ();
};
const char * epicsEvent::invalidSemaphore:: what () const
const char * epicsEvent::invalidSemaphore::what () const throw ()
{
return "epicsEvent::invalidSemaphore()";
}
@@ -61,7 +62,7 @@ void epicsEvent::wait ()
epicsEventWaitStatus status;
status = epicsEventWait (this->id);
if (status!=epicsEventWaitOK) {
throwWithLocation ( invalidSemaphore () );
throw invalidSemaphore ();
}
}
@@ -74,7 +75,7 @@ bool epicsEvent::wait (double timeOut)
} else if (status==epicsEventWaitTimeout) {
return false;
} else {
throwWithLocation ( invalidSemaphore () );
throw invalidSemaphore ();
}
return false;
}
@@ -88,7 +89,7 @@ bool epicsEvent::tryWait ()
} else if (status==epicsEventWaitTimeout) {
return false;
} else {
throwWithLocation ( invalidSemaphore () );
throw invalidSemaphore ();
}
return false;
}

View File

@@ -23,8 +23,6 @@ typedef enum {epicsEventEmpty,epicsEventFull} epicsEventInitialState;
#ifdef __cplusplus
#include "locationException.h"
class epicsShareClass epicsEvent {
public:
epicsEvent ( epicsEventInitialState initial = epicsEventEmpty );