@ -28,6 +28,7 @@
# include <limits>
# include <limits>
# include <condition_variable>
# include <condition_variable>
# include <malloc.h>
# include <malloc.h>
# include <intrin.h>
# include <stdint.h>
# include <stdint.h>
@ -80,19 +81,8 @@ namespace rocksdb {
namespace port {
namespace port {
// VS 15
// VS < 2015
# if (defined _MSC_VER) && (_MSC_VER >= 1900)
# if defined(_MSC_VER) && (_MSC_VER < 1900)
# define ROCKSDB_NOEXCEPT noexcept
// For use at db/file_indexer.h kLevelMaxIndex
const int kMaxInt32 = std : : numeric_limits < int > : : max ( ) ;
const uint64_t kMaxUint64 = std : : numeric_limits < uint64_t > : : max ( ) ;
const int64_t kMaxInt64 = std : : numeric_limits < int64_t > : : max ( ) ;
const size_t kMaxSizet = std : : numeric_limits < size_t > : : max ( ) ;
# else //_MSC_VER
// VS 15 has snprintf
// VS 15 has snprintf
# define snprintf _snprintf
# define snprintf _snprintf
@ -112,6 +102,17 @@ const size_t kMaxSizet = UINT64_MAX;
const size_t kMaxSizet = UINT_MAX ;
const size_t kMaxSizet = UINT_MAX ;
# endif
# endif
# else // VS >= 2015 or MinGW
# define ROCKSDB_NOEXCEPT noexcept
// For use at db/file_indexer.h kLevelMaxIndex
const int kMaxInt32 = std : : numeric_limits < int > : : max ( ) ;
const uint64_t kMaxUint64 = std : : numeric_limits < uint64_t > : : max ( ) ;
const int64_t kMaxInt64 = std : : numeric_limits < int64_t > : : max ( ) ;
const size_t kMaxSizet = std : : numeric_limits < size_t > : : max ( ) ;
# endif //_MSC_VER
# endif //_MSC_VER
const bool kLittleEndian = true ;
const bool kLittleEndian = true ;