Commit 0a1e0ddb authored by Yoni Fogel's avatar Yoni Fogel

Windows port minor changes

git-svn-id: file:///svn/toku/tokudb@19227 c7de825b-a66e-492c-adef-691d508d4ae1
parent cb428d20
...@@ -281,7 +281,7 @@ dump_block(int f, BLOCKNUM blocknum, struct brt_header *h) { ...@@ -281,7 +281,7 @@ dump_block(int f, BLOCKNUM blocknum, struct brt_header *h) {
unsigned char *vp = toku_malloc(size); unsigned char *vp = toku_malloc(size);
u_int64_t r = pread(f, vp, size, offset); u_int64_t r = pread(f, vp, size, offset);
if (r == (u_int64_t)size) { if (r == (u_int64_t)size) {
printf("%.8s layout_version=%u %u\n", vp, get_unaligned_uint32(vp+8), get_unaligned_uint32(vp+12)); printf("%.8s layout_version=%u %u\n", (char*)vp, get_unaligned_uint32(vp+8), get_unaligned_uint32(vp+12));
verify_block(vp, size); verify_block(vp, size);
} }
toku_free(vp); toku_free(vp);
......
...@@ -1226,7 +1226,7 @@ static void finish_leafnode (struct dbout *out, struct leaf_buf *lbuf, int progr ...@@ -1226,7 +1226,7 @@ static void finish_leafnode (struct dbout *out, struct leaf_buf *lbuf, int progr
int size = header_len + compressed_len; int size = header_len + compressed_len;
if (0) { if (0) {
fprintf(stderr, "uncompressed buf size=%d (amount of data compressed)\n", uncompressed_len); fprintf(stderr, "uncompressed buf size=%d (amount of data compressed)\n", uncompressed_len);
fprintf(stderr, "compressed buf size=%u, off=%lld\n", compressed_len, off_of_leaf); fprintf(stderr, "compressed buf size=%d, off=%lld\n", compressed_len, off_of_leaf);
fprintf(stderr, "compressed bytes are:"); fprintf(stderr, "compressed bytes are:");
//for (int i=0; i<compressed_len; i++) { //for (int i=0; i<compressed_len; i++) {
// unsigned char c = compressed_buf[28+i]; // unsigned char c = compressed_buf[28+i];
......
...@@ -177,7 +177,7 @@ static inline int toku_logsizeof_TXNID (TXNID txnid __attribute__((__unused__))) ...@@ -177,7 +177,7 @@ static inline int toku_logsizeof_TXNID (TXNID txnid __attribute__((__unused__)))
} }
static inline int toku_logsizeof_FILENUMS (FILENUMS fs) { static inline int toku_logsizeof_FILENUMS (FILENUMS fs) {
static const FILENUM f; //fs could have .num==0 and then we cannot dereference static const FILENUM f = {0}; //fs could have .num==0 and then we cannot dereference
return 4 + fs.num * toku_logsizeof_FILENUM(f); return 4 + fs.num * toku_logsizeof_FILENUM(f);
} }
......
#include <toku_portability.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <zlib.h> #include <zlib.h>
#include "toku_portability.h"
#include "toku_assert.h" #include "toku_assert.h"
#include "x1764.h" #include "x1764.h"
#include "sub_block.h" #include "sub_block.h"
......
...@@ -31,8 +31,14 @@ $(notdir $(TLIBTDB)): $(TLIBTDB) ...@@ -31,8 +31,14 @@ $(notdir $(TLIBTDB)): $(TLIBTDB)
SRCS = $(sort $(wildcard *.c)) SRCS = $(sort $(wildcard *.c))
RECOVER_SRCS = $(wildcard recover-*.c) RECOVER_SRCS = $(wildcard recover-*.c)
#Tests that don't compile in windows. SHould
WINDOWS_NOT_PORTED_TESTS = \
diskfull \
#\ ends prev line
#Tests that are irrelevant in windows. #Tests that are irrelevant in windows.
WINDOWS_DONTRUN_TESTS = \ WINDOWS_DONTRUN_TESTS = \
$(WINDOWS_NOT_PORTED_TESTS) \
helgrind1 \ helgrind1 \
helgrind2 \ helgrind2 \
helgrind3 \ helgrind3 \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment