Skip to content

Commit

Permalink
Fix compilation errors on msys2
Browse files Browse the repository at this point in the history
  • Loading branch information
trcrsired committed Jan 19, 2024
1 parent 4a2bb3e commit 068a6bf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/fast_io_hosted/file_loaders/file_size.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace fast_io::win32::details
{
inline ::std::size_t win32_load_file_get_file_size(void* handle)
{
by_handle_file_information bhdi;
::fast_io::win32::by_handle_file_information bhdi;
if(!GetFileInformationByHandle(handle,__builtin_addressof(bhdi)))
throw_win32_error();
if constexpr(sizeof(::std::size_t)<sizeof(::std::uint_least64_t))
Expand Down
3 changes: 2 additions & 1 deletion include/fast_io_hosted/platforms/native_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inline constexpr ::std::uint_least32_t win32_stderr_number(static_cast<::std::ui
namespace fast_io
{

#if defined(_WIN32) && !defined(__WINE__)
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WINE__)
using native_at_entry = nt_at_entry;
using native_fs_dirent = nt_fs_dirent;

Expand All @@ -44,6 +44,7 @@ using native_process_io = nt_process_io;

template<::std::integral ch_type>
using basic_native_pipe = basic_win32_pipe<ch_type>;

#else

using native_at_entry = posix_at_entry;
Expand Down
4 changes: 0 additions & 4 deletions include/fast_io_hosted/platforms/nt_mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,4 @@ class nt_family_memory_map_file
using nt_memory_map_file = nt_family_memory_map_file<nt_family::nt>;
using zw_memory_map_file = nt_family_memory_map_file<nt_family::zw>;

#if !defined(_WIN32_WINDOWS)
using native_memory_map_file = nt_memory_map_file;
#endif

}
2 changes: 1 addition & 1 deletion include/fast_io_hosted/platforms/posix/impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
!defined(_PICOLIBC)&& \
(!defined(__NEWLIB__) || defined(__CYGWIN__))
#include"scatter.h"
#if !(defined(_WIN32) && defined(__BIONIC__))
#if !(defined(_WIN32) && defined(__BIONIC__)) && !defined(__CYGWIN__) && !defined(__NEWLIB__)
#include"preadwrite.h"
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/fast_io_hosted/platforms/win32_mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ using win32_memory_map_file_9xa = win32_family_memory_map_file<win32_family::ans
using win32_memory_map_file_ntw = win32_family_memory_map_file<win32_family::wide_nt>;
using win32_memory_map_file = win32_family_memory_map_file<win32_family::native>;

#if !defined(__CYGWIN__) && defined(_WIN32_WINDOWS)
#if !defined(__CYGWIN__) && !defined(__WINE__)
using native_memory_map_file = win32_memory_map_file;
#endif

Expand Down

0 comments on commit 068a6bf

Please sign in to comment.