diff --git a/CMakeLists.txt b/CMakeLists.txt index 51749bae0d42c3fcf07854d267b60dd921048c29..5af376c487e1ef8e6485b2f9d5299609c83dc80f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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[:] flag to run msbuild in parallel threads # or simply /m ot use all avail cores) # msbuild rocksdb.sln diff --git a/port/win/port_win.h b/port/win/port_win.h index 9d5be2c789adf38cbcfde297edf39613a01a2e90..6b79200238a3d96d3fb5e81d992962705d645b12 100644 --- a/port/win/port_win.h +++ b/port/win/port_win.h @@ -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::max(); #else //_MSC_VER +// VS 15 has snprintf +#define snprintf _snprintf + #define ROCKSDB_NOEXCEPT // std::numeric_limits::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; diff --git a/tools/db_stress.cc b/tools/db_stress.cc index 1b1672ca2208ca4091d0013160ab232d50c77c41..669ca6c53f588e705c23353962cd398cabc03ae4 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -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_);