From c69d33b0ec3dad2a8063ad66da9d51a1d6309f4e Mon Sep 17 00:00:00 2001 From: cmumford Date: Fri, 1 Mar 2019 13:12:01 -0800 Subject: Added native support for Windows. This change adds a native Windows port (port_windows.h) and a Windows Env (WindowsEnv). Note1: "small" is defined when including so some parameters were renamed to avoid conflict. Note2: leveldb::Env defines the method: "DeleteFile" which is also a constant defined when including . The solution was to ensure this macro is defined in env.h which forces the function, when compiled, to be either DeleteFileA or DeleteFileW when building for MBCS or UNICODE respectively. This resolves #519 on GitHub. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=236364778 --- port/atomic_pointer.h | 4 ---- port/port.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'port') diff --git a/port/atomic_pointer.h b/port/atomic_pointer.h index bb4e183..d906f63 100644 --- a/port/atomic_pointer.h +++ b/port/atomic_pointer.h @@ -22,10 +22,6 @@ #include -#ifdef OS_WIN -#include -#endif - #if defined(_M_X64) || defined(__x86_64__) #define ARCH_CPU_X86_FAMILY 1 #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) diff --git a/port/port.h b/port/port.h index 0975fed..b2210a7 100644 --- a/port/port.h +++ b/port/port.h @@ -10,7 +10,7 @@ // Include the appropriate platform specific file below. If you are // porting to a new platform, see "port_example.h" for documentation // of what the new port_.h file must provide. -#if defined(LEVELDB_PLATFORM_POSIX) +#if defined(LEVELDB_PLATFORM_POSIX) || defined(LEVELDB_PLATFORM_WINDOWS) # include "port/port_stdcxx.h" #elif defined(LEVELDB_PLATFORM_CHROMIUM) # include "port/port_chromium.h" -- cgit v1.2.1