8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 00:03:03 +01:00

Fixed problems with windows build and database restore - thanks to Dmitry and Vlad

This commit is contained in:
alexpeshkoff 2007-03-27 11:42:51 +00:00
parent 877ebf0a94
commit 8b2db8e685
2 changed files with 7 additions and 7 deletions

View File

@ -95,7 +95,7 @@ const ULONG MAX_TEMPFILE_SIZE = 1073741824; // 1GB
// the size of sr_bckptr in # of 32 bit longwords
#define SIZEOF_SR_BCKPTR_IN_LONGS (SIZEOF_SR_BCKPTR / sizeof(SLONG))
// offset in array of pointers to back record pointer (sr_bckptr)
#define BACK_OFFSET (-(ALIGNMENT / sizeof(SLONG*)))
#define BACK_OFFSET (-(SIZEOF_SR_BCKPTR / sizeof(SLONG*)))
#define DIFF_LONGS(a, b) ((a) - (b))
#define SWAP_LONGS(a, b, t) {t = a; a = b; b = t;}
@ -732,7 +732,7 @@ sort_context* SORT_init(ISC_STATUS* status_vector,
scb->scb_status_vector = status_vector;
//scb->scb_length = record_length;
scb->scb_longs =
ROUNDUP(record_length + ALIGNMENT, ALIGNMENT) >> SHIFTLONG;
ROUNDUP(record_length + SIZEOF_SR_BCKPTR, ALIGNMENT) >> SHIFTLONG;
scb->scb_dup_callback = call_back;
scb->scb_dup_callback_arg = user_arg;
scb->scb_keys = keys;

View File

@ -73,10 +73,7 @@ typedef IPTR sort_ptr_t;
struct sort_record
{
union {
ULONG sort_record_key[1];
UINT64 dummy_alignment_force;
};
ULONG sort_record_key[1];
/* Sorting key. Mangled by diddle_key to
compare using ULONG word compares (size
is rounded upwards if necessary).
@ -111,7 +108,10 @@ const ULONG MAX_SORT_RECORD = 65535; /* bytes */
typedef struct sr
{
sort_record** sr_bckptr; /* Pointer back to sort list entry */
sort_record sr_sort_record;
union {
sort_record sr_sort_record;
UINT64 dummy_alignment_force;
};
} SR;
/* scb_longs includes the size of sr_bckptr. */