diff --git a/src/jrd/msg_encode.h b/src/jrd/msg_encode.h index 013aa730e3..e06de2fc7d 100644 --- a/src/jrd/msg_encode.h +++ b/src/jrd/msg_encode.h @@ -44,12 +44,24 @@ const ISC_STATUS CLASS_MASK = 0xF0000000; /* Defines the code as warning, error, * since gds__decode returns the error code, facility, and error type * from a given error message */ -#define ENCODE_ISC_MSG(code, facility) ((facility & 0x1F) << 16) | \ - ((code & 0x3FFF) << 0) | \ - (ISC_MASK) +inline ISC_STATUS ENCODE_ISC_MSG(ISC_STATUS code, USHORT facility) +{ + return (((facility & 0x1F) << 16) | ((code & 0x3FFF) << 0) | ISC_MASK); +} -#define GET_FACILITY(code) (code & FAC_MASK) >> 16 -#define GET_CLASS(code) (code & CLASS_MASK) >> 30 -#define GET_CODE(code) (code & CODE_MASK) >> 0 +inline USHORT GET_FACILITY(ISC_STATUS code) +{ + return (code & FAC_MASK) >> 16; +} + +inline USHORT GET_CLASS(ISC_STATUS code) +{ + return (code & CLASS_MASK) >> 30; +} + +inline ISC_STATUS GET_CODE(ISC_STATUS code) +{ + return (code & CODE_MASK); +} #endif // MSG_ENCODE_H diff --git a/src/jrd/perf.cpp b/src/jrd/perf.cpp index bf048fd608..a9ef4bc2cb 100644 --- a/src/jrd/perf.cpp +++ b/src/jrd/perf.cpp @@ -30,7 +30,6 @@ #include "firebird.h" #include #include -#include "../common/classes/timestamp.h" #include "../jrd/common.h" #include "../jrd/ibase.h" #include "../jrd/perf.h" @@ -38,11 +37,14 @@ #include "../jrd/perf_proto.h" #include "../jrd/gdsassert.h" +#ifdef HAVE_TIME_H +#include +#endif #ifdef HAVE_SYS_TIMES_H #include #endif #ifdef HAVE_SYS_TIMEB_H -# include +#include #endif diff --git a/src/qli/format.cpp b/src/qli/format.cpp index 5128257a94..92ecf86591 100644 --- a/src/qli/format.cpp +++ b/src/qli/format.cpp @@ -24,7 +24,6 @@ #include "firebird.h" #include #include -#include "../common/classes/timestamp.h" #include "../qli/dtr.h" #include "../qli/exe.h" #include "../jrd/ibase.h"