Make includes relative, change namespace, support unity build

This commit is contained in:
Vinnie Falco
2013-07-15 06:46:10 -07:00
parent 613ed36e9b
commit af552c5b56
117 changed files with 784 additions and 784 deletions

View File

@@ -38,8 +38,8 @@
(5) All of the pointer arguments must be non-NULL.
*/
#ifndef STORAGE_LEVELDB_INCLUDE_C_H_
#define STORAGE_LEVELDB_INCLUDE_C_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_C_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_C_H_
#ifdef __cplusplus
extern "C" {
@@ -288,4 +288,4 @@ extern int leveldb_minor_version();
} /* end extern "C" */
#endif
#endif /* STORAGE_LEVELDB_INCLUDE_C_H_ */
#endif /* STORAGE_HYPERLEVELDB_INCLUDE_C_H_ */

View File

@@ -15,13 +15,13 @@
// they want something more sophisticated (like scan-resistance, a
// custom eviction policy, variable cache sizing, etc.)
#ifndef STORAGE_LEVELDB_INCLUDE_CACHE_H_
#define STORAGE_LEVELDB_INCLUDE_CACHE_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_CACHE_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_CACHE_H_
#include <stdint.h>
#include "hyperleveldb/slice.h"
#include "slice.h"
namespace leveldb {
namespace hyperleveldb {
class Cache;
@@ -94,6 +94,6 @@ class Cache {
void operator=(const Cache&);
};
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_UTIL_CACHE_H_
#endif // STORAGE_HYPERLEVELDB_UTIL_CACHE_H_

View File

@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_
#define STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_COMPARATOR_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_COMPARATOR_H_
#include <string>
namespace leveldb {
namespace hyperleveldb {
class Slice;
@@ -58,6 +58,6 @@ class Comparator {
// must not be deleted.
extern const Comparator* BytewiseComparator();
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_COMPARATOR_H_

View File

@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef STORAGE_LEVELDB_INCLUDE_DB_H_
#define STORAGE_LEVELDB_INCLUDE_DB_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_DB_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_DB_H_
#include <stdint.h>
#include <stdio.h>
#include "hyperleveldb/iterator.h"
#include "hyperleveldb/options.h"
#include "iterator.h"
#include "options.h"
namespace leveldb {
namespace hyperleveldb {
// Update Makefile if you change these
static const int kMajorVersion = 1;
@@ -156,6 +156,6 @@ Status DestroyDB(const std::string& name, const Options& options);
// on a database that contains important information.
Status RepairDB(const std::string& dbname, const Options& options);
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_DB_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_DB_H_

View File

@@ -10,16 +10,16 @@
// All Env implementations are safe for concurrent access from
// multiple threads without any external synchronization.
#ifndef STORAGE_LEVELDB_INCLUDE_ENV_H_
#define STORAGE_LEVELDB_INCLUDE_ENV_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_ENV_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_ENV_H_
#include <cstdarg>
#include <string>
#include <vector>
#include <stdint.h>
#include "hyperleveldb/status.h"
#include "status.h"
namespace leveldb {
namespace hyperleveldb {
class FileLock;
class Logger;
@@ -332,6 +332,6 @@ class EnvWrapper : public Env {
Env* target_;
};
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_ENV_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_ENV_H_

View File

@@ -13,12 +13,12 @@
// Most people will want to use the builtin bloom filter support (see
// NewBloomFilterPolicy() below).
#ifndef STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_
#define STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_FILTER_POLICY_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_FILTER_POLICY_H_
#include <string>
namespace leveldb {
namespace hyperleveldb {
class Slice;
@@ -67,4 +67,4 @@ extern const FilterPolicy* NewBloomFilterPolicy(int bits_per_key);
}
#endif // STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_FILTER_POLICY_H_

View File

@@ -12,13 +12,13 @@
// non-const method, all threads accessing the same Iterator must use
// external synchronization.
#ifndef STORAGE_LEVELDB_INCLUDE_ITERATOR_H_
#define STORAGE_LEVELDB_INCLUDE_ITERATOR_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_ITERATOR_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_ITERATOR_H_
#include "hyperleveldb/slice.h"
#include "hyperleveldb/status.h"
#include "slice.h"
#include "status.h"
namespace leveldb {
namespace hyperleveldb {
class Iterator {
public:
@@ -95,6 +95,6 @@ extern Iterator* NewEmptyIterator();
// Return an empty iterator with the specified status.
extern Iterator* NewErrorIterator(const Status& status);
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_ITERATOR_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_ITERATOR_H_

View File

@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
#define STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_OPTIONS_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_OPTIONS_H_
#include <stddef.h>
namespace leveldb {
namespace hyperleveldb {
class Cache;
class Comparator;
@@ -190,6 +190,6 @@ struct WriteOptions {
}
};
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_OPTIONS_H_

View File

@@ -12,15 +12,15 @@
// non-const method, all threads accessing the same Slice must use
// external synchronization.
#ifndef STORAGE_LEVELDB_INCLUDE_SLICE_H_
#define STORAGE_LEVELDB_INCLUDE_SLICE_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_SLICE_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_SLICE_H_
#include <assert.h>
#include <stddef.h>
#include <string.h>
#include <string>
namespace leveldb {
namespace hyperleveldb {
class Slice {
public:
@@ -103,7 +103,7 @@ inline int Slice::compare(const Slice& b) const {
return r;
}
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_SLICE_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_SLICE_H_

View File

@@ -10,13 +10,13 @@
// non-const method, all threads accessing the same Status must use
// external synchronization.
#ifndef STORAGE_LEVELDB_INCLUDE_STATUS_H_
#define STORAGE_LEVELDB_INCLUDE_STATUS_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_STATUS_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_STATUS_H_
#include <string>
#include "hyperleveldb/slice.h"
#include "slice.h"
namespace leveldb {
namespace hyperleveldb {
class Status {
public:
@@ -101,6 +101,6 @@ inline void Status::operator=(const Status& s) {
}
}
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_STATUS_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_STATUS_H_

View File

@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_H_
#define STORAGE_LEVELDB_INCLUDE_TABLE_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_TABLE_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_TABLE_H_
#include <stdint.h>
#include "hyperleveldb/iterator.h"
#include "iterator.h"
namespace leveldb {
namespace hyperleveldb {
class Block;
class BlockHandle;
@@ -80,6 +80,6 @@ class Table {
void operator=(const Table&);
};
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_TABLE_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_TABLE_H_

View File

@@ -10,14 +10,14 @@
// non-const method, all threads accessing the same TableBuilder must use
// external synchronization.
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
#define STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_TABLE_BUILDER_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_TABLE_BUILDER_H_
#include <stdint.h>
#include "hyperleveldb/options.h"
#include "hyperleveldb/status.h"
#include "options.h"
#include "status.h"
namespace leveldb {
namespace hyperleveldb {
class BlockBuilder;
class BlockHandle;
@@ -87,6 +87,6 @@ class TableBuilder {
void operator=(const TableBuilder&);
};
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_TABLE_BUILDER_H_

View File

@@ -18,13 +18,13 @@
// non-const method, all threads accessing the same WriteBatch must use
// external synchronization.
#ifndef STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_
#define STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_
#ifndef STORAGE_HYPERLEVELDB_INCLUDE_WRITE_BATCH_H_
#define STORAGE_HYPERLEVELDB_INCLUDE_WRITE_BATCH_H_
#include <string>
#include "hyperleveldb/status.h"
#include "status.h"
namespace leveldb {
namespace hyperleveldb {
class Slice;
@@ -59,6 +59,6 @@ class WriteBatch {
// Intentionally copyable
};
} // namespace leveldb
} // namespace hyperleveldb
#endif // STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_
#endif // STORAGE_HYPERLEVELDB_INCLUDE_WRITE_BATCH_H_