mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 19:23:03 +01:00
Misc.
This commit is contained in:
parent
a819439751
commit
e50478c6b6
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user