summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2016-12-13 19:32:31 -0500
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-12-14 11:32:31 +1100
commitff4c7e6010d728361e3d8e41567b4c78a839e8eb (patch)
tree5924830f9c218c4e8352771069592181bbed2654 /api
parent356d96eea03a754832a2973d35b23f58e85be937 (diff)
downloadmongo-ff4c7e6010d728361e3d8e41567b4c78a839e8eb.tar.gz
WT-3069 Fix LevelDB APIs build failures. (#3193)
Diffstat (limited to 'api')
-rw-r--r--api/leveldb/basho/perf_count.cc9
-rw-r--r--api/leveldb/hyper_wt.cc18
-rw-r--r--api/leveldb/leveldb_wt.h1
3 files changed, 19 insertions, 9 deletions
diff --git a/api/leveldb/basho/perf_count.cc b/api/leveldb/basho/perf_count.cc
index 0e666ac1dc0..97b8cd6dbdf 100644
--- a/api/leveldb/basho/perf_count.cc
+++ b/api/leveldb/basho/perf_count.cc
@@ -19,16 +19,19 @@
// under the License.
//
// -------------------------------------------------------------------
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+#include <errno.h>
#include <limits.h>
+#include <memory.h>
#include <stdio.h>
+
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <syslog.h>
-#include <memory.h>
-#include <errno.h>
#ifndef STORAGE_LEVELDB_INCLUDE_PERF_COUNT_H_
#include "perf_count.h"
@@ -36,8 +39,6 @@
#include "util/coding.h"
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
#ifdef OS_SOLARIS
# include <atomic.h>
diff --git a/api/leveldb/hyper_wt.cc b/api/leveldb/hyper_wt.cc
index 95c82289e18..c12aedc7bad 100644
--- a/api/leveldb/hyper_wt.cc
+++ b/api/leveldb/hyper_wt.cc
@@ -27,6 +27,7 @@
#include "leveldb_wt.h"
#include <errno.h>
+#include <stdlib.h>
#include <sstream>
#include <sys/param.h>
#include <sys/stat.h>
@@ -143,7 +144,14 @@ class ReplayIteratorImpl : public ReplayIterator {
}
private:
- void SeekTo(WT_LSN *lsn);
+ /*
+ * A log sequence number, representing a position in the transaction log.
+ */
+ typedef struct {
+ uint32_t file; /* Log file number */
+ unsigned long long offset; /* Log file offset */
+ } LSN;
+ void SeekTo(LSN *lsn);
// No copying allowed
ReplayIteratorImpl(const ReplayIterator&) { }
void operator=(const ReplayIterator&) { }
@@ -151,7 +159,7 @@ class ReplayIteratorImpl : public ReplayIterator {
Status status_;
WT_CURSOR *cursor_;
WT_ITEM key_, value_;
- WT_LSN lsn_;
+ LSN lsn_;
bool valid_;
uint64_t txnid;
uint32_t fileid, opcount, optype, rectype;
@@ -201,7 +209,7 @@ ReplayIteratorImpl::Next() {
void
ReplayIteratorImpl::SeekToLast() {
int ret = 0;
- WT_LSN last_lsn;
+ LSN last_lsn;
last_lsn.file = 0;
if (cursor_ != NULL) {
@@ -235,7 +243,7 @@ ReplayIteratorImpl::SeekToLast() {
void
ReplayIteratorImpl::SeekTo(const std::string& timestamp) {
- WT_LSN target_lsn;
+ LSN target_lsn;
int ret = 0;
if (timestamp == "all") {
@@ -260,7 +268,7 @@ ReplayIteratorImpl::SeekTo(const std::string& timestamp) {
// Set the cursor on the first modification record at or after the
// given LSN.
void
-ReplayIteratorImpl::SeekTo(WT_LSN *target_lsn) {
+ReplayIteratorImpl::SeekTo(LSN *target_lsn) {
int ret = 0;
valid_ = false;
diff --git a/api/leveldb/leveldb_wt.h b/api/leveldb/leveldb_wt.h
index dc185183034..351eb9f3dda 100644
--- a/api/leveldb/leveldb_wt.h
+++ b/api/leveldb/leveldb_wt.h
@@ -43,6 +43,7 @@
#include "basho/perf_count.h"
#endif
+#include <pthread.h>
#include "wiredtiger.h"
#define WT_URI "table:data"