Fix for Swift Package Manager support

SPM can't differ if .h is C or C++ header
This commit is contained in:
Sergey Romanenko 2024-05-16 21:37:40 +03:00
parent 068d5ee1a3
commit cc8560536b
13 changed files with 52 additions and 0 deletions

View File

@ -18,6 +18,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_CACHE_H_
#define STORAGE_LEVELDB_INCLUDE_CACHE_H_
#if __cplusplus
#include <cstdint>
#include "leveldb/export.h"
@ -100,4 +102,6 @@ class LEVELDB_EXPORT Cache {
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_CACHE_H_

View File

@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_
#define STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_
#if __cplusplus
#include <string>
#include "leveldb/export.h"
@ -61,4 +63,6 @@ LEVELDB_EXPORT const Comparator* BytewiseComparator();
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_

View File

@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_DB_H_
#define STORAGE_LEVELDB_INCLUDE_DB_H_
#if __cplusplus
#include <cstdint>
#include <cstdio>
@ -164,4 +166,6 @@ LEVELDB_EXPORT Status RepairDB(const std::string& dbname,
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_DB_H_

View File

@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
#define STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
#if __cplusplus
#include <string>
#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_

View File

@ -13,6 +13,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_ENV_H_
#define STORAGE_LEVELDB_INCLUDE_ENV_H_
#if __cplusplus
#include <cstdarg>
#include <cstdint>
#include <string>
@ -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_

View File

@ -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"
@ -69,4 +71,6 @@ LEVELDB_EXPORT const FilterPolicy* NewBloomFilterPolicy(int bits_per_key);
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_

View File

@ -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_

View File

@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
#define STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
#if __cplusplus
#include <cstddef>
#include "leveldb/export.h"
@ -187,4 +189,6 @@ struct LEVELDB_EXPORT WriteOptions {
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_OPTIONS_H_

View File

@ -15,6 +15,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_SLICE_H_
#define STORAGE_LEVELDB_INCLUDE_SLICE_H_
#if __cplusplus
#include <cassert>
#include <cstddef>
#include <cstring>
@ -111,4 +113,6 @@ inline int Slice::compare(const Slice& b) const {
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_SLICE_H_

View File

@ -13,6 +13,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_STATUS_H_
#define STORAGE_LEVELDB_INCLUDE_STATUS_H_
#if __cplusplus
#include <algorithm>
#include <string>
@ -119,4 +121,6 @@ inline Status& Status::operator=(Status&& rhs) noexcept {
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_STATUS_H_

View File

@ -5,6 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_H_
#define STORAGE_LEVELDB_INCLUDE_TABLE_H_
#if __cplusplus
#include <cstdint>
#include "leveldb/export.h"
@ -81,4 +83,6 @@ class LEVELDB_EXPORT Table {
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_TABLE_H_

View File

@ -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"
@ -90,4 +92,6 @@ class LEVELDB_EXPORT TableBuilder {
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_

View File

@ -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"
@ -80,4 +82,6 @@ class LEVELDB_EXPORT WriteBatch {
} // namespace leveldb
#endif // __cplusplus
#endif // STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_