diff --git a/include/fast_io_core.h b/include/fast_io_core.h index 1e1ab9930..ba5a5fc9b 100644 --- a/include/fast_io_core.h +++ b/include/fast_io_core.h @@ -12,6 +12,7 @@ #include #include #include +#include #if __cpp_lib_three_way_comparison >= 201907L #include diff --git a/include/fast_io_core_impl/utils.h b/include/fast_io_core_impl/utils.h index 49db8400c..576ff3df6 100644 --- a/include/fast_io_core_impl/utils.h +++ b/include/fast_io_core_impl/utils.h @@ -467,7 +467,7 @@ inline constexpr T compile_pow2{::fast_io::details::compile_pow_n}; inline constexpr bool is_wasi_environment{ -#if __wasi__ +#ifdef __wasi__ true #endif }; diff --git a/include/fast_io_freestanding_impl/serializations/lebe.h b/include/fast_io_freestanding_impl/serializations/lebe.h index 8c0e0a3f6..09a69e515 100644 --- a/include/fast_io_freestanding_impl/serializations/lebe.h +++ b/include/fast_io_freestanding_impl/serializations/lebe.h @@ -181,7 +181,7 @@ inline constexpr auto iec559_lebe_put(T t) } else { -#if __STDCPP_FLOAT32_T__ +#ifdef __STDCPP_FLOAT32_T__ return ::fast_io::manipulators::lebe_put( ::std::bit_cast<::std::uint_least32_t>(static_cast<_Float32>(t))); #else @@ -198,7 +198,7 @@ inline constexpr auto iec559_lebe_put(T t) } else { -#if __STDCPP_FLOAT64_T__ +#ifdef __STDCPP_FLOAT64_T__ return ::fast_io::manipulators::lebe_put( ::std::bit_cast<::std::uint_least64_t>(static_cast<_Float64>(t))); #else @@ -208,7 +208,7 @@ inline constexpr auto iec559_lebe_put(T t) } else if constexpr (::std::same_as) { -#if __STDCPP_FLOAT128_T__ +#ifdef __STDCPP_FLOAT128_T__ using proxy_type = ::fast_io::details::pesudo_int128type; return ::fast_io::manipulators::basic_lebe_get_put>{ {::std::bit_cast<::fast_io::details::pesudo_int128type>(static_cast<_Float128>(t))}}; @@ -480,7 +480,7 @@ scan_precise_reserve_define_lebe_float_get_impl(char_type const *iter, flttypef } else { -#if __STDCPP_FLOAT32_T__ +#ifdef __STDCPP_FLOAT32_T__ t = static_cast(::std::bit_cast<_Float32>(temp)); #else static_assert(isiec559, "float is not iec60559"); @@ -495,7 +495,7 @@ scan_precise_reserve_define_lebe_float_get_impl(char_type const *iter, flttypef } else { -#if __STDCPP_FLOAT64_T__ +#ifdef __STDCPP_FLOAT64_T__ t = static_cast(::std::bit_cast<_Float64>(temp)); #else static_assert(isiec559, "double is not iec60559"); @@ -504,7 +504,7 @@ scan_precise_reserve_define_lebe_float_get_impl(char_type const *iter, flttypef } else if constexpr (::std::same_as) { -#if __STDCPP_FLOAT128_T__ +#ifdef __STDCPP_FLOAT128_T__ t = static_cast(::std::bit_cast<_Float128>(temp)); #else static_assert(sizeof(double) != sizeof(long) && isiec559, diff --git a/include/fast_io_freestanding_impl/transcoders/transcoder_file.h b/include/fast_io_freestanding_impl/transcoders/transcoder_file.h index 688a2e8ff..6d6070bac 100644 --- a/include/fast_io_freestanding_impl/transcoders/transcoder_file.h +++ b/include/fast_io_freestanding_impl/transcoders/transcoder_file.h @@ -234,7 +234,7 @@ class basic_transcoder_file : public transcoder_io_observer other.transhandle = nullptr; return *this; } - inline constexpr void close() noexcept + inline constexpr void close() { this->transhandle->destroy(); this->transhandle = nullptr; diff --git a/include/fast_io_hosted/filesystem/dos_at.h b/include/fast_io_hosted/filesystem/dos_at.h index 3694e48d2..e6ffd1bf2 100644 --- a/include/fast_io_hosted/filesystem/dos_at.h +++ b/include/fast_io_hosted/filesystem/dos_at.h @@ -111,65 +111,16 @@ inline constexpr dos_at_flags &operator^=(dos_at_flags &x, dos_at_flags y) noexc namespace details { -struct my_dos_concat_path_common_result -{ - bool failed{}; - ::fast_io::tlc::string path = ::fast_io::tlc::string(); -}; - -inline my_dos_concat_path_common_result my_dos_concat_path_common(int dirfd, char const *pathname) noexcept -{ - if (dirfd == -100) - { - return {false, ::fast_io::tlc::string(::fast_io::mnp::os_c_str(pathname))}; - } - else - { - auto pathname_cstr{::fast_io::noexcept_call(::__get_fd_name, dirfd)}; - if (pathname_cstr == nullptr) [[unlikely]] - { - return {true}; - } - - // check vaildity - auto const sz{::fast_io::cstr_len(pathname)}; - - if (sz > 255) [[unlikely]] - { - return {true}; - } - - if (::fast_io::details::is_invalid_dos_filename_with_size(pathname, sz)) [[unlikely]] - { - return {true}; - } - - // concat - return {false, ::fast_io::tlc::concat_fast_io_tlc(::fast_io::mnp::os_c_str(pathname_cstr), ::fast_io::mnp::chvw(u8'\\'), para_pathname)}; - } -} - -template -inline ::fast_io::tlc::string my_dos_concat_path(int dirfd, char const *pathname) noexcept(always_terminate) -{ - auto [failed, path] = ::fast_io::details::my_dos_concat_path_common(dirfd, pathname); - if (failed) [[unlikely]] - { - ::fast_io::system_call_throw_error(-1); - } - return ::std::move(path); -} - inline void dos_renameat_impl(int olddirfd, char const *oldpath, int newdirfd, char const *newpath) { - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_rename(::fast_io::details::my_dos_concat_path(olddirfd, oldpath).c_str(), - ::fast_io::details::my_dos_concat_path(newdirfd, newpath).c_str())); + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_rename(::fast_io::details::my_dos_concat_tlc_path(olddirfd, oldpath).c_str(), + ::fast_io::details::my_dos_concat_tlc_path(newdirfd, newpath).c_str())); } inline void dos_linkat_impl(int olddirfd, char const *oldpath, int newdirfd, char const *newpath) { - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_link(::fast_io::details::my_dos_concat_path(olddirfd, oldpath).c_str(), - ::fast_io::details::my_dos_concat_path(newdirfd, newpath).c_str())); + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_link(::fast_io::details::my_dos_concat_tlc_path(olddirfd, oldpath).c_str(), + ::fast_io::details::my_dos_concat_tlc_path(newdirfd, newpath).c_str())); } template @@ -187,7 +138,7 @@ inline auto dos22_api_dispatcher(int olddirfd, char const *oldpath, int newdirfd inline void dos_symlinkat_impl(char const *oldpath, int newdirfd, char const *newpath) { - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_symlink(oldpath, ::fast_io::details::my_dos_concat_path(newdirfd, newpath).c_str())); + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_symlink(oldpath, ::fast_io::details::my_dos_concat_tlc_path(newdirfd, newpath).c_str())); } template @@ -201,37 +152,37 @@ inline auto dos12_api_dispatcher(char const *oldpath, int newdirfd, char const * inline void dos_faccessat_impl(int dirfd, char const *pathname, int flags) { - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_access(::fast_io::details::my_dos_concat_path(dirfd, pathname).c_str(), flags)); + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_access(::fast_io::details::my_dos_concat_tlc_path(dirfd, pathname).c_str(), flags)); } inline void dos_fchownat_impl(int dirfd, char const *pathname, uintmax_t owner, uintmax_t group) { // chown does nothing under MS-DOS, so just check is_valid filename - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_chown(::fast_io::details::my_dos_concat_path(dirfd, pathname).c_str(), + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_chown(::fast_io::details::my_dos_concat_tlc_path(dirfd, pathname).c_str(), static_cast(owner), static_cast(group))); } inline void dos_fchmodat_impl(int dirfd, char const *pathname, mode_t mode) { - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_chmod(::fast_io::details::my_dos_concat_path(dirfd, pathname).c_str(), mode)); + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_chmod(::fast_io::details::my_dos_concat_tlc_path(dirfd, pathname).c_str(), mode)); } inline posix_file_status dos_fstatat_impl(int dirfd, char const *pathname) { struct stat buf; - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_stat(::fast_io::details::my_dos_concat_path(dirfd, pathname).c_str(), __builtin_addressof(buf))); + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_stat(::fast_io::details::my_dos_concat_tlc_path(dirfd, pathname).c_str(), __builtin_addressof(buf))); return ::fast_io::details::struct_stat_to_posix_file_status(buf); } inline void dos_mkdirat_impl(int dirfd, char const *pathname, mode_t mode) { - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_mkdir(::fast_io::details::my_dos_concat_path(dirfd, pathname).c_str(), mode)); + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_mkdir(::fast_io::details::my_dos_concat_tlc_path(dirfd, pathname).c_str(), mode)); } inline void dos_unlinkat_impl(int dirfd, char const *pathname) { - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_unlink(::fast_io::details::my_dos_concat_path(dirfd, pathname).c_str())); + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_unlink(::fast_io::details::my_dos_concat_tlc_path(dirfd, pathname).c_str())); } inline constexpr ::std::time_t unix_timestamp_to_time_t(unix_timestamp stmp) noexcept @@ -271,7 +222,7 @@ inline void dos_utimensat_impl(int dirfd, char const *pathname, unix_timestamp_o ::fast_io::details::unix_timestamp_to_time_t(last_modification_time), }; - ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_utime(::fast_io::details::my_dos_concat_path(dirfd, pathname).c_str(), __builtin_addressof(ts))); + ::fast_io::system_call_throw_error(::fast_io::posix::my_dos_utime(::fast_io::details::my_dos_concat_tlc_path(dirfd, pathname).c_str(), __builtin_addressof(ts))); } template diff --git a/include/fast_io_hosted/platforms/posix.h b/include/fast_io_hosted/platforms/posix.h index a767b972f..2c877e53c 100644 --- a/include/fast_io_hosted/platforms/posix.h +++ b/include/fast_io_hosted/platforms/posix.h @@ -62,6 +62,17 @@ namespace fast_io { +#if ((!defined(_WIN32) || defined(__WINE__)) || defined(__CYGWIN__)) +namespace posix +{ +#if defined(__DARWIN_C_LEVEL) || defined(__MSDOS__) +extern int libc_ioctl(int fd, unsigned long request, ...) noexcept __asm__("_ioctl"); +#else +extern int libc_ioctl(int fd, unsigned long request, ...) noexcept __asm__("ioctl"); +#endif +} // namespace posix +#endif + enum class posix_family { api, @@ -836,13 +847,76 @@ extern int my_posix_open_noexcept(char const *pathname, int flags, mode_t mode) #if defined(__MSDOS__) -template -inline ::fast_io::tlc::string my_dos_concat_path(int, char const *) noexcept(always_terminate); +using dos_path_tlc_string = ::fast_io::containers::basic_string; + +template +constexpr inline dos_path_tlc_string concat_dos_path_tlc_string(Args &&...args) +{ + constexpr bool type_error{::fast_io::operations::defines::print_freestanding_okay<::fast_io::details::dummy_buffer_output_stream, Args...>}; + if constexpr (type_error) + { + return ::fast_io::basic_general_concat(::fast_io::io_print_forward(::fast_io::io_print_alias(args))...); + } + else + { + static_assert(type_error, "some types are not printable, so we cannot concat dos_path_tlc_string"); + return {}; + } +} + +struct my_dos_concat_tlc_path_common_result +{ + bool failed{}; + dos_path_tlc_string path{}; +}; + +inline constexpr my_dos_concat_tlc_path_common_result my_dos_concat_tlc_path_common(int dirfd, char const *pathname) noexcept +{ + if (dirfd == -100) + { + return {false, dos_path_tlc_string{::fast_io::mnp::os_c_str(pathname)}}; + } + else + { + auto fd_pathname_cstr{::fast_io::noexcept_call(::__get_fd_name, dirfd)}; + if (fd_pathname_cstr == nullptr) [[unlikely]] + { + return {true}; + } + + // check vaildity + auto const sz{::fast_io::cstr_len(pathname)}; + + if (sz > 255) [[unlikely]] + { + return {true}; + } + + if (::fast_io::details::is_invalid_dos_filename_with_size(pathname, sz)) [[unlikely]] + { + return {true}; + } + + // concat + return {false, concat_dos_path_tlc_string(::fast_io::mnp::os_c_str(fd_pathname_cstr), ::fast_io::mnp::chvw('\\'), ::fast_io::mnp::os_c_str(pathname))}; + } +} + +template +inline constexpr dos_path_tlc_string my_dos_concat_tlc_path(int dirfd, char const *pathname) noexcept(always_terminate) +{ + auto [failed, path]{my_dos_concat_tlc_path_common(dirfd, pathname)}; + if (failed) [[unlikely]] + { + ::fast_io::system_call_throw_error(-1); + } + return path; +} template inline int my_posix_openat(int dirfd, char const *pathname, int flags, mode_t mode) { - int fd{::fast_io::details::my_posix_open_noexcept(::fast_io::details::my_dos_concat_path(dirfd, pathname).c_str(), flags, mode)}; + int fd{::fast_io::details::my_posix_open_noexcept(my_dos_concat_tlc_path(dirfd, pathname).c_str(), flags, mode)}; system_call_throw_error(fd); return fd; } diff --git a/include/fast_io_hosted/platforms/posix_mapping.h b/include/fast_io_hosted/platforms/posix_mapping.h index 4f745a373..b2a6eb375 100644 --- a/include/fast_io_hosted/platforms/posix_mapping.h +++ b/include/fast_io_hosted/platforms/posix_mapping.h @@ -291,7 +291,7 @@ class posix_memory_map_file { return address_begin[pos]; } - inline void close() noexcept + inline void close() { if (this->address_begin != MAP_FAILED) [[likely]] { diff --git a/include/fast_io_hosted/platforms/win32.h b/include/fast_io_hosted/platforms/win32.h index 967ff3d3b..fd6e93934 100644 --- a/include/fast_io_hosted/platforms/win32.h +++ b/include/fast_io_hosted/platforms/win32.h @@ -1234,7 +1234,7 @@ class win32_9xa_dir_io_observer { return handle; } - inline explicit operator bool() const noexcept + inline explicit constexpr operator bool() const noexcept { return !handle.path.empty(); } @@ -1244,6 +1244,7 @@ class win32_9xa_dir_io_observer return temp; } }; + inline constexpr bool operator==(win32_9xa_dir_io_observer const &a, win32_9xa_dir_io_observer const &b) noexcept { @@ -1310,11 +1311,11 @@ class win32_9xa_dir_file : public win32_9xa_dir_io_observer } this->handle = ::std::move(newhandle); } - inline void close() noexcept + inline void close() { if (*this) [[likely]] { - ::fast_io::win32::details::close_win32_9xa_dir_handle(this->handle); + ::fast_io::win32::details::close_win32_9xa_dir_handle(this->handle); } } diff --git a/include/fast_io_hosted/timeutil/time.h b/include/fast_io_hosted/timeutil/time.h index 294374f34..b13b47026 100644 --- a/include/fast_io_hosted/timeutil/time.h +++ b/include/fast_io_hosted/timeutil/time.h @@ -6,12 +6,12 @@ namespace fast_io namespace posix { #if !defined(_WIN32) && !defined(__AVR__) && !defined(__MSDOS__) -#ifdef __DARWIN_C_LEVEL +#if defined(__DARWIN_C_LEVEL) extern int libc_clock_getres(clockid_t clk_id, struct timespec *tp) noexcept __asm__("_clock_getres"); extern int libc_clock_settime(clockid_t clk_id, struct timespec const *tp) noexcept __asm__("_clock_settime"); extern int libc_clock_gettime(clockid_t clk_id, struct timespec *tp) noexcept __asm__("_clock_gettime"); #else -#if _REDIR_TIME64 +#if defined(_REDIR_TIME64) extern int libc_clock_getres(clockid_t clk_id, struct timespec *tp) noexcept __asm__("__clock_getres64"); extern int libc_clock_settime(clockid_t clk_id, struct timespec const *tp) noexcept __asm__("__clock_settime64"); extern int libc_clock_gettime(clockid_t clk_id, struct timespec *tp) noexcept __asm__("__clock_gettime64"); diff --git a/include/fast_io_hosted/white_hole/white_hole.h b/include/fast_io_hosted/white_hole/white_hole.h index 15799eebb..b431d35c7 100644 --- a/include/fast_io_hosted/white_hole/white_hole.h +++ b/include/fast_io_hosted/white_hole/white_hole.h @@ -49,7 +49,7 @@ inline int my_random_entropy(int fd) noexcept return 0; } #else - if (::fast_io::posix::ioctl(fd, RNDGETENTCNT, __builtin_addressof(ent)) != 0) + if (::fast_io::posix::libc_ioctl(fd, RNDGETENTCNT, __builtin_addressof(ent)) != 0) { return 0; } diff --git a/share/fast_io/fast_io.cppm b/share/fast_io/fast_io.cppm index d39b9d0e3..04e09f514 100644 --- a/share/fast_io/fast_io.cppm +++ b/share/fast_io/fast_io.cppm @@ -20,6 +20,7 @@ export module fast_io; #include "fast_io_inc/core.inc" #include "fast_io_inc/core/allocation.inc" #include "fast_io_inc/freestanding.inc" +#include "fast_io_inc/intrinsics.inc" #ifndef FAST_IO_FREESTANDING # include "fast_io_inc/hosted.inc" diff --git a/share/fast_io/fast_io_inc/core.inc b/share/fast_io/fast_io_inc/core.inc index 18b193b36..eae3ae611 100644 --- a/share/fast_io/fast_io_inc/core.inc +++ b/share/fast_io/fast_io_inc/core.inc @@ -5,6 +5,8 @@ using ::fast_io::char_literal_v; using ::fast_io::pr_rsv_size; using ::fast_io::pr_rsv_to_iterator_unchecked; +using ::fast_io::io_alias_type_t; + using ::fast_io::io_reserve_type_t; using ::fast_io::io_reserve_type; using ::fast_io::print_alias_define; @@ -22,13 +24,31 @@ using ::fast_io::scan_context_eof_define; using ::fast_io::unreachable; using ::fast_io::noexcept_call; +using ::fast_io::little_endian; +using ::fast_io::big_endian; +using ::fast_io::byte_swap; + using ::fast_io::error; +using ::fast_io::error_type_t; +using ::fast_io::error_type; +using ::fast_io::error_domain; +using ::fast_io::is_domain; +using ::fast_io::to_code; +using ::fast_io::throw_parse_code; +using ::fast_io::parse_domain_value; + using ::fast_io::cstr_len; using ::fast_io::cstr_nlen; using ::fast_io::parse_by_scan; using ::fast_io::parse_code; +using ::fast_io::io_dup; +using ::fast_io::open_mode; + +using ::fast_io::basic_io_lockable; +using ::fast_io::basic_io_lockable_nonmovable; + #if !defined(__clang__) // The gcc and msvc module does not support non-exported functions adl matching using ::fast_io::input_stream_ref_define; using ::fast_io::output_stream_ref_define; @@ -131,6 +151,9 @@ using ::fast_io::manipulators::scalar_manip_t; using ::fast_io::manipulators::member_function_pointer_holder_t; using ::fast_io::manipulators::whole_get_t; +using ::fast_io::manipulators::leb128_get; +using ::fast_io::manipulators::leb128_put; + using ::fast_io::manipulators::boolalpha; using ::fast_io::manipulators::pointervw; @@ -144,6 +167,8 @@ using ::fast_io::manipulators::os_c_str_carr; using ::fast_io::manipulators::rgvw; +using ::fast_io::manipulators::cond; + using ::fast_io::manipulators::code_cvt; using ::fast_io::manipulators::code_cvt_os_c_str; using ::fast_io::manipulators::os_c_str_null_terminated; @@ -225,10 +250,18 @@ using ::fast_io::operations::scatter_pread_all_bytes; using ::fast_io::operations::scatter_pread_some; using ::fast_io::operations::scatter_pread_some_bytes; +using ::fast_io::operations::output_stream_ref; + namespace decay { using ::fast_io::operations::decay::scan_freestanding_decay; using ::fast_io::operations::decay::print_freestanding_decay; + +using ::fast_io::operations::decay::stream_ref_decay_lock_guard; +using ::fast_io::operations::decay::unlock_stream_ref_decay_lock_guard; +using ::fast_io::operations::decay::output_stream_mutex_ref_decay; +using ::fast_io::operations::decay::output_stream_unlocked_ref_decay; + } // namespace decay using ::fast_io::operations::print_freestanding; diff --git a/share/fast_io/fast_io_inc/detail.inc b/share/fast_io/fast_io_inc/detail.inc index 3cf9838e1..a59eb79a2 100644 --- a/share/fast_io/fast_io_inc/detail.inc +++ b/share/fast_io/fast_io_inc/detail.inc @@ -2,6 +2,6 @@ export namespace fast_io { namespace details { - + using ::fast_io::details::is_ebcdic; } // namespace details } \ No newline at end of file diff --git a/share/fast_io/fast_io_inc/device.inc b/share/fast_io/fast_io_inc/device.inc index 655314724..aee9b2349 100644 --- a/share/fast_io/fast_io_inc/device.inc +++ b/share/fast_io/fast_io_inc/device.inc @@ -51,6 +51,8 @@ using ::fast_io::u32ibuf_file_lockable; using ::fast_io::u32obuf_file_lockable; using ::fast_io::u32iobuf_file_lockable; +using ::fast_io::io_strlike_reference_wrapper; + #if defined(_WIN32) || (__has_include() && __has_include() && !defined(__wasi__)) using ::fast_io::basic_iobuf_socket_file; diff --git a/share/fast_io/fast_io_inc/dsal/string_view.inc b/share/fast_io/fast_io_inc/dsal/string_view.inc index 3c01053c3..4154cccc5 100644 --- a/share/fast_io/fast_io_inc/dsal/string_view.inc +++ b/share/fast_io/fast_io_inc/dsal/string_view.inc @@ -25,4 +25,6 @@ using ::fast_io::u8cstring_view; using ::fast_io::u16cstring_view; using ::fast_io::u32cstring_view; +using ::fast_io::basic_string_view; + } // namespace fast_io \ No newline at end of file diff --git a/share/fast_io/fast_io_inc/freestanding.inc b/share/fast_io/fast_io_inc/freestanding.inc index a30a0916e..11be871dc 100644 --- a/share/fast_io/fast_io_inc/freestanding.inc +++ b/share/fast_io/fast_io_inc/freestanding.inc @@ -3,6 +3,9 @@ export namespace fast_io namespace freestanding { +using ::fast_io::freestanding::is_zero_default_constructible_v; +using ::fast_io::freestanding::is_trivially_copyable_or_relocatable_v; + using ::fast_io::freestanding::is_trivially_copyable_or_relocatable; using ::fast_io::freestanding::is_zero_default_constructible; @@ -44,5 +47,6 @@ using ::fast_io::freestanding::find_first_not_of; using ::fast_io::freestanding::find_last_of; using ::fast_io::freestanding::find_last_not_of; +using ::fast_io::freestanding::errc; } // namespace freestanding } // namespace fast_io \ No newline at end of file diff --git a/share/fast_io/fast_io_inc/host/nt.inc b/share/fast_io/fast_io_inc/host/nt.inc index fa03d6a6b..9b890699c 100644 --- a/share/fast_io/fast_io_inc/host/nt.inc +++ b/share/fast_io/fast_io_inc/host/nt.inc @@ -5,6 +5,10 @@ export namespace fast_io { using ::fast_io::win32::nt::nt_get_current_peb; using ::fast_io::win32::nt::CsrClientCallServer; - + using ::fast_io::win32::nt::RtlQueryEnvironmentVariable_U; + using ::fast_io::win32::nt::unicode_string; + using ::fast_io::win32::nt::nt_set_information_virtual_memory; + using ::fast_io::win32::nt::memory_range_entry; + using ::fast_io::win32::nt::virtual_memory_information_class; } // namespace win32::nt } \ No newline at end of file diff --git a/share/fast_io/fast_io_inc/host/posix.inc b/share/fast_io/fast_io_inc/host/posix.inc index 50bfd50ed..612dd7209 100644 --- a/share/fast_io/fast_io_inc/host/posix.inc +++ b/share/fast_io/fast_io_inc/host/posix.inc @@ -1,4 +1,12 @@ export namespace fast_io { using ::fast_io::posix_tzset; + using ::fast_io::posix_stdin_number; + using ::fast_io::posix_stdout_number; + using ::fast_io::posix_stderr_number; + + namespace posix + { + using ::fast_io::posix::libc_ioctl; + } } \ No newline at end of file diff --git a/share/fast_io/fast_io_inc/host/win32.inc b/share/fast_io/fast_io_inc/host/win32.inc index aba29f29a..7b1fa0962 100644 --- a/share/fast_io/fast_io_inc/host/win32.inc +++ b/share/fast_io/fast_io_inc/host/win32.inc @@ -16,5 +16,12 @@ export namespace fast_io using ::fast_io::win32::SetConsoleOutputCP; using ::fast_io::win32::CommandLineToArgvW; using ::fast_io::win32::LocalFree; + using ::fast_io::win32::GetEnvironmentVariableW; + using ::fast_io::win32::GetEnvironmentVariableA; + using ::fast_io::win32::PrefetchVirtualMemory; + using ::fast_io::win32::win32_memory_range_entry; + using ::fast_io::win32::SetConsoleTextAttribute; + using ::fast_io::win32::console_screen_buffer_info; + using ::fast_io::win32::GetConsoleScreenBufferInfo; } // namespace win32 } \ No newline at end of file diff --git a/share/fast_io/fast_io_inc/hosted.inc b/share/fast_io/fast_io_inc/hosted.inc index 05d65e514..f5d1163fb 100644 --- a/share/fast_io/fast_io_inc/hosted.inc +++ b/share/fast_io/fast_io_inc/hosted.inc @@ -10,6 +10,9 @@ using ::fast_io::nt_family; using ::fast_io::basic_nt_family_io_observer; using ::fast_io::basic_nt_family_file; +using ::fast_io::basic_nt_io_observer; +using ::fast_io::basic_nt_file; + using ::fast_io::nt_io_observer; using ::fast_io::nt_file; using ::fast_io::wnt_io_observer; @@ -25,9 +28,30 @@ using ::fast_io::nt_stdin; using ::fast_io::nt_stdout; using ::fast_io::nt_stderr; +using ::fast_io::basic_zw_io_observer; +using ::fast_io::basic_zw_file; + +using ::fast_io::zw_io_observer; +using ::fast_io::zw_file; +using ::fast_io::wzw_io_observer; +using ::fast_io::wzw_file; +using ::fast_io::u8zw_io_observer; +using ::fast_io::u8zw_file; +using ::fast_io::u16zw_io_observer; +using ::fast_io::u16zw_file; +using ::fast_io::u32zw_io_observer; +using ::fast_io::u32zw_file; + +using ::fast_io::zw_stdin; +using ::fast_io::zw_stdout; +using ::fast_io::zw_stderr; + using ::fast_io::basic_win32_family_io_observer; using ::fast_io::basic_win32_family_file; +using ::fast_io::basic_win32_io_observer; +using ::fast_io::basic_win32_file; + using ::fast_io::win32_io_observer; using ::fast_io::win32_file; using ::fast_io::wwin32_io_observer; @@ -89,7 +113,13 @@ using ::fast_io::posix_stdout; using ::fast_io::posix_stderr; #if(defined(_WIN32) || defined(__CYGWIN__)) || ((!defined(_WIN32) || defined(__WINE__)) && (defined(__CYGWIN__) || (!defined(__NEWLIB__) && !defined(__wasi__)))) - using ::fast_io::native_dll_file; +using ::fast_io::native_dll_file; +using ::fast_io::dll_mode; +using ::fast_io::dll_load_symbol; +#endif + +#if defined(__linux__) +using ::fast_io::system_call; #endif using ::fast_io::posix_clock_id; diff --git a/share/fast_io/fast_io_inc/intrinsics.inc b/share/fast_io/fast_io_inc/intrinsics.inc new file mode 100644 index 000000000..109339066 --- /dev/null +++ b/share/fast_io/fast_io_inc/intrinsics.inc @@ -0,0 +1,7 @@ +export namespace fast_io +{ + namespace intrinsics + { + using ::fast_io::intrinsics::umul; + } +}