Merge pull request #873 from yuslepukhin/make_vs15_build

Fix up VS 15 build.
main
Igor Canadi 9 years ago
commit 7af91d425f
  1. 2
      CMakeLists.txt
  2. 15
      port/win/port_win.h
  3. 3
      tools/db_stress.cc

@ -14,7 +14,7 @@
# 3. Run cmake to generate project files for Windows, add more options to enable required third-party libraries.
# See thirdparty.inc for more information.
# sample command: cmake -G "Visual Studio 12 Win64" -DGFLAGS=1 -DSNAPPY=1 -DJEMALLOC=1 ..
# OR for VS Studio 15 cmake -G "Visual Studio 12 Win64" -DGFLAGS=1 -DSNAPPY=1 -DJEMALLOC=1 ..
# OR for VS Studio 15 cmake -G "Visual Studio 14 Win64" -DGFLAGS=1 -DSNAPPY=1 -DJEMALLOC=1 ..
# 4. Then build the project in debug mode (you may want to add /m[:<N>] flag to run msbuild in <N> parallel threads
# or simply /m ot use all avail cores)
# msbuild rocksdb.sln

@ -42,11 +42,6 @@
#define strcasecmp _stricmp
#endif
// defined in stdio.h
#ifndef snprintf
#define snprintf _snprintf
#endif
#undef GetCurrentTime
#undef DeleteFile
@ -108,6 +103,9 @@ const size_t kMaxSizet = std::numeric_limits<size_t>::max();
#else //_MSC_VER
// VS 15 has snprintf
#define snprintf _snprintf
#define ROCKSDB_NOEXCEPT
// std::numeric_limits<size_t>::max() is not constexpr just yet
// therefore, use the same limits
@ -245,13 +243,6 @@ extern void InitOnce(OnceType* once, void (*initializer)());
#define CACHE_LINE_SIZE 64U
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
// For Thread Local Storage abstraction
typedef DWORD pthread_key_t;

@ -610,7 +610,8 @@ class Stats {
"", bytes_mb, rate, (100*writes_)/done_, done_);
fprintf(stdout, "%-12s: Wrote %ld times\n", "", writes_);
fprintf(stdout, "%-12s: Deleted %ld times\n", "", deletes_);
fprintf(stdout, "%-12s: Single deleted %ld times\n", "", single_deletes_);
fprintf(stdout, "%-12s: Single deleted %" ROCKSDB_PRIszt " times\n", "",
single_deletes_);
fprintf(stdout, "%-12s: %ld read and %ld found the key\n", "",
gets_, founds_);
fprintf(stdout, "%-12s: Prefix scanned %ld times\n", "", prefixes_);

Loading…
Cancel
Save