Skip to content

Commit

Permalink
Mingw support for Windows LevelDB port
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Aug 17, 2013
1 parent 0a7b074 commit 9def2bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build_detect_platform
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ case "$TARGET_OS" in
# man ld: +h internal_name
PLATFORM_SHARED_LDFLAGS="-shared -Wl,+h -Wl,"
;;
OS_WINDOWS_CROSSCOMPILE | NATIVE_WINDOWS)
PLATFORM=OS_WINDOWS
COMMON_FLAGS="-fno-builtin-memcmp -D_REENTRANT -DOS_WINDOWS -DLEVELDB_PLATFORM_WINDOWS"
PLATFORM_SHARED_CFLAGS=""
PLATFORM_SOURCES="util/env_win.cc"
PLATFORM_CXXFLAGS="-std=c++0x"
PLATFORM_LIBS="-lshlwapi -ldbghelp"
PORT_FILE=port/port_win.cc
CROSS_COMPILE=true
;;
*)
echo "Unknown platform!" >&2
exit 1
Expand Down
3 changes: 3 additions & 0 deletions util/env_posix.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// 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.
#if !defined(LEVELDB_PLATFORM_WINDOWS)

#include <deque>
#include <set>
Expand Down Expand Up @@ -696,3 +697,5 @@ Env* Env::Default() {
}

} // namespace leveldb

#endif

0 comments on commit 9def2bf

Please sign in to comment.