remove #include port/port.h in public header file

Summary:
break internal build
Closes https://github.com/facebook/rocksdb/pull/2336

Differential Revision: D5097089

Pulled By: lightmark

fbshipit-source-id: 6996cbadeead21074a41e526ea04659190ee61d8
This commit is contained in:
Aaron Gao 2017-05-20 16:34:55 -07:00 committed by Facebook Github Bot
parent 07bdcb91fe
commit 4c9d2b1046
2 changed files with 11 additions and 3 deletions

View File

@ -7,7 +7,6 @@
#include <stdint.h> #include <stdint.h>
#include <string> #include <string>
#include "port/port.h"
#include "rocksdb/perf_level.h" #include "rocksdb/perf_level.h"
// A thread local context for gathering io-stats efficiently and transparently. // A thread local context for gathering io-stats efficiently and transparently.
@ -48,6 +47,11 @@ struct IOStatsContext {
}; };
#ifdef ROCKSDB_SUPPORT_THREAD_LOCAL #ifdef ROCKSDB_SUPPORT_THREAD_LOCAL
#if defined(_MSC_VER) && !defined(__thread)
// Thread local storage on Linux
// There is thread_local in C++11
#define __thread __declspec(thread)
#endif
extern __thread IOStatsContext iostats_context; extern __thread IOStatsContext iostats_context;
#endif #endif

View File

@ -9,7 +9,6 @@
#include <stdint.h> #include <stdint.h>
#include <string> #include <string>
#include "port/port.h"
#include "rocksdb/perf_level.h" #include "rocksdb/perf_level.h"
namespace rocksdb { namespace rocksdb {
@ -158,6 +157,11 @@ extern PerfContext perf_context;
PerfContext *getPerfContext(); PerfContext *getPerfContext();
#define perf_context (*getPerfContext()) #define perf_context (*getPerfContext())
#else #else
#if defined(_MSC_VER) && !defined(__thread)
// Thread local storage on Linux
// There is thread_local in C++11
#define __thread __declspec(thread)
#endif
extern __thread PerfContext perf_context; extern __thread PerfContext perf_context;
#endif #endif
#endif #endif