Browse Source

apply leveldb cygwin patch from http://code.google.com/p/leveldb/issues/detail?id=188

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
440525ebaa
  1. 6
      src/leveldb/build_detect_platform
  2. 2
      src/leveldb/port/port_posix.h

6
src/leveldb/build_detect_platform

@ -68,6 +68,12 @@ if [ "$CXX" = "g++" ]; then @@ -68,6 +68,12 @@ if [ "$CXX" = "g++" ]; then
fi
case "$TARGET_OS" in
CYGWIN_*)
PLATFORM=OS_LINUX
COMMON_FLAGS="$MEMCMP_FLAG -lpthread -DOS_LINUX -DCYGWIN"
PLATFORM_LDFLAGS="-lpthread"
PORT_FILE=port/port_posix.cc
;;
Darwin)
PLATFORM=OS_MACOSX
COMMON_FLAGS="$MEMCMP_FLAG -DOS_MACOSX"

2
src/leveldb/port/port_posix.h

@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
#if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\
defined(OS_ANDROID) || defined(OS_HPUX)
defined(OS_ANDROID) || defined(OS_HPUX) || defined(CYGWIN)
// Use fread/fwrite/fflush on platforms without _unlocked variants
#define fread_unlocked fread
#define fwrite_unlocked fwrite

Loading…
Cancel
Save