move enum Commands into class StreamCore to avoid collisions of enum state wait with function pid_t wait(int*)

This commit is contained in:
2019-02-20 15:11:07 +01:00
parent 7aa1802ec6
commit 26877dedbd
2 changed files with 8 additions and 4 deletions

View File

@ -25,12 +25,10 @@
#define Z PRINTF_SIZE_T_PREFIX #define Z PRINTF_SIZE_T_PREFIX
ENUM (Commands,
end, in, out, wait, event, exec, connect, disconnect);
/// debug functions ///////////////////////////////////////////// /// debug functions /////////////////////////////////////////////
static char* printCommands(StreamBuffer& buffer, const char* c) char* StreamCore::
printCommands(StreamBuffer& buffer, const char* c)
{ {
unsigned long timeout; unsigned long timeout;
unsigned long eventnumber; unsigned long eventnumber;

View File

@ -107,6 +107,9 @@ protected:
ENUM(StartMode, ENUM(StartMode,
StartNormal, StartInit, StartAsync); StartNormal, StartInit, StartAsync);
ENUM (Commands,
end, in, out, wait, event, exec, connect, disconnect);
class MutexLock class MutexLock
{ {
StreamCore* stream; StreamCore* stream;
@ -221,6 +224,9 @@ public:
void printProtocol(FILE* = stdout); void printProtocol(FILE* = stdout);
const char* name() { return streamname; } const char* name() { return streamname; }
void printStatus(StreamBuffer& buffer); void printStatus(StreamBuffer& buffer);
private:
char* printCommands(StreamBuffer& buffer, const char* c);
}; };
#endif #endif