Skip to content

Commit

Permalink
Merge pull request #508 from evoskuil/master
Browse files Browse the repository at this point in the history
Move msvc mman from C top C++.
  • Loading branch information
evoskuil authored Jul 6, 2024
2 parents cd3eb15 + becf941 commit 732a9b7
Show file tree
Hide file tree
Showing 12 changed files with 305 additions and 331 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ src_libbitcoin_database_la_SOURCES = \
src/locks/interprocess_lock.cpp \
src/memory/map.cpp \
src/memory/utilities.cpp \
src/memory/mman-win32/mman.c \
src/memory/mman-win32/mman.h
src/memory/mman-win32/mman.cpp \
src/memory/mman-win32/mman.hpp

# local: test/libbitcoin-database-test
#------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions builds/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ add_library( ${CANONICAL_LIB_NAME}
"../../src/locks/interprocess_lock.cpp"
"../../src/memory/map.cpp"
"../../src/memory/utilities.cpp"
"../../src/memory/mman-win32/mman.c"
"../../src/memory/mman-win32/mman.h" )
"../../src/memory/mman-win32/mman.cpp"
"../../src/memory/mman-win32/mman.hpp" )

# ${CANONICAL_LIB_NAME} project specific include directory normalization for build.
#------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<ClCompile Include="..\..\..\..\src\locks\flush_lock.cpp" />
<ClCompile Include="..\..\..\..\src\locks\interprocess_lock.cpp" />
<ClCompile Include="..\..\..\..\src\memory\map.cpp" />
<ClCompile Include="..\..\..\..\src\memory\mman-win32\mman.c" />
<ClCompile Include="..\..\..\..\src\memory\mman-win32\mman.cpp" />
<ClCompile Include="..\..\..\..\src\memory\utilities.cpp">
<ObjectFileName>$(IntDir)src_memory_utilities.obj</ObjectFileName>
</ClCompile>
Expand Down Expand Up @@ -145,7 +145,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\table.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\tables.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\version.hpp" />
<ClInclude Include="..\..\..\..\src\memory\mman-win32\mman.h" />
<ClInclude Include="..\..\..\..\src\memory\mman-win32\mman.hpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\..\include\bitcoin\database\impl\memory\accessor.ipp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<ClCompile Include="..\..\..\..\src\memory\map.cpp">
<Filter>src\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\memory\mman-win32\mman.c">
<ClCompile Include="..\..\..\..\src\memory\mman-win32\mman.cpp">
<Filter>src\memory\mman-win32</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\memory\utilities.cpp">
Expand Down Expand Up @@ -278,7 +278,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\database\version.hpp">
<Filter>include\bitcoin\database</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\memory\mman-win32\mman.h">
<ClInclude Include="..\..\..\..\src\memory\mman-win32\mman.hpp">
<Filter>src\memory\mman-win32</Filter>
</ClInclude>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/database/impl/query/archive.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ bool CLASS::populate(const input& input) const NOEXCEPT
TEMPLATE
bool CLASS::populate(const transaction& tx) const NOEXCEPT
{
BC_ASSERT(!tx->is_coinbase());
BC_ASSERT(!tx.is_coinbase());

auto result = true;
const auto& ins = *tx.inputs_ptr();
Expand Down
2 changes: 1 addition & 1 deletion src/memory/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <bitcoin/database/memory/map.hpp>

#if defined(HAVE_MSC)
#include "mman-win32/mman.h"
#include "mman-win32/mman.hpp"
#else
#include <sys/mman.h>
#include <sys/stat.h>
Expand Down
288 changes: 0 additions & 288 deletions src/memory/mman-win32/mman.c

This file was deleted.

Loading

0 comments on commit 732a9b7

Please sign in to comment.