8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 19:23:03 +01:00
This commit is contained in:
dimitr 2008-03-26 10:03:48 +00:00
parent a819439751
commit e50478c6b6
3 changed files with 22 additions and 9 deletions

View File

@ -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

View File

@ -30,7 +30,6 @@
#include "firebird.h"
#include <stdio.h>
#include <limits.h>
#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 <time.h>
#endif
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif
#ifdef HAVE_SYS_TIMEB_H
# include <sys/timeb.h>
#include <sys/timeb.h>
#endif

View File

@ -24,7 +24,6 @@
#include "firebird.h"
#include <stdio.h>
#include <string.h>
#include "../common/classes/timestamp.h"
#include "../qli/dtr.h"
#include "../qli/exe.h"
#include "../jrd/ibase.h"