Commit a9400fb0 authored by Yoni Fogel's avatar Yoni Fogel

closes[t:2427] Fix windows build.

git-svn-id: file:///svn/toku/tokudb@18176 c7de825b-a66e-492c-adef-691d508d4ae1
parent 83f0f54e
......@@ -903,7 +903,14 @@ decompress_work_init(struct decompress_work *dw,
// decompress one block
static void
decompress_block(struct decompress_work *dw) {
if (0) printf("%s:%d %x %p\n", __FUNCTION__, __LINE__, (int) toku_pthread_self(), dw);
if (0) {
union {
toku_pthread_t p;
int i;
} u;
u.p = toku_pthread_self();
printf("%s:%d %x %p\n", __FUNCTION__, __LINE__, u.i, dw);
}
uLongf destlen = dw->uncompress_size;
int r = uncompress(dw->uncompress_ptr, &destlen, dw->compress_ptr, dw->compress_size);
assert(destlen == dw->uncompress_size);
......
......@@ -49,7 +49,7 @@ static int lc_close_cur_logfile(TOKULOGCURSOR lc) {
return 0;
}
static off_t lc_file_len(const char *name) {
static toku_off_t lc_file_len(const char *name) {
toku_struct_stat buf;
int r = toku_stat(name, &buf); assert(r == 0);
return buf.st_size;
......
......@@ -12,14 +12,14 @@ struct work {
// the workset struct contains the set of work to be done by some threads
// the lock protects the work list
struct workset {
pthread_mutex_t lock;
toku_pthread_mutex_t lock;
struct toku_list worklist;
};
static inline void workset_init(struct workset *ws) {
int r = toku_pthread_mutex_init(&ws->lock, NULL); assert(r == 0);
toku_list_init(&ws->worklist);
};
}
static inline void workset_destroy(struct workset *ws) {
assert(toku_list_empty(&ws->worklist));
......
#include <toku_portability.h>
#include <stdio.h>
#include <unistd.h>
......
//rand_s requires _CRT_RAND_S be defined before including stdlib
#define _CRT_RAND_S
#include <toku_portability.h>
#include <stdio.h>
#include <toku_assert.h>
#include <stdint.h>
......
#include <toku_portability.h>
#include <windows.h>
#include <unistd.h>
......
#include <toku_portability.h>
#include <windows.h>
#include <toku_assert.h>
#include <toku_time.h>
......
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