18285c1e2f
Summary: Make RocksDb build and run on Windows to be functionally complete and performant. All existing test cases run with no regressions. Performance numbers are in the pull-request. Test plan: make all of the existing unit tests pass, obtain perf numbers. Co-authored-by: Praveen Rao praveensinghrao@outlook.com Co-authored-by: Sherlock Huang baihan.huang@gmail.com Co-authored-by: Alex Zinoviev alexander.zinoviev@me.com Co-authored-by: Dmitri Smirnov dmitrism@microsoft.com
38 lines
1.3 KiB
C
38 lines
1.3 KiB
C
// Copyright (c) 2013, Facebook, Inc. All rights reserved.
|
|
// This source code is licensed under the BSD-style license found in the
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
|
//
|
|
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
|
|
#ifndef STORAGE_LEVELDB_UTILITIES_PRAGMA_ERROR_H_
|
|
#define STORAGE_LEVELDB_UTILITIES_PRAGMA_ERROR_H_
|
|
|
|
#define RDB_STR__(x) #x
|
|
#define RDB_STR(x) RDB_STR__(x)
|
|
|
|
|
|
#if defined(ROCKSDB_PLATFORM_POSIX)
|
|
// Wrap unportable warning macro
|
|
|
|
# define ROCKSDB_WARNING(x) _Pragma(RDB_STR(GCC warning(x)))
|
|
|
|
|
|
#elif defined(OS_WIN)
|
|
|
|
// Wrap unportable warning macro
|
|
#if defined(_MSC_VER)
|
|
// format it according to visual studio output (to get source lines and warnings in the IDE)
|
|
#define ROCKSDB_WARNING(x) __pragma( message(__FILE__ "(" RDB_STR(__LINE__) ") : warning: " x) )
|
|
#else
|
|
// make #warning into #pragma GCC warning gcc 4.7+ and clang 3.2+ supported
|
|
#define ROCKSDB_WARNING(x) _Pragma(RDB_STR(GCC warning(x)))
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
#endif // STORAGE_LEVELDB_UTILITIES_PRAGMA_ERROR_H_
|