Commit 169f88f8 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #2116 refs[t:2116] Fix windows build.

git-svn-id: file:///svn/toku/tokudb@15431 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9aae344a
...@@ -175,7 +175,7 @@ static int close_and_open_logfile (TOKULOGGER logger) { ...@@ -175,7 +175,7 @@ static int close_and_open_logfile (TOKULOGGER logger) {
} }
static int static int
max (int a, int b) max_int (int a, int b)
{ {
if (a>b) return a; if (a>b) return a;
return b; return b;
...@@ -219,7 +219,7 @@ toku_logger_make_space_in_inbuf (TOKULOGGER logger, int n_bytes_needed) ...@@ -219,7 +219,7 @@ toku_logger_make_space_in_inbuf (TOKULOGGER logger, int n_bytes_needed)
// the inbuf is empty. Is it big enough? // the inbuf is empty. Is it big enough?
if (n_bytes_needed > logger->inbuf.buf_size) { if (n_bytes_needed > logger->inbuf.buf_size) {
assert(n_bytes_needed < (1<<30)); // it seems unlikely to work if a logentry gets that big. assert(n_bytes_needed < (1<<30)); // it seems unlikely to work if a logentry gets that big.
int new_size = max(logger->inbuf.buf_size * 2, n_bytes_needed); // make it at least twice as big, and big enough for n_bytes int new_size = max_int(logger->inbuf.buf_size * 2, n_bytes_needed); // make it at least twice as big, and big enough for n_bytes
assert(new_size < (1<<30)); assert(new_size < (1<<30));
XREALLOC_N(new_size, logger->inbuf.buf); XREALLOC_N(new_size, logger->inbuf.buf);
logger->inbuf.buf_size = new_size; logger->inbuf.buf_size = new_size;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.DEFAULT_GOAL= build .DEFAULT_GOAL= build
TOKUROOT=../ TOKUROOT=../
INCLUDEDIRS=-I. -I$(TOKUROOT)toku_include -I$(TOKUROOT)include -I$(TOKUROOT)src INCLUDEDIRS=-I. -I$(TOKUROOT)toku_include -I$(TOKUROOT)include -I$(TOKUROOT)newbrt -I$(TOKUROOT)src
DEPEND_COMPILE += \ DEPEND_COMPILE += \
./*.h \ ./*.h \
#end #end
......
...@@ -22,7 +22,7 @@ typedef pthread_cond_t toku_pthread_cond_t; ...@@ -22,7 +22,7 @@ typedef pthread_cond_t toku_pthread_cond_t;
typedef pthread_rwlock_t toku_pthread_rwlock_t; typedef pthread_rwlock_t toku_pthread_rwlock_t;
typedef pthread_rwlockattr_t toku_pthread_rwlockattr_t; typedef pthread_rwlockattr_t toku_pthread_rwlockattr_t;
#else #else
#include <rwlock.h> #include "../newbrt/rwlock.h"
typedef struct toku_pthread_rwlock_struct { typedef struct toku_pthread_rwlock_struct {
struct rwlock rwlock; struct rwlock rwlock;
toku_pthread_mutex_t mutex; toku_pthread_mutex_t mutex;
......
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