summary refs log tree commit diff
path: root/library/std/src/sys/pal/windows
AgeCommit message (Collapse)AuthorLines
2024-04-09Disallow or quote all specials in bat argsChris Denton-12/+93
2024-01-30Rollup merge of #120295 - reitermarkus:remove-ffi-nonzero, r=dtolnayGuillaume Gomez-2/+2
Remove `raw_os_nonzero` feature. This feature is superseded by a generic `NonZero` type: https://github.com/rust-lang/rust/issues/120257 Closes https://github.com/rust-lang/rust/issues/82363.
2024-01-29Remove `raw_os_nonzero` feature.Markus Reiter-2/+2
2024-01-29Rollup merge of #120373 - HTGAzureX1212:HTGAzureX1212/issue-120040, ↵Dylan DPC-1/+33
r=ChrisDenton Adjust Behaviour of `read_dir` and `ReadDir` in Windows Implementation: Check Whether Path to Search In Exists This pull request changes the `read_dir` function's and the `ReadDir` structure's internal implementations for the Windows operating system to make its behaviour more accurate. It should be noted that `ERROR_FILE_NOT_FOUND` is returned by the `FindFirstFileW` function when *no matching files can be found*, not necessarily that the path to search in does not exist in the first place. Therefore, directly returning the "The system cannot find the file specified." may not be accurate. An extra check for whether the path to search in exists is added, returning a constructed `ReadDir` iterator with its handle being an `INVALID_HANDLE_VALUE` returned by the `FindFirstFileW` function if `ERROR_FILE_NOT_FOUND` is indeed the last OS error. The `ReadDir` implementation for the Windows operating system is correspondingly updated to always return `None` if the handle it has is an `INVALID_HANDLE_VALUE` which can only be the case if and only if specifically constructed by the `read_dir` function in the aforementioned conditions. It should also be noted that `FindFirstFileW` would have returned `ERROR_PATH_NOT_FOUND` if the path to search in does not exist in the first place. Presumably fixes #120040.
2024-01-27add extra check for invalid handle in ReadDir::nextHTGAzureX1212.-1/+8
2024-01-27make modifications as per reviewsHTGAzureX1212.-21/+25
2024-01-26Rollup merge of #120205 - Berrysoft:windows-alloc-init, r=ChrisDentonMatthias Krüger-11/+13
std: make `HEAP` initializer never inline The system allocator for Windows calls `init_or_get_process_heap` every time allocating. It generates very much useless code and makes the binary larger. The `HEAP` only needs to initialize once before the main fn. Concerns: * I'm not sure if `init` will be properly called in cdylib. * Do we need to ensure the allocator works if the user enables `no_main`? * Should we panic if `GetProcessHeap` returns null?
2024-01-26fixHTGAzureX1212.-2/+2
2024-01-26remove redundant call to Error::last_os_errorHTGAzureX1212.-1/+1
2024-01-26fix issue 120040HTGAzureX1212.-0/+21
2024-01-24Wrap `HeapAlloc` and never inline王宇逸-11/+13
2024-01-22Rollup merge of #120109 - joboet:move_pal_cmath, r=ChrisDentonMatthias Krüger-97/+0
Move cmath into `sys` Part of #117276. r? ``@ChrisDenton``
2024-01-22std: move cmath into `sys`joboet-97/+0
2024-01-22Fix msys2 tty detection for /dev/ptmxChris Denton-14/+0
Our "true negative" detection assumes that if at least one std handle is a Windows console then no other handle will be a msys2 tty pipe. This turns out to be a faulty assumption in the case of `/dev/ptmx`.
2024-01-15std: move OS String implementation into `sys`joboet-246/+0
2024-01-12update paths in commentsjoboet-2/+2
2024-01-11std: fix module references on Windowsjoboet-5/+5
2024-01-11std: begin moving platform support modules into `pal`joboet-0/+16225