Refactor file size retrieval and enhance POSIX socket error handling#1200
Merged
Conversation
- Updated `file_size` function to use a template parameter for NT family file size retrieval. - Replaced direct socket calls with `::fast_io::noexcept_call` in POSIX networking functions to improve error handling. - Introduced a `find_struct_guard` for automatic resource management in Win32 directory handling. - Added `win32_9xa_dir_file_status_impl` to retrieve file status for Win32 9xa directory handles, enhancing compatibility with POSIX file status functions.
- Added references for `kernel_timespec64` in `posix_at.h`. - Updated `calculate_nt_open_mode` in `nt.h` to include `FILE_WRITE_ATTRIBUTES`. - Renamed read and write functions in `win32.h` for clarity and to reflect their specific implementations. - Adjusted `posix_pread_bytes_impl` and `posix_pwrite_bytes_impl` to use operations module functions for Windows 9x compatibility.
- Adjusted spacing in conditional statements for consistency. - Enhanced error handling in POSIX pipe setup by ensuring proper exception throwing. - No functional changes; focus on code clarity and maintainability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
file_sizefunction to use a template parameter for NT family file size retrieval.::fast_io::noexcept_callin POSIX networking functions to improve error handling.find_struct_guardfor automatic resource management in Win32 directory handling.win32_9xa_dir_file_status_implto retrieve file status for Win32 9xa directory handles, enhancing compatibility with POSIX file status functions.