Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Swift Package Manager support #1189

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/leveldb/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_CACHE_H_
#define STORAGE_LEVELDB_INCLUDE_CACHE_H_

#if __cplusplus

#include <cstdint>

#include "leveldb/export.h"
Expand Down Expand Up @@ -100,4 +102,6 @@ class LEVELDB_EXPORT Cache {

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_CACHE_H_
4 changes: 4 additions & 0 deletions include/leveldb/comparator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_
#define STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_

#if __cplusplus

#include <string>

#include "leveldb/export.h"
Expand Down Expand Up @@ -61,4 +63,6 @@ LEVELDB_EXPORT const Comparator* BytewiseComparator();

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_
4 changes: 4 additions & 0 deletions include/leveldb/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_DB_H_
#define STORAGE_LEVELDB_INCLUDE_DB_H_

#if __cplusplus

#include <cstdint>
#include <cstdio>

Expand Down Expand Up @@ -164,4 +166,6 @@ LEVELDB_EXPORT Status RepairDB(const std::string& dbname,

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_DB_H_
4 changes: 4 additions & 0 deletions include/leveldb/dumpfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
#define STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_

#if __cplusplus

#include <string>

#include "leveldb/env.h"
Expand All @@ -25,4 +27,6 @@ LEVELDB_EXPORT Status DumpFile(Env* env, const std::string& fname,

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
4 changes: 4 additions & 0 deletions include/leveldb/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_ENV_H_
#define STORAGE_LEVELDB_INCLUDE_ENV_H_

#if __cplusplus

#include <cstdarg>
#include <cstdint>
#include <string>
Expand Down Expand Up @@ -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_
4 changes: 4 additions & 0 deletions include/leveldb/filter_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_
#define STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_

#if __cplusplus

#include <string>

#include "leveldb/export.h"
Expand Down Expand Up @@ -69,4 +71,6 @@ LEVELDB_EXPORT const FilterPolicy* NewBloomFilterPolicy(int bits_per_key);

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_
4 changes: 4 additions & 0 deletions include/leveldb/iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -109,4 +111,6 @@ LEVELDB_EXPORT Iterator* NewErrorIterator(const Status& status);

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_ITERATOR_H_
4 changes: 4 additions & 0 deletions include/leveldb/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
#define STORAGE_LEVELDB_INCLUDE_OPTIONS_H_

#if __cplusplus

#include <cstddef>

#include "leveldb/export.h"
Expand Down Expand Up @@ -187,4 +189,6 @@ struct LEVELDB_EXPORT WriteOptions {

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
4 changes: 4 additions & 0 deletions include/leveldb/slice.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_SLICE_H_
#define STORAGE_LEVELDB_INCLUDE_SLICE_H_

#if __cplusplus

#include <cassert>
#include <cstddef>
#include <cstring>
Expand Down Expand Up @@ -114,4 +116,6 @@ inline int Slice::compare(const Slice& b) const {

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_SLICE_H_
4 changes: 4 additions & 0 deletions include/leveldb/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_STATUS_H_
#define STORAGE_LEVELDB_INCLUDE_STATUS_H_

#if __cplusplus

#include <algorithm>
#include <string>

Expand Down Expand Up @@ -119,4 +121,6 @@ inline Status& Status::operator=(Status&& rhs) noexcept {

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_STATUS_H_
4 changes: 4 additions & 0 deletions include/leveldb/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_H_
#define STORAGE_LEVELDB_INCLUDE_TABLE_H_

#if __cplusplus

#include <cstdint>

#include "leveldb/export.h"
Expand Down Expand Up @@ -81,4 +83,6 @@ class LEVELDB_EXPORT Table {

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_TABLE_H_
4 changes: 4 additions & 0 deletions include/leveldb/table_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
#define STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_

#if __cplusplus

#include <cstdint>

#include "leveldb/export.h"
Expand Down Expand Up @@ -90,4 +92,6 @@ class LEVELDB_EXPORT TableBuilder {

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
4 changes: 4 additions & 0 deletions include/leveldb/write_batch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_
#define STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_

#if __cplusplus

#include <string>

#include "leveldb/export.h"
Expand Down Expand Up @@ -80,4 +82,6 @@ class LEVELDB_EXPORT WriteBatch {

} // namespace leveldb

#endif // __cplusplus

#endif // STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_