Compilation fixes for powerpc build, -Wparentheses-equality error and missing header guards
Summary: This pull request contains miscellaneous compilation fixes. Thanks, Chinmay Closes https://github.com/facebook/rocksdb/pull/3462 Differential Revision: D6941424 Pulled By: sagar0 fbshipit-source-id: fe9c26507bf131221f2466740204bff40a15614a
This commit is contained in:
parent
d62af7fa4f
commit
9fc72d6f16
@ -43,7 +43,7 @@ extern __thread PerfContext perf_context;
|
||||
|
||||
#define PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(metric, condition) \
|
||||
PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), true); \
|
||||
if ((condition)) { \
|
||||
if (condition) { \
|
||||
perf_step_timer_##metric.Start(); \
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,10 @@ int main() {
|
||||
}
|
||||
#else
|
||||
|
||||
#ifndef __STDC_FORMAT_MACROS
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif // __STDC_FORMAT_MACROS
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
@ -56,7 +56,10 @@ int main() {
|
||||
}
|
||||
#else
|
||||
|
||||
#ifndef __STDC_FORMAT_MACROS
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif // __STDC_FORMAT_MACROS
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <atomic>
|
||||
#include <random>
|
||||
|
@ -39,8 +39,10 @@
|
||||
namespace rocksdb {
|
||||
namespace crc32c {
|
||||
|
||||
#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC)
|
||||
#ifdef __powerpc64__
|
||||
static int arch_ppc_crc32 = 0;
|
||||
#endif /* __powerpc64__ */
|
||||
#endif
|
||||
|
||||
static const uint32_t table0_[256] = {
|
||||
|
Loading…
Reference in New Issue
Block a user