diff options
author | Aaron Gao <gzh@fb.com> | 2017-05-20 16:34:55 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2017-05-20 16:42:21 -0700 |
commit | 4c9d2b10468146f42facb98fbc55d31501036d6a (patch) | |
tree | 148f5a07582cd1f9d4e91a4e6ce02611191be4ed | |
parent | 07bdcb91fe1fb6fcbed885580dcded8f5eac36f5 (diff) |
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
-rw-r--r-- | include/rocksdb/iostats_context.h | 8 | ||||
-rw-r--r-- | include/rocksdb/perf_context.h | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/include/rocksdb/iostats_context.h b/include/rocksdb/iostats_context.h index 7be3afa59..d0dbfa5fc 100644 --- a/include/rocksdb/iostats_context.h +++ b/include/rocksdb/iostats_context.h @@ -7,7 +7,6 @@ #include <stdint.h> #include <string> -#include "port/port.h" #include "rocksdb/perf_level.h" // A thread local context for gathering io-stats efficiently and transparently. @@ -48,7 +47,12 @@ struct IOStatsContext { }; #ifdef ROCKSDB_SUPPORT_THREAD_LOCAL -extern __thread IOStatsContext iostats_context; + #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; #endif } // namespace rocksdb diff --git a/include/rocksdb/perf_context.h b/include/rocksdb/perf_context.h index e3c86c39c..785dfc7cd 100644 --- a/include/rocksdb/perf_context.h +++ b/include/rocksdb/perf_context.h @@ -9,7 +9,6 @@ #include <stdint.h> #include <string> -#include "port/port.h" #include "rocksdb/perf_level.h" namespace rocksdb { @@ -158,6 +157,11 @@ extern PerfContext perf_context; PerfContext *getPerfContext(); #define perf_context (*getPerfContext()) #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; #endif #endif |