diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/install.vcxproj b/gvsbuild/patches/leveldb/build/win32/vs12/install.vcxproj deleted file mode 100644 index fd647e1d6..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/install.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F42026FA-B395-4D5D-9F86-A98636F69607} - Win32Proj - install - - - - Application - true - v120 - Unicode - - - Application - true - v120 - Unicode - - - Application - false - v120 - true - Unicode - - - Application - false - v120 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - true - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - false - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - false - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - - - $(PrjDoInstall) - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - - - $(PrjDoInstall) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - true - true - - - $(PrjDoInstall) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - true - true - - - $(PrjDoInstall) - - - - - - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/install.vcxproj.filters b/gvsbuild/patches/leveldb/build/win32/vs12/install.vcxproj.filters deleted file mode 100644 index 6a1782f7d..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/install.vcxproj.filters +++ /dev/null @@ -1,17 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.def b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.def deleted file mode 100644 index 30d5583e6..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.def +++ /dev/null @@ -1,117 +0,0 @@ -LIBRARY "leveldb.dll" - -EXPORTS - -leveldb_open - -leveldb_close - -leveldb_put - -leveldb_delete - -leveldb_write - -leveldb_get - -leveldb_create_iterator - -leveldb_create_snapshot - -leveldb_release_snapshot - -leveldb_property_value - -leveldb_approximate_sizes - -leveldb_destroy_db - -leveldb_repair_db - -leveldb_iter_destroy - -leveldb_iter_valid - -leveldb_iter_seek_to_first - -leveldb_iter_seek_to_last - -leveldb_iter_seek - -leveldb_iter_next - -leveldb_iter_prev - -leveldb_iter_key - -leveldb_iter_value - -leveldb_iter_get_error - -leveldb_writebatch_create - -leveldb_writebatch_destroy - -leveldb_writebatch_clear - -leveldb_writebatch_put - -leveldb_writebatch_delete - -leveldb_writebatch_iterate - -leveldb_options_create - -leveldb_options_destroy - -leveldb_options_set_comparator - -leveldb_options_set_create_if_missing - -leveldb_options_set_error_if_exists - -leveldb_options_set_paranoid_checks - -leveldb_options_set_env - -leveldb_options_set_info_log - -leveldb_options_set_write_buffer_size - -leveldb_options_set_max_open_files - -leveldb_options_set_cache - -leveldb_options_set_block_size - -leveldb_options_set_block_restart_interval - -leveldb_options_set_compression - -leveldb_comparator_create - -leveldb_comparator_destroy - -leveldb_readoptions_create - -leveldb_readoptions_destroy - -leveldb_readoptions_set_verify_checksums - -leveldb_readoptions_set_fill_cache - -leveldb_readoptions_set_snapshot - -leveldb_writeoptions_create - -leveldb_writeoptions_destroy - -leveldb_writeoptions_set_sync - -leveldb_cache_create_lru - -leveldb_cache_destroy - -leveldb_create_default_env - -leveldb_env_destroy diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.filters b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.filters deleted file mode 100644 index bf980ab8b..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.filters +++ /dev/null @@ -1,133 +0,0 @@ - - - - - {af757a90-f702-4a23-8a32-f34bd9ac7d55} - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - - - func_def - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.sln b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.sln deleted file mode 100644 index 78f7682fe..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.sln +++ /dev/null @@ -1,54 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "leveldb", "leveldb.vcxproj", "{8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{F42026FA-B395-4D5D-9F86-A98636F69607}" - ProjectSection(ProjectDependencies) = postProject - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396} = {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "leveldb_test", "leveldb_test\leveldb_test.vcxproj", "{E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}" - ProjectSection(ProjectDependencies) = postProject - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2} = {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|Win32.Build.0 = Debug|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|x64.ActiveCfg = Debug|x64 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|x64.Build.0 = Debug|x64 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|Win32.ActiveCfg = Release|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|Win32.Build.0 = Release|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|x64.ActiveCfg = Release|x64 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|x64.Build.0 = Release|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|Win32.ActiveCfg = Debug|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|Win32.Build.0 = Debug|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|x64.ActiveCfg = Debug|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|x64.Build.0 = Debug|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|Win32.ActiveCfg = Release|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|Win32.Build.0 = Release|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|x64.ActiveCfg = Release|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|x64.Build.0 = Release|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|Win32.ActiveCfg = Debug|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|Win32.Build.0 = Debug|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|x64.ActiveCfg = Debug|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|x64.Build.0 = Debug|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|Win32.ActiveCfg = Release|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|Win32.Build.0 = Release|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|x64.ActiveCfg = Release|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.vcxproj b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.vcxproj deleted file mode 100644 index 5a2e821f3..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb.vcxproj +++ /dev/null @@ -1,214 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2} - Win32Proj - leveldb - - - - DynamicLibrary - true - v120 - Unicode - - - DynamicLibrary - true - v120 - Unicode - - - DynamicLibrary - false - v120 - true - Unicode - - - DynamicLibrary - false - v120 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - leveldb - - - false - .dll - - - false - .dll - leveldb - $(VC_IncludePath);$(WindowsSDK_IncludePath); - $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64); - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - Shlwapi.lib;%(AdditionalDependencies) - D:\Anaconda\libs;D:\ThirdPartyLibrary\pyleveldb\leveldbwin\lib_leveldb_vc10\lib\Release;%(AdditionalLibraryDirectories) - leveldb.def - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - Shlwapi.lib;%(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).lib - leveldb.def - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - %(AdditionalLibraryDirectories) - Shlwapi.lib - leveldb.def - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).lib - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - %(AdditionalLibraryDirectories) - Shlwapi.lib;%(AdditionalDependencies) - leveldb.def - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/ReadMe.txt b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/ReadMe.txt deleted file mode 100644 index a0072cb9a..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/ReadMe.txt +++ /dev/null @@ -1,40 +0,0 @@ -======================================================================== - CONSOLE APPLICATION : leveldb_test Project Overview -======================================================================== - -AppWizard has created this leveldb_test application for you. - -This file contains a summary of what you will find in each of the files that -make up your leveldb_test application. - - -leveldb_test.vcxproj - This is the main project file for VC++ projects generated using an Application Wizard. - It contains information about the version of Visual C++ that generated the file, and - information about the platforms, configurations, and project features selected with the - Application Wizard. - -leveldb_test.vcxproj.filters - This is the filters file for VC++ projects generated using an Application Wizard. - It contains information about the association between the files in your project - and the filters. This association is used in the IDE to show grouping of files with - similar extensions under a specific node (for e.g. ".cpp" files are associated with the - "Source Files" filter). - -leveldb_test.cpp - This is the main application source file. - -///////////////////////////////////////////////////////////////////////////// -Other standard files: - -StdAfx.h, StdAfx.cpp - These files are used to build a precompiled header (PCH) file - named leveldb_test.pch and a precompiled types file named StdAfx.obj. - -///////////////////////////////////////////////////////////////////////////// -Other notes: - -AppWizard uses "TODO:" comments to indicate parts of the source code you -should add to or customize. - -///////////////////////////////////////////////////////////////////////////// diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/leveldb_test.cpp b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/leveldb_test.cpp deleted file mode 100644 index 0c5d17ebb..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/leveldb_test.cpp +++ /dev/null @@ -1,100 +0,0 @@ -// leveldb_test.cpp : Defines the entry point for the console application. -// - -#include "stdafx.h" - -#include -#include -#include - -#include "include\leveldb\c.h" - -int _tmain(int argc, _TCHAR* argv[]) -{ - - leveldb_t* db; - leveldb_comparator_t* cmp; - leveldb_cache_t* cache; - leveldb_env_t* env; - leveldb_options_t* options; - leveldb_readoptions_t* roptions; - leveldb_writeoptions_t* woptions; - char* err = NULL; - - - env = leveldb_create_default_env(); - cache = leveldb_cache_create_lru(100000); - - options = leveldb_options_create(); - // leveldb_options_set_comparator(options, cmp); - //leveldb_options_set_error_if_exists(options, 1); - //leveldb_options_set_cache(options, cache); - //leveldb_options_set_env(options, env); - //leveldb_options_set_info_log(options, NULL); - //leveldb_options_set_write_buffer_size(options, 100000); - //leveldb_options_set_paranoid_checks(options, 1); - //leveldb_options_set_max_open_files(options, 10); - //leveldb_options_set_block_size(options, 1024); - //leveldb_options_set_block_restart_interval(options, 8); - leveldb_options_set_compression(options, leveldb_no_compression); - - //roptions = leveldb_readoptions_create(); - //leveldb_readoptions_set_verify_checksums(roptions, 1); - //leveldb_readoptions_set_fill_cache(roptions, 0); - - - woptions = leveldb_writeoptions_create(); - //leveldb_writeoptions_set_sync(woptions, 1); - leveldb_writeoptions_set_sync(woptions, 0); - - leveldb_destroy_db(options, "C:/Trace/test.db", &err); - - leveldb_options_set_create_if_missing(options, 1); - db = leveldb_open(options, "C:/Trace/test.db", &err); - - - - leveldb_put(db, woptions, "foo", 3, "hello", 5, &err); - //leveldb_writebatch_t* wb = leveldb_writebatch_create(); - //leveldb_writebatch_put(wb, "foo", 3, "a", 1); - //leveldb_writebatch_clear(wb); - //leveldb_writebatch_put(wb, "bar", 3, "b", 1); - //leveldb_writebatch_put(wb, "box", 3, "c", 1); - //leveldb_writebatch_delete(wb, "bar", 3); - //leveldb_write(db, woptions, wb, &err); - - - - char data[200]; - char key[64]; - LARGE_INTEGER t0, t1, freq; - - QueryPerformanceCounter((LARGE_INTEGER *)&t0); - unsigned long last_time = GetTickCount(); - unsigned long max_time = 0; - - int i, j; - for (i = 0; i< 5000000; i++) { - //UpdateTimeString(date,64); - _itoa(i, key, 10); - leveldb_put(db, woptions, key, strlen(key), data, 200, &err); - - unsigned long time = GetTickCount(); - unsigned long max = time - last_time; - last_time = time; - if (max > max_time) { - max_time = max; - } - } - - QueryPerformanceCounter((LARGE_INTEGER *)&t1); - - printf("max_time:%d \n", max_time); - - unsigned long time = (((t1.QuadPart - t0.QuadPart) * 1000000) ); - - printf("i:%d time:%f \n", i, time); - int n = getchar(); - return 0; -} - diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/leveldb_test.vcxproj b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/leveldb_test.vcxproj deleted file mode 100644 index deaf2667e..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/leveldb_test.vcxproj +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396} - Win32Proj - leveldb_test - - - - Application - true - v120 - Unicode - - - Application - true - v120 - Unicode - - - Application - false - v120 - true - Unicode - - - Application - false - v120 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - true - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - false - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - false - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - - Use - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - $(PrjInstallRoot)\lib; - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Use - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - - - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - true - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - $(PrjInstallRoot)\lib; - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - true - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - - - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/leveldb_test.vcxproj.filters b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/leveldb_test.vcxproj.filters deleted file mode 100644 index 2ebee261e..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/leveldb_test.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/stdafx.cpp b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/stdafx.cpp deleted file mode 100644 index 66dafe2c4..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// leveldb_test.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/stdafx.h b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/stdafx.h deleted file mode 100644 index b005a839d..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/stdafx.h +++ /dev/null @@ -1,15 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include "targetver.h" - -#include -#include - - - -// TODO: reference additional headers your program requires here diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/targetver.h b/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/targetver.h deleted file mode 100644 index 87c0086de..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/leveldb_test/targetver.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include diff --git a/gvsbuild/patches/leveldb/build/win32/vs12/property.props b/gvsbuild/patches/leveldb/build/win32/vs12/property.props deleted file mode 100644 index 0cb7fbabf..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs12/property.props +++ /dev/null @@ -1,89 +0,0 @@ - - - - 1.0 - 12 - $(SolutionDir)..\..\..\..\..\..\..\gtk\$(Platform)\$(Configuration) - - $(SolutionDir)..\..\..\..\leveldb-rel - $(SolutionDir)$(Configuration)\$(PlatformName)\bin - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - ..\..\.. - lib - - - - $(PrjSeparateDllPrefix) - $(PrjSeparateDllSuffix) - - - - - - - - mkdir $(CopyDir) - - mkdir $(CopyDir)\bin - - copy $(BinDir)\*.exe $(CopyDir)\bin - - copy $(BinDir)\*.dll $(CopyDir)\bin - - copy $(BinDir)\*.pdb $(CopyDir)\bin - - mkdir $(CopyDir)\lib - - copy $(BinDir)\*.lib $(CopyDir)\lib - - mkdir $(CopyDir)\include\leveldb-$(ApiVersion)\leveldb - - copy $(SolDir)\include\leveldb\*.h $(CopyDir)\include\leveldb-$(ApiVersion)\leveldb - - - - - - <_PropertySheetDisplayName>Prjprops - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - - $(PrjInstallRoot) - - - $(PrjIncludeDir) - - - $(CopyDir) - - - $(PreBuildCfg) - - - $(ApiVersion) - - - $(PrjDoInstall) - - - $(PrjLibtoolCompatibleDllPrefix) - - - $(PrjLibtoolCompatibleDllSuffix) - - - $(PrjSeparateDllPrefix) - - - $(PrjSeparateDllSuffix) - - - $(PrjDllPrefix) - - - $(PrjDllSuffix) - - - diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/install.vcxproj b/gvsbuild/patches/leveldb/build/win32/vs14/install.vcxproj deleted file mode 100644 index ac7155619..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/install.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F42026FA-B395-4D5D-9F86-A98636F69607} - Win32Proj - install - - - - Application - true - v140 - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - true - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - false - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - false - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - - - $(PrjDoInstall) - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - - - $(PrjDoInstall) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - true - true - - - $(PrjDoInstall) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - true - true - - - $(PrjDoInstall) - - - - - - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/install.vcxproj.filters b/gvsbuild/patches/leveldb/build/win32/vs14/install.vcxproj.filters deleted file mode 100644 index 6a1782f7d..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/install.vcxproj.filters +++ /dev/null @@ -1,17 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.def b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.def deleted file mode 100644 index 30d5583e6..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.def +++ /dev/null @@ -1,117 +0,0 @@ -LIBRARY "leveldb.dll" - -EXPORTS - -leveldb_open - -leveldb_close - -leveldb_put - -leveldb_delete - -leveldb_write - -leveldb_get - -leveldb_create_iterator - -leveldb_create_snapshot - -leveldb_release_snapshot - -leveldb_property_value - -leveldb_approximate_sizes - -leveldb_destroy_db - -leveldb_repair_db - -leveldb_iter_destroy - -leveldb_iter_valid - -leveldb_iter_seek_to_first - -leveldb_iter_seek_to_last - -leveldb_iter_seek - -leveldb_iter_next - -leveldb_iter_prev - -leveldb_iter_key - -leveldb_iter_value - -leveldb_iter_get_error - -leveldb_writebatch_create - -leveldb_writebatch_destroy - -leveldb_writebatch_clear - -leveldb_writebatch_put - -leveldb_writebatch_delete - -leveldb_writebatch_iterate - -leveldb_options_create - -leveldb_options_destroy - -leveldb_options_set_comparator - -leveldb_options_set_create_if_missing - -leveldb_options_set_error_if_exists - -leveldb_options_set_paranoid_checks - -leveldb_options_set_env - -leveldb_options_set_info_log - -leveldb_options_set_write_buffer_size - -leveldb_options_set_max_open_files - -leveldb_options_set_cache - -leveldb_options_set_block_size - -leveldb_options_set_block_restart_interval - -leveldb_options_set_compression - -leveldb_comparator_create - -leveldb_comparator_destroy - -leveldb_readoptions_create - -leveldb_readoptions_destroy - -leveldb_readoptions_set_verify_checksums - -leveldb_readoptions_set_fill_cache - -leveldb_readoptions_set_snapshot - -leveldb_writeoptions_create - -leveldb_writeoptions_destroy - -leveldb_writeoptions_set_sync - -leveldb_cache_create_lru - -leveldb_cache_destroy - -leveldb_create_default_env - -leveldb_env_destroy diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.filters b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.filters deleted file mode 100644 index bf980ab8b..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.filters +++ /dev/null @@ -1,133 +0,0 @@ - - - - - {af757a90-f702-4a23-8a32-f34bd9ac7d55} - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - - - func_def - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.sln b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.sln deleted file mode 100644 index c2b0824df..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.sln +++ /dev/null @@ -1,54 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "leveldb", "leveldb.vcxproj", "{8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{F42026FA-B395-4D5D-9F86-A98636F69607}" - ProjectSection(ProjectDependencies) = postProject - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396} = {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "leveldb_test", "leveldb_test\leveldb_test.vcxproj", "{E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}" - ProjectSection(ProjectDependencies) = postProject - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2} = {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|Win32.Build.0 = Debug|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|x64.ActiveCfg = Debug|x64 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|x64.Build.0 = Debug|x64 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|Win32.ActiveCfg = Release|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|Win32.Build.0 = Release|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|x64.ActiveCfg = Release|x64 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|x64.Build.0 = Release|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|Win32.ActiveCfg = Debug|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|Win32.Build.0 = Debug|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|x64.ActiveCfg = Debug|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|x64.Build.0 = Debug|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|Win32.ActiveCfg = Release|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|Win32.Build.0 = Release|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|x64.ActiveCfg = Release|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|x64.Build.0 = Release|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|Win32.ActiveCfg = Debug|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|Win32.Build.0 = Debug|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|x64.ActiveCfg = Debug|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|x64.Build.0 = Debug|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|Win32.ActiveCfg = Release|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|Win32.Build.0 = Release|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|x64.ActiveCfg = Release|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.vcxproj b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.vcxproj deleted file mode 100644 index 27055e4f5..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb.vcxproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2} - Win32Proj - leveldb - - - - DynamicLibrary - true - v140 - Unicode - - - DynamicLibrary - true - v140 - Unicode - - - DynamicLibrary - false - v140 - true - Unicode - - - DynamicLibrary - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - leveldb - - - false - .dll - - - false - .dll - leveldb - $(VC_IncludePath);$(WindowsSDK_IncludePath); - $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64); - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - Shlwapi.lib;%(AdditionalDependencies) - D:\Anaconda\libs;D:\ThirdPartyLibrary\pyleveldb\leveldbwin\lib_leveldb_vc10\lib\Release;%(AdditionalLibraryDirectories) - leveldb.def - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - Shlwapi.lib;%(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).lib - leveldb.def - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - %(AdditionalLibraryDirectories) - Shlwapi.lib - leveldb.def - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).lib - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - %(AdditionalLibraryDirectories) - Shlwapi.lib;%(AdditionalDependencies) - leveldb.def - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/ReadMe.txt b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/ReadMe.txt deleted file mode 100644 index a0072cb9a..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/ReadMe.txt +++ /dev/null @@ -1,40 +0,0 @@ -======================================================================== - CONSOLE APPLICATION : leveldb_test Project Overview -======================================================================== - -AppWizard has created this leveldb_test application for you. - -This file contains a summary of what you will find in each of the files that -make up your leveldb_test application. - - -leveldb_test.vcxproj - This is the main project file for VC++ projects generated using an Application Wizard. - It contains information about the version of Visual C++ that generated the file, and - information about the platforms, configurations, and project features selected with the - Application Wizard. - -leveldb_test.vcxproj.filters - This is the filters file for VC++ projects generated using an Application Wizard. - It contains information about the association between the files in your project - and the filters. This association is used in the IDE to show grouping of files with - similar extensions under a specific node (for e.g. ".cpp" files are associated with the - "Source Files" filter). - -leveldb_test.cpp - This is the main application source file. - -///////////////////////////////////////////////////////////////////////////// -Other standard files: - -StdAfx.h, StdAfx.cpp - These files are used to build a precompiled header (PCH) file - named leveldb_test.pch and a precompiled types file named StdAfx.obj. - -///////////////////////////////////////////////////////////////////////////// -Other notes: - -AppWizard uses "TODO:" comments to indicate parts of the source code you -should add to or customize. - -///////////////////////////////////////////////////////////////////////////// diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/leveldb_test.cpp b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/leveldb_test.cpp deleted file mode 100644 index 0c5d17ebb..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/leveldb_test.cpp +++ /dev/null @@ -1,100 +0,0 @@ -// leveldb_test.cpp : Defines the entry point for the console application. -// - -#include "stdafx.h" - -#include -#include -#include - -#include "include\leveldb\c.h" - -int _tmain(int argc, _TCHAR* argv[]) -{ - - leveldb_t* db; - leveldb_comparator_t* cmp; - leveldb_cache_t* cache; - leveldb_env_t* env; - leveldb_options_t* options; - leveldb_readoptions_t* roptions; - leveldb_writeoptions_t* woptions; - char* err = NULL; - - - env = leveldb_create_default_env(); - cache = leveldb_cache_create_lru(100000); - - options = leveldb_options_create(); - // leveldb_options_set_comparator(options, cmp); - //leveldb_options_set_error_if_exists(options, 1); - //leveldb_options_set_cache(options, cache); - //leveldb_options_set_env(options, env); - //leveldb_options_set_info_log(options, NULL); - //leveldb_options_set_write_buffer_size(options, 100000); - //leveldb_options_set_paranoid_checks(options, 1); - //leveldb_options_set_max_open_files(options, 10); - //leveldb_options_set_block_size(options, 1024); - //leveldb_options_set_block_restart_interval(options, 8); - leveldb_options_set_compression(options, leveldb_no_compression); - - //roptions = leveldb_readoptions_create(); - //leveldb_readoptions_set_verify_checksums(roptions, 1); - //leveldb_readoptions_set_fill_cache(roptions, 0); - - - woptions = leveldb_writeoptions_create(); - //leveldb_writeoptions_set_sync(woptions, 1); - leveldb_writeoptions_set_sync(woptions, 0); - - leveldb_destroy_db(options, "C:/Trace/test.db", &err); - - leveldb_options_set_create_if_missing(options, 1); - db = leveldb_open(options, "C:/Trace/test.db", &err); - - - - leveldb_put(db, woptions, "foo", 3, "hello", 5, &err); - //leveldb_writebatch_t* wb = leveldb_writebatch_create(); - //leveldb_writebatch_put(wb, "foo", 3, "a", 1); - //leveldb_writebatch_clear(wb); - //leveldb_writebatch_put(wb, "bar", 3, "b", 1); - //leveldb_writebatch_put(wb, "box", 3, "c", 1); - //leveldb_writebatch_delete(wb, "bar", 3); - //leveldb_write(db, woptions, wb, &err); - - - - char data[200]; - char key[64]; - LARGE_INTEGER t0, t1, freq; - - QueryPerformanceCounter((LARGE_INTEGER *)&t0); - unsigned long last_time = GetTickCount(); - unsigned long max_time = 0; - - int i, j; - for (i = 0; i< 5000000; i++) { - //UpdateTimeString(date,64); - _itoa(i, key, 10); - leveldb_put(db, woptions, key, strlen(key), data, 200, &err); - - unsigned long time = GetTickCount(); - unsigned long max = time - last_time; - last_time = time; - if (max > max_time) { - max_time = max; - } - } - - QueryPerformanceCounter((LARGE_INTEGER *)&t1); - - printf("max_time:%d \n", max_time); - - unsigned long time = (((t1.QuadPart - t0.QuadPart) * 1000000) ); - - printf("i:%d time:%f \n", i, time); - int n = getchar(); - return 0; -} - diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/leveldb_test.vcxproj b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/leveldb_test.vcxproj deleted file mode 100644 index 868962f49..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/leveldb_test.vcxproj +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396} - Win32Proj - leveldb_test - - - - Application - true - v140 - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - true - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - false - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - false - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - - Use - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - $(PrjInstallRoot)\lib; - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Use - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - - - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - true - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - $(PrjInstallRoot)\lib; - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - true - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - - - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/leveldb_test.vcxproj.filters b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/leveldb_test.vcxproj.filters deleted file mode 100644 index 2ebee261e..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/leveldb_test.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/stdafx.cpp b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/stdafx.cpp deleted file mode 100644 index 66dafe2c4..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// leveldb_test.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/stdafx.h b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/stdafx.h deleted file mode 100644 index b005a839d..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/stdafx.h +++ /dev/null @@ -1,15 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include "targetver.h" - -#include -#include - - - -// TODO: reference additional headers your program requires here diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/targetver.h b/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/targetver.h deleted file mode 100644 index 87c0086de..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/leveldb_test/targetver.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include diff --git a/gvsbuild/patches/leveldb/build/win32/vs14/property.props b/gvsbuild/patches/leveldb/build/win32/vs14/property.props deleted file mode 100644 index 0cb7fbabf..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs14/property.props +++ /dev/null @@ -1,89 +0,0 @@ - - - - 1.0 - 12 - $(SolutionDir)..\..\..\..\..\..\..\gtk\$(Platform)\$(Configuration) - - $(SolutionDir)..\..\..\..\leveldb-rel - $(SolutionDir)$(Configuration)\$(PlatformName)\bin - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - ..\..\.. - lib - - - - $(PrjSeparateDllPrefix) - $(PrjSeparateDllSuffix) - - - - - - - - mkdir $(CopyDir) - - mkdir $(CopyDir)\bin - - copy $(BinDir)\*.exe $(CopyDir)\bin - - copy $(BinDir)\*.dll $(CopyDir)\bin - - copy $(BinDir)\*.pdb $(CopyDir)\bin - - mkdir $(CopyDir)\lib - - copy $(BinDir)\*.lib $(CopyDir)\lib - - mkdir $(CopyDir)\include\leveldb-$(ApiVersion)\leveldb - - copy $(SolDir)\include\leveldb\*.h $(CopyDir)\include\leveldb-$(ApiVersion)\leveldb - - - - - - <_PropertySheetDisplayName>Prjprops - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - - $(PrjInstallRoot) - - - $(PrjIncludeDir) - - - $(CopyDir) - - - $(PreBuildCfg) - - - $(ApiVersion) - - - $(PrjDoInstall) - - - $(PrjLibtoolCompatibleDllPrefix) - - - $(PrjLibtoolCompatibleDllSuffix) - - - $(PrjSeparateDllPrefix) - - - $(PrjSeparateDllSuffix) - - - $(PrjDllPrefix) - - - $(PrjDllSuffix) - - - diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/install.vcxproj b/gvsbuild/patches/leveldb/build/win32/vs15/install.vcxproj deleted file mode 100644 index aaeebf274..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/install.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F42026FA-B395-4D5D-9F86-A98636F69607} - Win32Proj - install - - - - Application - true - v141 - Unicode - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - Application - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - true - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - false - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - false - $(PrjInstallRoot)\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - - - $(PrjDoInstall) - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - - - $(PrjDoInstall) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - true - true - - - $(PrjDoInstall) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - - - Console - true - true - true - - - $(PrjDoInstall) - - - - - - - - diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/install.vcxproj.filters b/gvsbuild/patches/leveldb/build/win32/vs15/install.vcxproj.filters deleted file mode 100644 index 6a1782f7d..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/install.vcxproj.filters +++ /dev/null @@ -1,17 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.def b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.def deleted file mode 100644 index 30d5583e6..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.def +++ /dev/null @@ -1,117 +0,0 @@ -LIBRARY "leveldb.dll" - -EXPORTS - -leveldb_open - -leveldb_close - -leveldb_put - -leveldb_delete - -leveldb_write - -leveldb_get - -leveldb_create_iterator - -leveldb_create_snapshot - -leveldb_release_snapshot - -leveldb_property_value - -leveldb_approximate_sizes - -leveldb_destroy_db - -leveldb_repair_db - -leveldb_iter_destroy - -leveldb_iter_valid - -leveldb_iter_seek_to_first - -leveldb_iter_seek_to_last - -leveldb_iter_seek - -leveldb_iter_next - -leveldb_iter_prev - -leveldb_iter_key - -leveldb_iter_value - -leveldb_iter_get_error - -leveldb_writebatch_create - -leveldb_writebatch_destroy - -leveldb_writebatch_clear - -leveldb_writebatch_put - -leveldb_writebatch_delete - -leveldb_writebatch_iterate - -leveldb_options_create - -leveldb_options_destroy - -leveldb_options_set_comparator - -leveldb_options_set_create_if_missing - -leveldb_options_set_error_if_exists - -leveldb_options_set_paranoid_checks - -leveldb_options_set_env - -leveldb_options_set_info_log - -leveldb_options_set_write_buffer_size - -leveldb_options_set_max_open_files - -leveldb_options_set_cache - -leveldb_options_set_block_size - -leveldb_options_set_block_restart_interval - -leveldb_options_set_compression - -leveldb_comparator_create - -leveldb_comparator_destroy - -leveldb_readoptions_create - -leveldb_readoptions_destroy - -leveldb_readoptions_set_verify_checksums - -leveldb_readoptions_set_fill_cache - -leveldb_readoptions_set_snapshot - -leveldb_writeoptions_create - -leveldb_writeoptions_destroy - -leveldb_writeoptions_set_sync - -leveldb_cache_create_lru - -leveldb_cache_destroy - -leveldb_create_default_env - -leveldb_env_destroy diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.filters b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.filters deleted file mode 100644 index bf980ab8b..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.filters +++ /dev/null @@ -1,133 +0,0 @@ - - - - - {af757a90-f702-4a23-8a32-f34bd9ac7d55} - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - func_def - - - - - func_def - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.sln b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.sln deleted file mode 100644 index c2b0824df..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.sln +++ /dev/null @@ -1,54 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "leveldb", "leveldb.vcxproj", "{8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{F42026FA-B395-4D5D-9F86-A98636F69607}" - ProjectSection(ProjectDependencies) = postProject - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396} = {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "leveldb_test", "leveldb_test\leveldb_test.vcxproj", "{E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}" - ProjectSection(ProjectDependencies) = postProject - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2} = {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|Win32.Build.0 = Debug|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|x64.ActiveCfg = Debug|x64 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Debug|x64.Build.0 = Debug|x64 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|Win32.ActiveCfg = Release|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|Win32.Build.0 = Release|Win32 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|x64.ActiveCfg = Release|x64 - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2}.Release|x64.Build.0 = Release|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|Win32.ActiveCfg = Debug|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|Win32.Build.0 = Debug|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|x64.ActiveCfg = Debug|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Debug|x64.Build.0 = Debug|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|Win32.ActiveCfg = Release|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|Win32.Build.0 = Release|Win32 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|x64.ActiveCfg = Release|x64 - {F42026FA-B395-4D5D-9F86-A98636F69607}.Release|x64.Build.0 = Release|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|Win32.ActiveCfg = Debug|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|Win32.Build.0 = Debug|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|x64.ActiveCfg = Debug|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Debug|x64.Build.0 = Debug|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|Win32.ActiveCfg = Release|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|Win32.Build.0 = Release|Win32 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|x64.ActiveCfg = Release|x64 - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.vcxproj b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.vcxproj deleted file mode 100644 index 9cd907fb4..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb.vcxproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8B5799B7-7AE7-4707-9FEB-6A17005A9BE2} - Win32Proj - leveldb - - - - DynamicLibrary - true - v141 - Unicode - - - DynamicLibrary - true - v141 - Unicode - - - DynamicLibrary - false - v141 - true - Unicode - - - DynamicLibrary - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - leveldb - - - false - .dll - - - false - .dll - leveldb - $(VC_IncludePath);$(WindowsSDK_IncludePath); - $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64); - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - Shlwapi.lib;%(AdditionalDependencies) - D:\Anaconda\libs;D:\ThirdPartyLibrary\pyleveldb\leveldbwin\lib_leveldb_vc10\lib\Release;%(AdditionalLibraryDirectories) - leveldb.def - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - Shlwapi.lib;%(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).lib - leveldb.def - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - %(AdditionalLibraryDirectories) - Shlwapi.lib - leveldb.def - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).lib - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;LEVELDB_EXT_EXPORTS;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - ..\..\..\;..\..\..\include;..\..\..\port\win;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - %(AdditionalLibraryDirectories) - Shlwapi.lib;%(AdditionalDependencies) - leveldb.def - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).dll - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/ReadMe.txt b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/ReadMe.txt deleted file mode 100644 index a0072cb9a..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/ReadMe.txt +++ /dev/null @@ -1,40 +0,0 @@ -======================================================================== - CONSOLE APPLICATION : leveldb_test Project Overview -======================================================================== - -AppWizard has created this leveldb_test application for you. - -This file contains a summary of what you will find in each of the files that -make up your leveldb_test application. - - -leveldb_test.vcxproj - This is the main project file for VC++ projects generated using an Application Wizard. - It contains information about the version of Visual C++ that generated the file, and - information about the platforms, configurations, and project features selected with the - Application Wizard. - -leveldb_test.vcxproj.filters - This is the filters file for VC++ projects generated using an Application Wizard. - It contains information about the association between the files in your project - and the filters. This association is used in the IDE to show grouping of files with - similar extensions under a specific node (for e.g. ".cpp" files are associated with the - "Source Files" filter). - -leveldb_test.cpp - This is the main application source file. - -///////////////////////////////////////////////////////////////////////////// -Other standard files: - -StdAfx.h, StdAfx.cpp - These files are used to build a precompiled header (PCH) file - named leveldb_test.pch and a precompiled types file named StdAfx.obj. - -///////////////////////////////////////////////////////////////////////////// -Other notes: - -AppWizard uses "TODO:" comments to indicate parts of the source code you -should add to or customize. - -///////////////////////////////////////////////////////////////////////////// diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/leveldb_test.cpp b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/leveldb_test.cpp deleted file mode 100644 index 0c5d17ebb..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/leveldb_test.cpp +++ /dev/null @@ -1,100 +0,0 @@ -// leveldb_test.cpp : Defines the entry point for the console application. -// - -#include "stdafx.h" - -#include -#include -#include - -#include "include\leveldb\c.h" - -int _tmain(int argc, _TCHAR* argv[]) -{ - - leveldb_t* db; - leveldb_comparator_t* cmp; - leveldb_cache_t* cache; - leveldb_env_t* env; - leveldb_options_t* options; - leveldb_readoptions_t* roptions; - leveldb_writeoptions_t* woptions; - char* err = NULL; - - - env = leveldb_create_default_env(); - cache = leveldb_cache_create_lru(100000); - - options = leveldb_options_create(); - // leveldb_options_set_comparator(options, cmp); - //leveldb_options_set_error_if_exists(options, 1); - //leveldb_options_set_cache(options, cache); - //leveldb_options_set_env(options, env); - //leveldb_options_set_info_log(options, NULL); - //leveldb_options_set_write_buffer_size(options, 100000); - //leveldb_options_set_paranoid_checks(options, 1); - //leveldb_options_set_max_open_files(options, 10); - //leveldb_options_set_block_size(options, 1024); - //leveldb_options_set_block_restart_interval(options, 8); - leveldb_options_set_compression(options, leveldb_no_compression); - - //roptions = leveldb_readoptions_create(); - //leveldb_readoptions_set_verify_checksums(roptions, 1); - //leveldb_readoptions_set_fill_cache(roptions, 0); - - - woptions = leveldb_writeoptions_create(); - //leveldb_writeoptions_set_sync(woptions, 1); - leveldb_writeoptions_set_sync(woptions, 0); - - leveldb_destroy_db(options, "C:/Trace/test.db", &err); - - leveldb_options_set_create_if_missing(options, 1); - db = leveldb_open(options, "C:/Trace/test.db", &err); - - - - leveldb_put(db, woptions, "foo", 3, "hello", 5, &err); - //leveldb_writebatch_t* wb = leveldb_writebatch_create(); - //leveldb_writebatch_put(wb, "foo", 3, "a", 1); - //leveldb_writebatch_clear(wb); - //leveldb_writebatch_put(wb, "bar", 3, "b", 1); - //leveldb_writebatch_put(wb, "box", 3, "c", 1); - //leveldb_writebatch_delete(wb, "bar", 3); - //leveldb_write(db, woptions, wb, &err); - - - - char data[200]; - char key[64]; - LARGE_INTEGER t0, t1, freq; - - QueryPerformanceCounter((LARGE_INTEGER *)&t0); - unsigned long last_time = GetTickCount(); - unsigned long max_time = 0; - - int i, j; - for (i = 0; i< 5000000; i++) { - //UpdateTimeString(date,64); - _itoa(i, key, 10); - leveldb_put(db, woptions, key, strlen(key), data, 200, &err); - - unsigned long time = GetTickCount(); - unsigned long max = time - last_time; - last_time = time; - if (max > max_time) { - max_time = max; - } - } - - QueryPerformanceCounter((LARGE_INTEGER *)&t1); - - printf("max_time:%d \n", max_time); - - unsigned long time = (((t1.QuadPart - t0.QuadPart) * 1000000) ); - - printf("i:%d time:%f \n", i, time); - int n = getchar(); - return 0; -} - diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/leveldb_test.vcxproj b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/leveldb_test.vcxproj deleted file mode 100644 index 40b75cb61..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/leveldb_test.vcxproj +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E29C2667-C5A5-4668-AE5B-4B3E0BBF1396} - Win32Proj - leveldb_test - - - - Application - true - v141 - Unicode - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - Application - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - true - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - false - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - false - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - - Use - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - $(PrjInstallRoot)\lib; - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Use - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - - - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - true - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - $(PrjInstallRoot)\lib; - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - true - ../../../../; - - - Console - true - true - true - $(OutDir)$(PrjDllPrefix)$(ProjectName)$(PrjDllSuffix).exe - - - $(OutDir)leveldb.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/leveldb_test.vcxproj.filters b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/leveldb_test.vcxproj.filters deleted file mode 100644 index 2ebee261e..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/leveldb_test.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/stdafx.cpp b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/stdafx.cpp deleted file mode 100644 index 66dafe2c4..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// leveldb_test.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/stdafx.h b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/stdafx.h deleted file mode 100644 index b005a839d..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/stdafx.h +++ /dev/null @@ -1,15 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include "targetver.h" - -#include -#include - - - -// TODO: reference additional headers your program requires here diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/targetver.h b/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/targetver.h deleted file mode 100644 index 87c0086de..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/leveldb_test/targetver.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include diff --git a/gvsbuild/patches/leveldb/build/win32/vs15/property.props b/gvsbuild/patches/leveldb/build/win32/vs15/property.props deleted file mode 100644 index 0cb7fbabf..000000000 --- a/gvsbuild/patches/leveldb/build/win32/vs15/property.props +++ /dev/null @@ -1,89 +0,0 @@ - - - - 1.0 - 12 - $(SolutionDir)..\..\..\..\..\..\..\gtk\$(Platform)\$(Configuration) - - $(SolutionDir)..\..\..\..\leveldb-rel - $(SolutionDir)$(Configuration)\$(PlatformName)\bin - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName) - ..\..\.. - lib - - - - $(PrjSeparateDllPrefix) - $(PrjSeparateDllSuffix) - - - - - - - - mkdir $(CopyDir) - - mkdir $(CopyDir)\bin - - copy $(BinDir)\*.exe $(CopyDir)\bin - - copy $(BinDir)\*.dll $(CopyDir)\bin - - copy $(BinDir)\*.pdb $(CopyDir)\bin - - mkdir $(CopyDir)\lib - - copy $(BinDir)\*.lib $(CopyDir)\lib - - mkdir $(CopyDir)\include\leveldb-$(ApiVersion)\leveldb - - copy $(SolDir)\include\leveldb\*.h $(CopyDir)\include\leveldb-$(ApiVersion)\leveldb - - - - - - <_PropertySheetDisplayName>Prjprops - $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ - $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ - - - - $(PrjInstallRoot) - - - $(PrjIncludeDir) - - - $(CopyDir) - - - $(PreBuildCfg) - - - $(ApiVersion) - - - $(PrjDoInstall) - - - $(PrjLibtoolCompatibleDllPrefix) - - - $(PrjLibtoolCompatibleDllSuffix) - - - $(PrjSeparateDllPrefix) - - - $(PrjSeparateDllSuffix) - - - $(PrjDllPrefix) - - - $(PrjDllSuffix) - - - diff --git a/gvsbuild/patches/leveldb/port/port.h b/gvsbuild/patches/leveldb/port/port.h deleted file mode 100644 index 4baafa8e2..000000000 --- a/gvsbuild/patches/leveldb/port/port.h +++ /dev/null @@ -1,21 +0,0 @@ -// 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_PORT_PORT_H_ -#define STORAGE_LEVELDB_PORT_PORT_H_ - -#include - -// 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) -# include "port/port_posix.h" -#elif defined(LEVELDB_PLATFORM_CHROMIUM) -# include "port/port_chromium.h" -#elif defined(LEVELDB_PLATFORM_WINDOWS) -# include "port/port_win.h" -#endif - -#endif // STORAGE_LEVELDB_PORT_PORT_H_ diff --git a/gvsbuild/patches/leveldb/port/port_win.cc b/gvsbuild/patches/leveldb/port/port_win.cc deleted file mode 100644 index 7cf953793..000000000 --- a/gvsbuild/patches/leveldb/port/port_win.cc +++ /dev/null @@ -1,154 +0,0 @@ -// LevelDB 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. -// -// See port_example.h for documentation for the following types/functions. - -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of the University of California, Berkeley nor the -// names of its contributors may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -#include "port/port_win.h" - -#include -#include - -namespace leveldb { -namespace port { - -Mutex::Mutex() : - cs_(nullptr) { - assert(!cs_); - cs_ = static_cast(new CRITICAL_SECTION()); - ::InitializeCriticalSection(static_cast(cs_)); - assert(cs_); -} - -Mutex::~Mutex() { - assert(cs_); - ::DeleteCriticalSection(static_cast(cs_)); - delete static_cast(cs_); - cs_ = nullptr; - assert(!cs_); -} - -void Mutex::Lock() { - assert(cs_); - ::EnterCriticalSection(static_cast(cs_)); -} - -void Mutex::Unlock() { - assert(cs_); - ::LeaveCriticalSection(static_cast(cs_)); -} - -void Mutex::AssertHeld() { - assert(cs_); - assert(1); -} - -CondVar::CondVar(Mutex* mu) : - waiting_(0), - mu_(mu), - sem1_(::CreateSemaphore(NULL, 0, 10000, NULL)), - sem2_(::CreateSemaphore(NULL, 0, 10000, NULL)) { - assert(mu_); -} - -CondVar::~CondVar() { - ::CloseHandle(sem1_); - ::CloseHandle(sem2_); -} - -void CondVar::Wait() { - mu_->AssertHeld(); - - wait_mtx_.Lock(); - ++waiting_; - wait_mtx_.Unlock(); - - mu_->Unlock(); - - // initiate handshake - ::WaitForSingleObject(sem1_, INFINITE); - ::ReleaseSemaphore(sem2_, 1, NULL); - mu_->Lock(); -} - -void CondVar::Signal() { - wait_mtx_.Lock(); - if (waiting_ > 0) { - --waiting_; - - // finalize handshake - ::ReleaseSemaphore(sem1_, 1, NULL); - ::WaitForSingleObject(sem2_, INFINITE); - } - wait_mtx_.Unlock(); -} - -void CondVar::SignalAll() { - wait_mtx_.Lock(); - for(long i = 0; i < waiting_; ++i) { - ::ReleaseSemaphore(sem1_, 1, NULL); - while(waiting_ > 0) { - --waiting_; - ::WaitForSingleObject(sem2_, INFINITE); - } - } - wait_mtx_.Unlock(); -} - -AtomicPointer::AtomicPointer(void* v) { - Release_Store(v); -} - -BOOL CALLBACK InitHandleFunction (PINIT_ONCE InitOnce, PVOID func, PVOID *lpContext) { - ((void (*)())func)(); - return true; -} - -void InitOnce(OnceType* once, void (*initializer)()) { - InitOnceExecuteOnce((PINIT_ONCE)once, InitHandleFunction, initializer, NULL); -} - -void* AtomicPointer::Acquire_Load() const { - void * p = nullptr; - InterlockedExchangePointer(&p, rep_); - return p; -} - -void AtomicPointer::Release_Store(void* v) { - InterlockedExchangePointer(&rep_, v); -} - -void* AtomicPointer::NoBarrier_Load() const { - return rep_; -} - -void AtomicPointer::NoBarrier_Store(void* v) { - rep_ = v; -} - -} -} diff --git a/gvsbuild/patches/leveldb/port/port_win.h b/gvsbuild/patches/leveldb/port/port_win.h deleted file mode 100644 index f42ceb350..000000000 --- a/gvsbuild/patches/leveldb/port/port_win.h +++ /dev/null @@ -1,163 +0,0 @@ -// LevelDB 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. -// -// See port_example.h for documentation for the following types/functions. - -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of the University of California, Berkeley nor the -// names of its contributors may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef STORAGE_LEVELDB_PORT_PORT_WIN_H_ -#define STORAGE_LEVELDB_PORT_PORT_WIN_H_ - -#if _MSC_VER < 1900 -#define snprintf _snprintf -#endif -#define close _close -#define fread_unlocked _fread_nolock - -#include -#include -#ifdef SNAPPY -#include -#endif - -#include "BaseTsd.h" -typedef LONG_PTR ssize_t; - -namespace leveldb { -namespace port { - -// Windows is little endian (for now :p) -static const bool kLittleEndian = true; - -class CondVar; - -class Mutex { - public: - Mutex(); - ~Mutex(); - - void Lock(); - void Unlock(); - void AssertHeld(); - - private: - friend class CondVar; - // critical sections are more efficient than mutexes - // but they are not recursive and can only be used to synchronize threads within the same process - // we use opaque void * to avoid including windows.h in port_win.h - void * cs_; - - // No copying - Mutex(const Mutex&); - void operator=(const Mutex&); -}; - -// the Win32 API offers a dependable condition variable mechanism, but only starting with -// Windows 2008 and Vista -// no matter what we will implement our own condition variable with a semaphore -// implementation as described in a paper written by Andrew D. Birrell in 2003 -class CondVar { - public: - explicit CondVar(Mutex* mu); - ~CondVar(); - void Wait(); - void Signal(); - void SignalAll(); - private: - Mutex* mu_; - - Mutex wait_mtx_; - long waiting_; - - void * sem1_; - void * sem2_; - - -}; - -typedef void* OnceType; -#define LEVELDB_ONCE_INIT 0 -extern void InitOnce(port::OnceType*, void (*initializer)()); - -// Storage for a lock-free pointer -class AtomicPointer { - private: - void * rep_; - public: - AtomicPointer() : rep_(nullptr) { } - explicit AtomicPointer(void* v); - void* Acquire_Load() const; - - void Release_Store(void* v); - - void* NoBarrier_Load() const; - - void NoBarrier_Store(void* v); -}; - -inline bool Snappy_Compress(const char* input, size_t length, - ::std::string* output) { -#ifdef SNAPPY - output->resize(snappy::MaxCompressedLength(length)); - size_t outlen; - snappy::RawCompress(input, length, &(*output)[0], &outlen); - output->resize(outlen); - return true; -#endif - - return false; -} - -inline bool Snappy_GetUncompressedLength(const char* input, size_t length, - size_t* result) { -#ifdef SNAPPY - return snappy::GetUncompressedLength(input, length, result); -#else - return false; -#endif -} - -inline bool Snappy_Uncompress(const char* input, size_t length, - char* output) { -#ifdef SNAPPY - return snappy::RawUncompress(input, length, output); -#else - return false; -#endif -} - -inline bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg) { - return false; -} - -inline uint32_t AcceleratedCRC32C(uint32_t crc, const char* buf, size_t size) { - return 0; -} - -} -} - -#endif // STORAGE_LEVELDB_PORT_PORT_WIN_H_ diff --git a/gvsbuild/patches/leveldb/port/win/stdint.h b/gvsbuild/patches/leveldb/port/win/stdint.h deleted file mode 100644 index d071aaaae..000000000 --- a/gvsbuild/patches/leveldb/port/win/stdint.h +++ /dev/null @@ -1,45 +0,0 @@ -// 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. - -// MSVC didn't ship with this file until the 2010 version. - -#ifndef STORAGE_LEVELDB_PORT_WIN_STDINT_H_ -#define STORAGE_LEVELDB_PORT_WIN_STDINT_H_ - -#if !defined(_MSC_VER) -#error This file should only be included when compiling with MSVC. -#endif - -// Define C99 equivalent types. -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed int int32_t; -typedef signed long long int64_t; -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef unsigned long long uint64_t; - -typedef signed char int_least8_t; -typedef short int_least16_t; -typedef int int_least32_t; -typedef long long int_least64_t; -typedef unsigned char uint_least8_t; -typedef unsigned short uint_least16_t; -typedef unsigned int uint_least32_t; -typedef unsigned long long uint_least64_t; - -typedef signed char int_fast8_t; -typedef int int_fast16_t; -typedef int int_fast32_t; -typedef long long int_fast64_t; -typedef unsigned char uint_fast8_t; -typedef unsigned int uint_fast16_t; -typedef unsigned int uint_fast32_t; -typedef unsigned long long uint_fast64_t; - -typedef long long intmax_t; -typedef unsigned long long uintmax_t; - -#endif // STORAGE_LEVELDB_PORT_WIN_STDINT_H_ diff --git a/gvsbuild/patches/leveldb/port/win/unistd.h b/gvsbuild/patches/leveldb/port/win/unistd.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/gvsbuild/patches/leveldb/util/env_win.cc b/gvsbuild/patches/leveldb/util/env_win.cc deleted file mode 100644 index 83d4363a1..000000000 --- a/gvsbuild/patches/leveldb/util/env_win.cc +++ /dev/null @@ -1,1017 +0,0 @@ -// This file contains source that originates from: -// http://code.google.com/p/leveldbwin/source/browse/trunk/win32_impl_src/env_win32.h -// http://code.google.com/p/leveldbwin/source/browse/trunk/win32_impl_src/port_win32.cc -// Those files dont' have any explict license headers but the -// project (http://code.google.com/p/leveldbwin/) lists the 'New BSD License' -// as the license. -#if defined(LEVELDB_PLATFORM_WINDOWS) -#include - - -#include "leveldb/env.h" - -#include "port/port.h" -#include "leveldb/slice.h" -#include "util/logging.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#pragma comment(lib,"DbgHelp.lib") - -#ifdef max -#undef max -#endif - -#ifndef va_copy -#define va_copy(d,s) ((d) = (s)) -#endif - -#if defined DeleteFile -#undef DeleteFile -#endif - -//Declarations -namespace leveldb -{ - -namespace Win32 -{ - -#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ - TypeName(const TypeName&); \ - void operator=(const TypeName&) - -std::string GetCurrentDir(); -std::wstring GetCurrentDirW(); - -static const std::string CurrentDir = GetCurrentDir(); -static const std::wstring CurrentDirW = GetCurrentDirW(); - -std::string& ModifyPath(std::string& path); -std::wstring& ModifyPath(std::wstring& path); - -std::string GetLastErrSz(); -std::wstring GetLastErrSzW(); - -size_t GetPageSize(); - -typedef void (*ScheduleProc)(void*) ; - -struct WorkItemWrapper -{ - WorkItemWrapper(ScheduleProc proc_,void* content_); - ScheduleProc proc; - void* pContent; -}; - -DWORD WINAPI WorkItemWrapperProc(LPVOID pContent); - -class Win32SequentialFile : public SequentialFile -{ -public: - friend class Win32Env; - virtual ~Win32SequentialFile(); - virtual Status Read(size_t n, Slice* result, char* scratch); - virtual Status Skip(uint64_t n); - BOOL isEnable(); -private: - BOOL _Init(); - void _CleanUp(); - Win32SequentialFile(const std::string& fname); - std::string _filename; - ::HANDLE _hFile; - DISALLOW_COPY_AND_ASSIGN(Win32SequentialFile); -}; - -class Win32RandomAccessFile : public RandomAccessFile -{ -public: - friend class Win32Env; - virtual ~Win32RandomAccessFile(); - virtual Status Read(uint64_t offset, size_t n, Slice* result,char* scratch) const; - BOOL isEnable(); -private: - BOOL _Init(LPCWSTR path); - void _CleanUp(); - Win32RandomAccessFile(const std::string& fname); - HANDLE _hFile; - const std::string _filename; - DISALLOW_COPY_AND_ASSIGN(Win32RandomAccessFile); -}; - -class Win32MapFile : public WritableFile -{ -public: - Win32MapFile(const std::string& fname); - - ~Win32MapFile(); - virtual Status Append(const Slice& data); - virtual Status Close(); - virtual Status Flush(); - virtual Status Sync(); - BOOL isEnable(); -private: - std::string _filename; - HANDLE _hFile; - size_t _page_size; - size_t _map_size; // How much extra memory to map at a time - char* _base; // The mapped region - HANDLE _base_handle; - char* _limit; // Limit of the mapped region - char* _dst; // Where to write next (in range [base_,limit_]) - char* _last_sync; // Where have we synced up to - uint64_t _file_offset; // Offset of base_ in file - //LARGE_INTEGER file_offset_; - // Have we done an munmap of unsynced data? - bool _pending_sync; - - // Roundup x to a multiple of y - static size_t _Roundup(size_t x, size_t y); - size_t _TruncateToPageBoundary(size_t s); - bool _UnmapCurrentRegion(); - bool _MapNewRegion(); - DISALLOW_COPY_AND_ASSIGN(Win32MapFile); - BOOL _Init(LPCWSTR Path); -}; - -class Win32FileLock : public FileLock -{ -public: - friend class Win32Env; - virtual ~Win32FileLock(); - BOOL isEnable(); -private: - BOOL _Init(LPCWSTR path); - void _CleanUp(); - Win32FileLock(const std::string& fname); - HANDLE _hFile; - std::string _filename; - DISALLOW_COPY_AND_ASSIGN(Win32FileLock); -}; - -class Win32Logger : public Logger -{ -public: - friend class Win32Env; - virtual ~Win32Logger(); - virtual void Logv(const char* format, va_list ap); -private: - explicit Win32Logger(WritableFile* pFile); - WritableFile* _pFileProxy; - DISALLOW_COPY_AND_ASSIGN(Win32Logger); -}; - -class Win32Env : public Env -{ -public: - Win32Env(); - virtual ~Win32Env(); - virtual Status NewSequentialFile(const std::string& fname, - SequentialFile** result); - - virtual Status NewRandomAccessFile(const std::string& fname, - RandomAccessFile** result); - virtual Status NewWritableFile(const std::string& fname, - WritableFile** result); - - virtual bool FileExists(const std::string& fname); - - virtual Status GetChildren(const std::string& dir, - std::vector* result); - - virtual Status DeleteFile(const std::string& fname); - - virtual Status CreateDir(const std::string& dirname); - - virtual Status DeleteDir(const std::string& dirname); - - virtual Status GetFileSize(const std::string& fname, uint64_t* file_size); - - virtual Status RenameFile(const std::string& src, - const std::string& target); - - virtual Status LockFile(const std::string& fname, FileLock** lock); - - virtual Status UnlockFile(FileLock* lock); - - virtual void Schedule( - void (*function)(void* arg), - void* arg); - - virtual void StartThread(void (*function)(void* arg), void* arg); - - virtual Status GetTestDirectory(std::string* path); - - //virtual void Logv(WritableFile* log, const char* format, va_list ap); - - virtual Status NewLogger(const std::string& fname, Logger** result); - - virtual uint64_t NowMicros(); - - virtual void SleepForMicroseconds(int micros); -}; - -void ToWidePath(const std::string& value, std::wstring& target) { - wchar_t buffer[MAX_PATH]; - MultiByteToWideChar(CP_ACP, 0, value.c_str(), -1, buffer, MAX_PATH); - target = buffer; -} - -void ToNarrowPath(const std::wstring& value, std::string& target) { - char buffer[MAX_PATH]; - WideCharToMultiByte(CP_ACP, 0, value.c_str(), -1, buffer, MAX_PATH, NULL, NULL); - target = buffer; -} - -std::string GetCurrentDir() -{ - CHAR path[MAX_PATH]; - ::GetModuleFileNameA(::GetModuleHandleA(NULL),path,MAX_PATH); - *strrchr(path,'\\') = 0; - return std::string(path); -} - -std::wstring GetCurrentDirW() -{ - WCHAR path[MAX_PATH]; - ::GetModuleFileNameW(::GetModuleHandleW(NULL),path,MAX_PATH); - *wcsrchr(path,L'\\') = 0; - return std::wstring(path); -} - -std::string& ModifyPath(std::string& path) -{ - if(path[0] == '/' || path[0] == '\\'){ - path = CurrentDir + path; - } - std::replace(path.begin(),path.end(),'/','\\'); - - return path; -} - -std::wstring& ModifyPath(std::wstring& path) -{ - if(path[0] == L'/' || path[0] == L'\\'){ - path = CurrentDirW + path; - } - std::replace(path.begin(),path.end(),L'/',L'\\'); - return path; -} - -std::string GetLastErrSz() -{ - LPWSTR lpMsgBuf; - FormatMessageW( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - 0, // Default language - (LPWSTR) &lpMsgBuf, - 0, - NULL - ); - std::string Err; - ToNarrowPath(lpMsgBuf, Err); - LocalFree( lpMsgBuf ); - return Err; -} - -std::wstring GetLastErrSzW() -{ - LPVOID lpMsgBuf; - FormatMessageW( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - 0, // Default language - (LPWSTR) &lpMsgBuf, - 0, - NULL - ); - std::wstring Err = (LPCWSTR)lpMsgBuf; - LocalFree(lpMsgBuf); - return Err; -} - -WorkItemWrapper::WorkItemWrapper( ScheduleProc proc_,void* content_ ) : - proc(proc_),pContent(content_) -{ - -} - -DWORD WINAPI WorkItemWrapperProc(LPVOID pContent) -{ - WorkItemWrapper* item = static_cast(pContent); - ScheduleProc TempProc = item->proc; - void* arg = item->pContent; - delete item; - TempProc(arg); - return 0; -} - -size_t GetPageSize() -{ - SYSTEM_INFO si; - GetSystemInfo(&si); - return std::max(si.dwPageSize,si.dwAllocationGranularity); -} - -const size_t g_PageSize = GetPageSize(); - - -Win32SequentialFile::Win32SequentialFile( const std::string& fname ) : - _filename(fname),_hFile(NULL) -{ - _Init(); -} - -Win32SequentialFile::~Win32SequentialFile() -{ - _CleanUp(); -} - -Status Win32SequentialFile::Read( size_t n, Slice* result, char* scratch ) -{ - Status sRet; - DWORD hasRead = 0; - if(_hFile && ReadFile(_hFile,scratch,n,&hasRead,NULL) ){ - *result = Slice(scratch,hasRead); - } else { - sRet = Status::IOError(_filename, Win32::GetLastErrSz() ); - } - return sRet; -} - -Status Win32SequentialFile::Skip( uint64_t n ) -{ - Status sRet; - LARGE_INTEGER Move,NowPointer; - Move.QuadPart = n; - if(!SetFilePointerEx(_hFile,Move,&NowPointer,FILE_CURRENT)){ - sRet = Status::IOError(_filename,Win32::GetLastErrSz()); - } - return sRet; -} - -BOOL Win32SequentialFile::isEnable() -{ - return _hFile ? TRUE : FALSE; -} - -BOOL Win32SequentialFile::_Init() -{ - std::wstring path; - ToWidePath(_filename, path); - _hFile = CreateFileW(path.c_str(), - GENERIC_READ, - FILE_SHARE_READ, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); - return _hFile ? TRUE : FALSE; -} - -void Win32SequentialFile::_CleanUp() -{ - if(_hFile){ - CloseHandle(_hFile); - _hFile = NULL; - } -} - -Win32RandomAccessFile::Win32RandomAccessFile( const std::string& fname ) : - _filename(fname),_hFile(NULL) -{ - std::wstring path; - ToWidePath(fname, path); - _Init( path.c_str() ); -} - -Win32RandomAccessFile::~Win32RandomAccessFile() -{ - _CleanUp(); -} - -Status Win32RandomAccessFile::Read(uint64_t offset,size_t n,Slice* result,char* scratch) const -{ - Status sRet; - OVERLAPPED ol = {0}; - ZeroMemory(&ol,sizeof(ol)); - ol.Offset = (DWORD)offset; - ol.OffsetHigh = (DWORD)(offset >> 32); - DWORD hasRead = 0; - if(!ReadFile(_hFile,scratch,n,&hasRead,&ol)) - sRet = Status::IOError(_filename,Win32::GetLastErrSz()); - else - *result = Slice(scratch,hasRead); - return sRet; -} - -BOOL Win32RandomAccessFile::_Init( LPCWSTR path ) -{ - BOOL bRet = FALSE; - if(!_hFile) - _hFile = ::CreateFileW(path,GENERIC_READ,0,NULL,OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,NULL); - if(!_hFile || _hFile == INVALID_HANDLE_VALUE ) - _hFile = NULL; - else - bRet = TRUE; - return bRet; -} - -BOOL Win32RandomAccessFile::isEnable() -{ - return _hFile ? TRUE : FALSE; -} - -void Win32RandomAccessFile::_CleanUp() -{ - if(_hFile){ - ::CloseHandle(_hFile); - _hFile = NULL; - } -} - -size_t Win32MapFile::_Roundup( size_t x, size_t y ) -{ - return ((x + y - 1) / y) * y; -} - -size_t Win32MapFile::_TruncateToPageBoundary( size_t s ) -{ - s -= (s & (_page_size - 1)); - assert((s % _page_size) == 0); - return s; -} - -bool Win32MapFile::_UnmapCurrentRegion() -{ - bool result = true; - if (_base != NULL) { - if (_last_sync < _limit) { - // Defer syncing this data until next Sync() call, if any - _pending_sync = true; - } - UnmapViewOfFile(_base); - CloseHandle(_base_handle); - _file_offset += _limit - _base; - _base = NULL; - _base_handle = NULL; - _limit = NULL; - _last_sync = NULL; - _dst = NULL; - // Increase the amount we map the next time, but capped at 1MB - if (_map_size < (1<<20)) { - _map_size *= 2; - } - } - return result; -} - -bool Win32MapFile::_MapNewRegion() -{ - assert(_base == NULL); - //LONG newSizeHigh = (LONG)((file_offset_ + map_size_) >> 32); - //LONG newSizeLow = (LONG)((file_offset_ + map_size_) & 0xFFFFFFFF); - DWORD off_hi = (DWORD)(_file_offset >> 32); - DWORD off_lo = (DWORD)(_file_offset & 0xFFFFFFFF); - LARGE_INTEGER newSize; - newSize.QuadPart = _file_offset + _map_size; - SetFilePointerEx(_hFile, newSize, NULL, FILE_BEGIN); - SetEndOfFile(_hFile); - - _base_handle = CreateFileMappingA( - _hFile, - NULL, - PAGE_READWRITE, - 0, - 0, - 0); - if (_base_handle != NULL) { - _base = (char*) MapViewOfFile(_base_handle, - FILE_MAP_ALL_ACCESS, - off_hi, - off_lo, - _map_size); - if (_base != NULL) { - _limit = _base + _map_size; - _dst = _base; - _last_sync = _base; - return true; - } - } - return false; -} - -Win32MapFile::Win32MapFile( const std::string& fname) : - _filename(fname), - _hFile(NULL), - _page_size(Win32::g_PageSize), - _map_size(_Roundup(65536, Win32::g_PageSize)), - _base(NULL), - _base_handle(NULL), - _limit(NULL), - _dst(NULL), - _last_sync(NULL), - _file_offset(0), - _pending_sync(false) -{ - std::wstring path; - ToWidePath(fname, path); - _Init(path.c_str()); - assert((Win32::g_PageSize & (Win32::g_PageSize - 1)) == 0); -} - -Status Win32MapFile::Append( const Slice& data ) -{ - const char* src = data.data(); - size_t left = data.size(); - Status s; - while (left > 0) { - assert(_base <= _dst); - assert(_dst <= _limit); - size_t avail = _limit - _dst; - if (avail == 0) { - if (!_UnmapCurrentRegion() || - !_MapNewRegion()) { - return Status::IOError("WinMmapFile.Append::UnmapCurrentRegion or MapNewRegion: ", Win32::GetLastErrSz()); - } - } - size_t n = (left <= avail) ? left : avail; - memcpy(_dst, src, n); - _dst += n; - src += n; - left -= n; - } - return s; -} - -Status Win32MapFile::Close() -{ - Status s; - size_t unused = _limit - _dst; - if (!_UnmapCurrentRegion()) { - s = Status::IOError("WinMmapFile.Close::UnmapCurrentRegion: ",Win32::GetLastErrSz()); - } else if (unused > 0) { - // Trim the extra space at the end of the file - LARGE_INTEGER newSize; - newSize.QuadPart = _file_offset - unused; - if (!SetFilePointerEx(_hFile, newSize, NULL, FILE_BEGIN)) { - s = Status::IOError("WinMmapFile.Close::SetFilePointer: ",Win32::GetLastErrSz()); - } else - SetEndOfFile(_hFile); - } - if (!CloseHandle(_hFile)) { - if (s.ok()) { - s = Status::IOError("WinMmapFile.Close::CloseHandle: ", Win32::GetLastErrSz()); - } - } - _hFile = INVALID_HANDLE_VALUE; - _base = NULL; - _base_handle = NULL; - _limit = NULL; - - return s; -} - -Status Win32MapFile::Sync() -{ - Status s; - if (_pending_sync) { - // Some unmapped data was not synced - _pending_sync = false; - if (!FlushFileBuffers(_hFile)) { - s = Status::IOError("WinMmapFile.Sync::FlushFileBuffers: ",Win32::GetLastErrSz()); - } - } - if (_dst > _last_sync) { - // Find the beginnings of the pages that contain the first and last - // bytes to be synced. - size_t p1 = _TruncateToPageBoundary(_last_sync - _base); - size_t p2 = _TruncateToPageBoundary(_dst - _base - 1); - _last_sync = _dst; - if (!FlushViewOfFile(_base + p1, p2 - p1 + _page_size)) { - s = Status::IOError("WinMmapFile.Sync::FlushViewOfFile: ",Win32::GetLastErrSz()); - } - } - return s; -} - -Status Win32MapFile::Flush() -{ - return Status::OK(); -} - -Win32MapFile::~Win32MapFile() -{ - if (_hFile != INVALID_HANDLE_VALUE) { - Win32MapFile::Close(); - } -} - -BOOL Win32MapFile::_Init( LPCWSTR Path ) -{ - DWORD Flag = PathFileExistsW(Path) ? OPEN_EXISTING : CREATE_ALWAYS; - _hFile = CreateFileW(Path, - GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ|FILE_SHARE_DELETE|FILE_SHARE_WRITE, - NULL, - Flag, - FILE_ATTRIBUTE_NORMAL, - NULL); - if(!_hFile || _hFile == INVALID_HANDLE_VALUE) - return FALSE; - else - return TRUE; -} - -BOOL Win32MapFile::isEnable() -{ - return _hFile ? TRUE : FALSE; -} - -Win32FileLock::Win32FileLock( const std::string& fname ) : - _hFile(NULL),_filename(fname) -{ - std::wstring path; - ToWidePath(fname, path); - _Init(path.c_str()); -} - -Win32FileLock::~Win32FileLock() -{ - _CleanUp(); -} - -BOOL Win32FileLock::_Init( LPCWSTR path ) -{ - BOOL bRet = FALSE; - if(!_hFile) - _hFile = ::CreateFileW(path,0,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL); - if(!_hFile || _hFile == INVALID_HANDLE_VALUE ){ - _hFile = NULL; - } - else - bRet = TRUE; - return bRet; -} - -void Win32FileLock::_CleanUp() -{ - ::CloseHandle(_hFile); - _hFile = NULL; -} - -BOOL Win32FileLock::isEnable() -{ - return _hFile ? TRUE : FALSE; -} - -Win32Logger::Win32Logger(WritableFile* pFile) : _pFileProxy(pFile) -{ - assert(_pFileProxy); -} - -Win32Logger::~Win32Logger() -{ - if(_pFileProxy) - delete _pFileProxy; -} - -void Win32Logger::Logv( const char* format, va_list ap ) -{ - uint64_t thread_id = ::GetCurrentThreadId(); - - // We try twice: the first time with a fixed-size stack allocated buffer, - // and the second time with a much larger dynamically allocated buffer. - char buffer[500]; - for (int iter = 0; iter < 2; iter++) { - char* base; - int bufsize; - if (iter == 0) { - bufsize = sizeof(buffer); - base = buffer; - } else { - bufsize = 30000; - base = new char[bufsize]; - } - char* p = base; - char* limit = base + bufsize; - - SYSTEMTIME st; - GetLocalTime(&st); - p += snprintf(p, limit - p, - "%04d/%02d/%02d-%02d:%02d:%02d.%06d %llx ", - int(st.wYear), - int(st.wMonth), - int(st.wDay), - int(st.wHour), - int(st.wMinute), - int(st.wMinute), - int(st.wMilliseconds), - static_cast(thread_id)); - - // Print the message - if (p < limit) { - va_list backup_ap; - va_copy(backup_ap, ap); - p += vsnprintf(p, limit - p, format, backup_ap); - va_end(backup_ap); - } - - // Truncate to available space if necessary - if (p >= limit) { - if (iter == 0) { - continue; // Try again with larger buffer - } else { - p = limit - 1; - } - } - - // Add newline if necessary - if (p == base || p[-1] != '\n') { - *p++ = '\n'; - } - - assert(p <= limit); - DWORD hasWritten = 0; - if(_pFileProxy){ - _pFileProxy->Append(Slice(base, p - base)); - _pFileProxy->Flush(); - } - if (base != buffer) { - delete[] base; - } - break; - } -} - -bool Win32Env::FileExists(const std::string& fname) -{ - std::string path = fname; - std::wstring wpath; - ToWidePath(ModifyPath(path), wpath); - return ::PathFileExistsW(wpath.c_str()) ? true : false; -} - -Status Win32Env::GetChildren(const std::string& dir, std::vector* result) -{ - Status sRet; - ::WIN32_FIND_DATAW wfd; - std::string path = dir; - ModifyPath(path); - path += "\\*.*"; - std::wstring wpath; - ToWidePath(path, wpath); - - ::HANDLE hFind = ::FindFirstFileW(wpath.c_str() ,&wfd); - if(hFind && hFind != INVALID_HANDLE_VALUE){ - BOOL hasNext = TRUE; - std::string child; - while(hasNext){ - ToNarrowPath(wfd.cFileName, child); - if(child != ".." && child != ".") { - result->push_back(child); - } - hasNext = ::FindNextFileW(hFind,&wfd); - } - ::FindClose(hFind); - } - else - sRet = Status::IOError(dir,"Could not get children."); - return sRet; -} - -void Win32Env::SleepForMicroseconds( int micros ) -{ - ::Sleep((micros + 999) /1000); -} - - -Status Win32Env::DeleteFile( const std::string& fname ) -{ - Status sRet; - std::string path = fname; - std::wstring wpath; - ToWidePath(ModifyPath(path), wpath); - - if(!::DeleteFileW(wpath.c_str())) { - sRet = Status::IOError(path, "Could not delete file."); - } - return sRet; -} - -Status Win32Env::GetFileSize( const std::string& fname, uint64_t* file_size ) -{ - Status sRet; - std::string path = fname; - std::wstring wpath; - ToWidePath(ModifyPath(path), wpath); - - HANDLE file = ::CreateFileW(wpath.c_str(), - GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); - LARGE_INTEGER li; - if(::GetFileSizeEx(file,&li)){ - *file_size = (uint64_t)li.QuadPart; - }else - sRet = Status::IOError(path,"Could not get the file size."); - CloseHandle(file); - return sRet; -} - -Status Win32Env::RenameFile( const std::string& src, const std::string& target ) -{ - Status sRet; - std::string src_path = src; - std::wstring wsrc_path; - ToWidePath(ModifyPath(src_path), wsrc_path); - std::string target_path = target; - std::wstring wtarget_path; - ToWidePath(ModifyPath(target_path), wtarget_path); - - if(!MoveFileW(wsrc_path.c_str(), wtarget_path.c_str() ) ){ - DWORD err = GetLastError(); - if(err == 0x000000b7){ - if(!::DeleteFileW(wtarget_path.c_str() ) ) - sRet = Status::IOError(src, "Could not rename file."); - else if(!::MoveFileW(wsrc_path.c_str(), - wtarget_path.c_str() ) ) - sRet = Status::IOError(src, "Could not rename file."); - } - } - return sRet; -} - -Status Win32Env::LockFile( const std::string& fname, FileLock** lock ) -{ - Status sRet; - std::string path = fname; - ModifyPath(path); - Win32FileLock* _lock = new Win32FileLock(path); - if(!_lock->isEnable()){ - delete _lock; - *lock = NULL; - sRet = Status::IOError(path, "Could not lock file."); - } - else - *lock = _lock; - return sRet; -} - -Status Win32Env::UnlockFile( FileLock* lock ) -{ - Status sRet; - delete lock; - return sRet; -} - -void Win32Env::Schedule( void (*function)(void* arg), void* arg ) -{ - QueueUserWorkItem(Win32::WorkItemWrapperProc, - new Win32::WorkItemWrapper(function,arg), - WT_EXECUTEDEFAULT); -} - -void Win32Env::StartThread( void (*function)(void* arg), void* arg ) -{ - ::_beginthread(function,0,arg); -} - -Status Win32Env::GetTestDirectory( std::string* path ) -{ - Status sRet; - WCHAR TempPath[MAX_PATH]; - ::GetTempPathW(MAX_PATH,TempPath); - ToNarrowPath(TempPath, *path); - path->append("leveldb\\test\\"); - ModifyPath(*path); - return sRet; -} - -uint64_t Win32Env::NowMicros() -{ -#ifndef USE_VISTA_API -#define GetTickCount64 GetTickCount -#endif - return (uint64_t)(GetTickCount64()*1000); -} - -Status Win32Env::CreateDir( const std::string& dirname ) -{ - Status sRet; - std::string path = dirname; - if(path[path.length() - 1] != '\\'){ - path += '\\'; - } - ModifyPath(path); - if(!::MakeSureDirectoryPathExists( path.c_str() ) ){ - sRet = Status::IOError(dirname, "Could not create directory."); - } - return sRet; -} - -Status Win32Env::DeleteDir( const std::string& dirname ) -{ - Status sRet; - std::wstring path; - ToWidePath(dirname, path); - ModifyPath(path); - if(!::RemoveDirectoryW( path.c_str() ) ){ - sRet = Status::IOError(dirname, "Could not delete directory."); - } - return sRet; -} - -Status Win32Env::NewSequentialFile( const std::string& fname, SequentialFile** result ) -{ - Status sRet; - std::string path = fname; - ModifyPath(path); - Win32SequentialFile* pFile = new Win32SequentialFile(path); - if(pFile->isEnable()){ - *result = pFile; - }else { - delete pFile; - sRet = Status::IOError(path, Win32::GetLastErrSz()); - } - return sRet; -} - -Status Win32Env::NewRandomAccessFile( const std::string& fname, RandomAccessFile** result ) -{ - Status sRet; - std::string path = fname; - Win32RandomAccessFile* pFile = new Win32RandomAccessFile(ModifyPath(path)); - if(!pFile->isEnable()){ - delete pFile; - *result = NULL; - sRet = Status::IOError(path,"Could not create random access file."); - }else - *result = pFile; - return sRet; -} - -Status Win32Env::NewLogger( const std::string& fname, Logger** result ) -{ - Status sRet; - std::string path = fname; - Win32MapFile* pMapFile = new Win32MapFile(ModifyPath(path)); - if(!pMapFile->isEnable()){ - delete pMapFile; - *result = NULL; - sRet = Status::IOError(path,"could not create a logger."); - }else - *result = new Win32Logger(pMapFile); - return sRet; -} - -Status Win32Env::NewWritableFile( const std::string& fname, WritableFile** result ) -{ - Status sRet; - std::string path = fname; - Win32MapFile* pFile = new Win32MapFile(ModifyPath(path)); - if(!pFile->isEnable()){ - *result = NULL; - sRet = Status::IOError(fname,Win32::GetLastErrSz()); - }else - *result = pFile; - return sRet; -} - -Win32Env::Win32Env() -{ - -} - -Win32Env::~Win32Env() -{ - -} - - -} // Win32 namespace - -static port::OnceType once = LEVELDB_ONCE_INIT; -static Env* default_env; -static void InitDefaultEnv() { default_env = new Win32::Win32Env(); } - -Env* Env::Default() { - port::InitOnce(&once, InitDefaultEnv); - return default_env; -} - -} // namespace leveldb - -#endif // defined(LEVELDB_PLATFORM_WINDOWS) diff --git a/gvsbuild/projects/leveldb.py b/gvsbuild/projects/leveldb.py index 36d3d241e..20e623003 100644 --- a/gvsbuild/projects/leveldb.py +++ b/gvsbuild/projects/leveldb.py @@ -13,23 +13,31 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see . +from gvsbuild.utils.base_builders import CmakeProject from gvsbuild.utils.base_expanders import Tarball from gvsbuild.utils.base_project import Project, project_add @project_add -class LevelDB(Tarball, Project): +class LevelDB(Tarball, CmakeProject): def __init__(self): Project.__init__( self, "leveldb", - version="1.20", - archive_url="https://github.com/google/leveldb/archive/v{version}.tar.gz", + version="1.23", + archive_url="https://github.com/google/leveldb/archive/tags/{version}.tar.gz", archive_filename="leveldb-{version}.tar.gz", - hash="f5abe8b5b209c2f36560b75f32ce61412f39a2922f7045ae764a2c23335b6664", + hash="fa183b494f3ffe418a6804a57dfc0670080fbb0bcd1949cc4527d9b0077887a8", + dependencies=[ + "cmake", + ], ) def build(self): - self.exec_msbuild_gen(r"build\win32", "leveldb.sln") + CmakeProject.build( + self, + use_ninja=True, + cmake_params="-DLEVELDB_BUILD_TESTS=OFF -DLEVELDB_BUILD_BENCHMARKS=OFF", + ) self.install(r".\LICENSE share\doc\leveldb")