]> hackdaworld.org Git - hdw-linux/hdw-linux.git/blob - packages/base/bdb/lock.patch
fixed kern ver for toolchain glibc build
[hdw-linux/hdw-linux.git] / packages / base / bdb / lock.patch
1 *** ./lock/lock.c.save  2004-01-30 10:48:33.000000000 -0800
2 --- ./lock/lock.c       2004-01-30 10:55:58.000000000 -0800
3 ***************
4 *** 2216,2226 ****
5                                         dp = (u_int8_t *)dp +           \
6                                             sizeof(db_pgno_t);          \
7                                 } while (0)
8 ! #define COPY_OBJ(dp, obj)     do {                                       \
9 !                                       memcpy(dp, obj->data, obj->size);  \
10 !                                       dp = (u_int8_t *)dp +              \
11 !                                            ALIGN(obj->size,              \
12 !                                            sizeof(u_int32_t));           \
13                                 } while (0)
14   
15   #define GET_COUNT(dp, count)  do {                                    \
16 --- 2216,2227 ----
17                                         dp = (u_int8_t *)dp +           \
18                                             sizeof(db_pgno_t);          \
19                                 } while (0)
20 ! #define COPY_OBJ(dp, obj)     do {                                    \
21 !                                       memcpy(dp,                      \
22 !                                           (obj)->data, (obj)->size);  \
23 !                                       dp = (u_int8_t *)dp +           \
24 !                                            ALIGN((obj)->size,         \
25 !                                           sizeof(u_int32_t));         \
26                                 } while (0)
27   
28   #define GET_COUNT(dp, count)  do {                                    \
29 ***************
30 *** 2339,2345 ****
31                 for (i = 0; i < nlocks; i = j) {
32                         PUT_PCOUNT(dp, obj[i].ulen);
33                         PUT_SIZE(dp, obj[i].size);
34 !                       COPY_OBJ(dp, obj);
35                         lock = (DB_LOCK_ILOCK *)obj[i].data;
36                         for (j = i + 1; j <= i + obj[i].ulen; j++) {
37                                 lock = (DB_LOCK_ILOCK *)obj[j].data;
38 --- 2340,2346 ----
39                 for (i = 0; i < nlocks; i = j) {
40                         PUT_PCOUNT(dp, obj[i].ulen);
41                         PUT_SIZE(dp, obj[i].size);
42 !                       COPY_OBJ(dp, &obj[i]);
43                         lock = (DB_LOCK_ILOCK *)obj[i].data;
44                         for (j = i + 1; j <= i + obj[i].ulen; j++) {
45                                 lock = (DB_LOCK_ILOCK *)obj[j].data;