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
main
Yueh-Hsuan Chiang 10 years ago
parent fabc115690
commit 7b9581bc3b
  1. 2
      db/managed_iterator.h
  2. 4
      util/options.cc
  3. 2
      util/xfunc.cc
  4. 6
      util/xfunc.h

@ -81,4 +81,4 @@ class ManagedIterator : public Iterator {
}; };
} // namespace rocksdb } // namespace rocksdb
#endif // ROCKSDB_LITE #endif // !ROCKSDB_LITE

@ -654,6 +654,8 @@ DBOptions* DBOptions::IncreaseParallelism(int total_threads) {
return this; return this;
} }
#endif // !ROCKSDB_LITE
ReadOptions::ReadOptions() ReadOptions::ReadOptions()
: verify_checksums(true), : verify_checksums(true),
fill_cache(true), fill_cache(true),
@ -680,6 +682,4 @@ ReadOptions::ReadOptions(bool cksum, bool cache)
reinterpret_cast<ReadOptions*>(this)); reinterpret_cast<ReadOptions*>(this));
} }
#endif // ROCKSDB_LITE
} // namespace rocksdb } // namespace rocksdb

@ -3,13 +3,13 @@
// LICENSE file in the root directory of this source tree. An additional grant // 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. // of patent rights can be found in the PATENTS file in the same directory.
#ifdef XFUNC
#include <string> #include <string>
#include "db/db_impl.h" #include "db/db_impl.h"
#include "db/managed_iterator.h" #include "db/managed_iterator.h"
#include "rocksdb/options.h" #include "rocksdb/options.h"
#include "util/xfunc.h" #include "util/xfunc.h"
#ifdef XFUNC
namespace rocksdb { namespace rocksdb {

@ -17,13 +17,15 @@ namespace rocksdb {
* with XFUNC only being set for debug builds. * with XFUNC only being set for debug builds.
*/ */
#if defined(ROCKSDB_XFTEST_FORCE) #if defined(ROCKSDB_XFTEST_FORCE)
#ifndef ROCKSDB_LITE
#if (ROCKSDB_XFTEST_FORCE == 1) #if (ROCKSDB_XFTEST_FORCE == 1)
#define XFUNC #define XFUNC
#endif #endif // ROCKSDB_XFTEST_FORCE == 1
#elif defined(NDEBUG) #elif defined(NDEBUG)
#else #else
#define XFUNC #define XFUNC
#endif #endif // defined(ROCKSDB_XFTEST_FORCE)
#endif // !ROCKSDB_LITE
#ifndef XFUNC #ifndef XFUNC
#define XFUNC_TEST(condition, location, lfname, fname, ...) #define XFUNC_TEST(condition, location, lfname, fname, ...)

Loading…
Cancel
Save