From be55065086d8b3e0cb773a49c3cd15a8f04aa7c1 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Thu, 9 Apr 2015 21:05:09 -0700 Subject: [PATCH] Fixed xfunc related compile errors in ROCKSDB_LITE Summary: Fixed xfunc related compile errors in ROCKSDB_LITE Now make OPT=-DROCKSDB_LITE shared_lib -j32 would work Test Plan: make clean make OPT=-DROCKSDB_LITE shared_lib -j32 make clean make OPT=-DROCKSDB_LITE static_lib -j32 Reviewers: sdong, igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36825 --- db/managed_iterator.h | 2 +- util/options.cc | 4 ++-- util/xfunc.cc | 2 +- util/xfunc.h | 6 ++++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/db/managed_iterator.h b/db/managed_iterator.h index 3a551dff9..00f56aea4 100644 --- a/db/managed_iterator.h +++ b/db/managed_iterator.h @@ -81,4 +81,4 @@ class ManagedIterator : public Iterator { }; } // namespace rocksdb -#endif // ROCKSDB_LITE +#endif // !ROCKSDB_LITE diff --git a/util/options.cc b/util/options.cc index 3b47c3696..b125367dc 100644 --- a/util/options.cc +++ b/util/options.cc @@ -611,6 +611,8 @@ DBOptions* DBOptions::IncreaseParallelism(int total_threads) { return this; } +#endif // !ROCKSDB_LITE + ReadOptions::ReadOptions() : verify_checksums(true), fill_cache(true), @@ -637,6 +639,4 @@ ReadOptions::ReadOptions(bool cksum, bool cache) reinterpret_cast(this)); } -#endif // ROCKSDB_LITE - } // namespace rocksdb diff --git a/util/xfunc.cc b/util/xfunc.cc index aadc8974e..c5d6b5afd 100644 --- a/util/xfunc.cc +++ b/util/xfunc.cc @@ -3,13 +3,13 @@ // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. +#ifdef XFUNC #include #include "db/db_impl.h" #include "db/managed_iterator.h" #include "rocksdb/options.h" #include "util/xfunc.h" -#ifdef XFUNC namespace rocksdb { diff --git a/util/xfunc.h b/util/xfunc.h index 87daa824a..78004cbe0 100644 --- a/util/xfunc.h +++ b/util/xfunc.h @@ -17,13 +17,15 @@ namespace rocksdb { * with XFUNC only being set for debug builds. */ #if defined(ROCKSDB_XFTEST_FORCE) +#ifndef ROCKSDB_LITE #if (ROCKSDB_XFTEST_FORCE == 1) #define XFUNC -#endif +#endif // ROCKSDB_XFTEST_FORCE == 1 #elif defined(NDEBUG) #else #define XFUNC -#endif +#endif // defined(ROCKSDB_XFTEST_FORCE) +#endif // !ROCKSDB_LITE #ifndef XFUNC #define XFUNC_TEST(condition, location, lfname, fname, ...)