@@ -434,8 +434,9 @@ struct nt_create_nothrow_callback
434434};
435435
436436template <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)
439440{
440441#if !defined(_WIN32_WINNT) || _WIN32_WINNT > 0x0600
441442
@@ -634,6 +635,7 @@ inline void nt_symlinkat_impl(char16_t const *oldpath_c_str, ::std::size_t oldpa
634635 throw_nt_error (status);
635636 }
636637#else
638+ #if defined(FAST_IO_USE_DJGPP_SYMLINK)
637639 constexpr nt_open_mode symbol_mode{::fast_io::win32::nt::details::calculate_nt_open_mode ({::fast_io::open_mode::out, static_cast <perms>(436 )})};
638640
639641 ::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
647649 u8"\nThis is just a text to force symlink file to be 510 bytes long. Do not delete it nor spaces following it.");
648650
649651 ::fast_io::operations::write_all (new_file, buffer, buffer + 510 );
652+ #else
653+ throw_nt_error (0xC0000002 );
654+ #endif
650655#endif
651656}
652657
@@ -824,7 +829,7 @@ inline auto nt_deal_with1x(void *dir_handle, path_type const &path, Args... args
824829{
825830 return nt_api_common (
826831 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...);
828833 });
829834}
830835
@@ -837,7 +842,7 @@ inline auto nt_deal_with12(old_path_type const &oldpath, void *newdirfd, new_pat
837842 [&](char16_t const *oldpath_c_str, ::std::size_t oldpath_size) {
838843 return nt_api_common (
839844 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...);
841846 });
842847 });
843848}
@@ -849,8 +854,8 @@ inline auto nt_deal_with22(void *olddirhd, oldpath_type const &oldpath, void *ne
849854 [&](char16_t const *oldpath_c_str, ::std::size_t oldpath_size) {
850855 return nt_api_common (newpath,
851856 [&](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...);
854859 });
855860 });
856861}
0 commit comments