diff options
| author | grdowns <grdowns@microsoft.com> | 2019-06-28 17:32:12 -0700 |
|---|---|---|
| committer | grdowns <grdowns@microsoft.com> | 2019-06-28 17:32:12 -0700 |
| commit | e27fe911982284788e63f4a92339386554706a4b (patch) | |
| tree | e695af1d6733cea93a29adab73ff819430ff872e /ports/leveldb/msvc_code_fix.diff | |
| parent | 1586330395db0bfa14c40c4b1a8d4da6c8f7c5f7 (diff) | |
| parent | 62ed7c17318b4f46109c2de73b7584fb04e85720 (diff) | |
| download | vcpkg-e27fe911982284788e63f4a92339386554706a4b.tar.gz vcpkg-e27fe911982284788e63f4a92339386554706a4b.zip | |
Merge branch 'master' of https://github.com/Microsoft/vcpkg into openssl-version-bump
Diffstat (limited to 'ports/leveldb/msvc_code_fix.diff')
| -rw-r--r-- | ports/leveldb/msvc_code_fix.diff | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/ports/leveldb/msvc_code_fix.diff b/ports/leveldb/msvc_code_fix.diff deleted file mode 100644 index 6cab006d3..000000000 --- a/ports/leveldb/msvc_code_fix.diff +++ /dev/null @@ -1,63 +0,0 @@ - db/c.cc | 2 ++ - port/port_win.h | 7 +++++++ - util/env_win.cc | 6 ++++-- - 3 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/db/c.cc b/db/c.cc -index 08ff0ad..b23e3dc 100644 ---- a/db/c.cc -+++ b/db/c.cc -@@ -5,7 +5,9 @@ - #include "leveldb/c.h" - - #include <stdlib.h> -+#ifndef WIN32 - #include <unistd.h> -+#endif - #include "leveldb/cache.h" - #include "leveldb/comparator.h" - #include "leveldb/db.h" -diff --git a/port/port_win.h b/port/port_win.h -index e8bf46e..989c15c 100644 ---- a/port/port_win.h -+++ b/port/port_win.h -@@ -32,9 +32,16 @@ - #define STORAGE_LEVELDB_PORT_PORT_WIN_H_ - - #ifdef _MSC_VER -+#if !(_MSC_VER >= 1900) - #define snprintf _snprintf -+#endif - #define close _close - #define fread_unlocked _fread_nolock -+#ifdef _WIN64 -+#define ssize_t int64_t -+#else -+#define ssize_t int32_t -+#endif - #endif - - #include <string> -diff --git a/util/env_win.cc b/util/env_win.cc -index d32c4e6..3b4c92b 100644 ---- a/util/env_win.cc -+++ b/util/env_win.cc -@@ -761,14 +761,16 @@ uint64_t Win32Env::NowMicros() - static Status CreateDirInner( const std::string& dirname ) - { - Status sRet; -- DWORD attr = ::GetFileAttributes(dirname.c_str()); -+ std::wstring dirnameW; -+ ToWidePath(dirname, dirnameW); -+ DWORD attr = ::GetFileAttributesW(dirnameW.c_str()); - if (attr == INVALID_FILE_ATTRIBUTES) { // doesn't exist: - std::size_t slash = dirname.find_last_of("\\"); - if (slash != std::string::npos){ - sRet = CreateDirInner(dirname.substr(0, slash)); - if (!sRet.ok()) return sRet; - } -- BOOL result = ::CreateDirectory(dirname.c_str(), NULL); -+ BOOL result = ::CreateDirectoryW(dirnameW.c_str(), NULL); - if (result == FALSE) { - sRet = Status::IOError(dirname, "Could not create directory."); - return sRet; |
