diff --git a/include/leveldb/cache.h b/include/leveldb/cache.h index a94c683..2733a10 100644 --- a/include/leveldb/cache.h +++ b/include/leveldb/cache.h @@ -18,6 +18,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_CACHE_H_ #define STORAGE_LEVELDB_INCLUDE_CACHE_H_ +#if __cplusplus + #include #include "leveldb/export.h" @@ -100,4 +102,6 @@ class LEVELDB_EXPORT Cache { } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_CACHE_H_ diff --git a/include/leveldb/comparator.h b/include/leveldb/comparator.h index a85b51e..266fdf7 100644 --- a/include/leveldb/comparator.h +++ b/include/leveldb/comparator.h @@ -5,6 +5,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_ #define STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_ +#if __cplusplus + #include #include "leveldb/export.h" @@ -61,4 +63,6 @@ LEVELDB_EXPORT const Comparator* BytewiseComparator(); } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_ diff --git a/include/leveldb/db.h b/include/leveldb/db.h index a13d147..7f2dd3c 100644 --- a/include/leveldb/db.h +++ b/include/leveldb/db.h @@ -5,6 +5,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_DB_H_ #define STORAGE_LEVELDB_INCLUDE_DB_H_ +#if __cplusplus + #include #include @@ -164,4 +166,6 @@ LEVELDB_EXPORT Status RepairDB(const std::string& dbname, } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_DB_H_ diff --git a/include/leveldb/dumpfile.h b/include/leveldb/dumpfile.h index a58bc6b..b9b0e48 100644 --- a/include/leveldb/dumpfile.h +++ b/include/leveldb/dumpfile.h @@ -5,6 +5,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_ #define STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_ +#if __cplusplus + #include #include "leveldb/env.h" @@ -25,4 +27,6 @@ LEVELDB_EXPORT Status DumpFile(Env* env, const std::string& fname, } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_ diff --git a/include/leveldb/env.h b/include/leveldb/env.h index e00895a..027316d 100644 --- a/include/leveldb/env.h +++ b/include/leveldb/env.h @@ -13,6 +13,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_ENV_H_ #define STORAGE_LEVELDB_INCLUDE_ENV_H_ +#if __cplusplus + #include #include #include @@ -414,4 +416,6 @@ class LEVELDB_EXPORT EnvWrapper : public Env { #endif // defined(UNICODE) #endif // defined(_WIN32) && defined(LEVELDB_DELETEFILE_UNDEFINED) +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_ENV_H_ diff --git a/include/leveldb/filter_policy.h b/include/leveldb/filter_policy.h index 49c8eda..ea8671f 100644 --- a/include/leveldb/filter_policy.h +++ b/include/leveldb/filter_policy.h @@ -16,6 +16,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_ #define STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_ +#if __cplusplus + #include #include "leveldb/export.h" @@ -69,4 +71,6 @@ LEVELDB_EXPORT const FilterPolicy* NewBloomFilterPolicy(int bits_per_key); } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_ diff --git a/include/leveldb/iterator.h b/include/leveldb/iterator.h index bb9a5df..3b98ceb 100644 --- a/include/leveldb/iterator.h +++ b/include/leveldb/iterator.h @@ -15,6 +15,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_ITERATOR_H_ #define STORAGE_LEVELDB_INCLUDE_ITERATOR_H_ +#if __cplusplus + #include "leveldb/export.h" #include "leveldb/slice.h" #include "leveldb/status.h" @@ -109,4 +111,6 @@ LEVELDB_EXPORT Iterator* NewErrorIterator(const Status& status); } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_ITERATOR_H_ diff --git a/include/leveldb/options.h b/include/leveldb/options.h index d755f46..a9f1737 100644 --- a/include/leveldb/options.h +++ b/include/leveldb/options.h @@ -5,6 +5,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_OPTIONS_H_ #define STORAGE_LEVELDB_INCLUDE_OPTIONS_H_ +#if __cplusplus + #include #include "leveldb/export.h" @@ -187,4 +189,6 @@ struct LEVELDB_EXPORT WriteOptions { } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_OPTIONS_H_ diff --git a/include/leveldb/slice.h b/include/leveldb/slice.h index 37cb821..be8a2c8 100644 --- a/include/leveldb/slice.h +++ b/include/leveldb/slice.h @@ -15,6 +15,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_SLICE_H_ #define STORAGE_LEVELDB_INCLUDE_SLICE_H_ +#if __cplusplus + #include #include #include @@ -111,4 +113,6 @@ inline int Slice::compare(const Slice& b) const { } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_SLICE_H_ diff --git a/include/leveldb/status.h b/include/leveldb/status.h index e327314..27163f4 100644 --- a/include/leveldb/status.h +++ b/include/leveldb/status.h @@ -13,6 +13,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_STATUS_H_ #define STORAGE_LEVELDB_INCLUDE_STATUS_H_ +#if __cplusplus + #include #include @@ -119,4 +121,6 @@ inline Status& Status::operator=(Status&& rhs) noexcept { } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_STATUS_H_ diff --git a/include/leveldb/table.h b/include/leveldb/table.h index a30e903..498be5f 100644 --- a/include/leveldb/table.h +++ b/include/leveldb/table.h @@ -5,6 +5,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_TABLE_H_ #define STORAGE_LEVELDB_INCLUDE_TABLE_H_ +#if __cplusplus + #include #include "leveldb/export.h" @@ -81,4 +83,6 @@ class LEVELDB_EXPORT Table { } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_TABLE_H_ diff --git a/include/leveldb/table_builder.h b/include/leveldb/table_builder.h index 85710c3..6a5ad7d 100644 --- a/include/leveldb/table_builder.h +++ b/include/leveldb/table_builder.h @@ -13,6 +13,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_ #define STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_ +#if __cplusplus + #include #include "leveldb/export.h" @@ -90,4 +92,6 @@ class LEVELDB_EXPORT TableBuilder { } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_ diff --git a/include/leveldb/write_batch.h b/include/leveldb/write_batch.h index 94d4115..330f732 100644 --- a/include/leveldb/write_batch.h +++ b/include/leveldb/write_batch.h @@ -21,6 +21,8 @@ #ifndef STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_ #define STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_ +#if __cplusplus + #include #include "leveldb/export.h" @@ -80,4 +82,6 @@ class LEVELDB_EXPORT WriteBatch { } // namespace leveldb +#endif // __cplusplus + #endif // STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_