@@ -434,8 +434,9 @@ struct nt_create_nothrow_callback
434
434
};
435
435
436
436
template <bool zw>
437
- inline void nt_symlinkat_impl (char16_t const *oldpath_c_str, ::std::size_t oldpath_size,
438
- void *newdirhd, char16_t const *newpath_c_str, ::std::size_t newpath_size, bool kernel)
437
+ inline void nt_symlinkat_impl ([[maybe_unused]] char16_t const *oldpath_c_str, [[maybe_unused]] ::std::size_t oldpath_size,
438
+ [[maybe_unused]] void *newdirhd, [[maybe_unused]] char16_t const *newpath_c_str,
439
+ [[maybe_unused]] ::std::size_t newpath_size, [[maybe_unused]] bool kernel)
439
440
{
440
441
#if !defined(_WIN32_WINNT) || _WIN32_WINNT > 0x0600
441
442
@@ -634,6 +635,7 @@ inline void nt_symlinkat_impl(char16_t const *oldpath_c_str, ::std::size_t oldpa
634
635
throw_nt_error (status);
635
636
}
636
637
#else
638
+ #if defined(FAST_IO_USE_DJGPP_SYMLINK)
637
639
constexpr nt_open_mode symbol_mode{::fast_io::win32::nt::details::calculate_nt_open_mode ({::fast_io::open_mode::out, static_cast <perms>(436 )})};
638
640
639
641
::fast_io::basic_nt_family_file<(zw ? nt_family::zw : nt_family::nt), char8_t > new_file (
@@ -647,6 +649,9 @@ inline void nt_symlinkat_impl(char16_t const *oldpath_c_str, ::std::size_t oldpa
647
649
u8"\nThis is just a text to force symlink file to be 510 bytes long. Do not delete it nor spaces following it.");
648
650
649
651
::fast_io::operations::write_all (new_file, buffer, buffer + 510 );
652
+ #else
653
+ throw_nt_error (0xC0000002 );
654
+ #endif
650
655
#endif
651
656
}
652
657
@@ -824,7 +829,7 @@ inline auto nt_deal_with1x(void *dir_handle, path_type const &path, Args... args
824
829
{
825
830
return nt_api_common (
826
831
path, [&](char16_t const *path_c_str, ::std::size_t path_size) {
827
- return nt1x_api_dispatcher< family == nt_family::zw, dsp> (dir_handle, path_c_str, path_size, args...);
832
+ return nt1x_api_dispatcher < family == nt_family::zw, dsp > (dir_handle, path_c_str, path_size, args...);
828
833
});
829
834
}
830
835
@@ -837,7 +842,7 @@ inline auto nt_deal_with12(old_path_type const &oldpath, void *newdirfd, new_pat
837
842
[&](char16_t const *oldpath_c_str, ::std::size_t oldpath_size) {
838
843
return nt_api_common (
839
844
newpath, [&](char16_t const *newpath_c_str, ::std::size_t newpath_size) {
840
- return nt12_api_dispatcher< family == nt_family::zw, dsp> (oldpath_c_str, oldpath_size, newdirfd, newpath_c_str, newpath_size, args...);
845
+ return nt12_api_dispatcher < family == nt_family::zw, dsp > (oldpath_c_str, oldpath_size, newdirfd, newpath_c_str, newpath_size, args...);
841
846
});
842
847
});
843
848
}
@@ -849,8 +854,8 @@ inline auto nt_deal_with22(void *olddirhd, oldpath_type const &oldpath, void *ne
849
854
[&](char16_t const *oldpath_c_str, ::std::size_t oldpath_size) {
850
855
return nt_api_common (newpath,
851
856
[&](char16_t const *newpath_c_str, ::std::size_t newpath_size) {
852
- return nt22_api_dispatcher< family == nt_family::zw, dsp> (olddirhd, oldpath_c_str, oldpath_size, newdirhd,
853
- newpath_c_str, newpath_size, args...);
857
+ return nt22_api_dispatcher < family == nt_family::zw, dsp > (olddirhd, oldpath_c_str, oldpath_size, newdirhd,
858
+ newpath_c_str, newpath_size, args...);
854
859
});
855
860
});
856
861
}
0 commit comments