Nim/lib
c-blake c91ef1a09f
Fix closeHandle bug, add setFileSize, make resize work on Windows (#21375)
* Add general purpose `setFileSize` (unexported for now).  Use to simplify
`memfiles.open` as well as make robust (via hard allocation, not merely
`ftruncate` address space allocation) on systems with `posix_fallocate`.

As part of this, fix a bad `closeHandle` return check bug on Windows and
add `MemFile.resize` for Windows now that setFileSize makes that easier.

* Adapt existing test to exercise newly portable `MemFile.resize`.

* Since Apple has never provided `posix_fallocate`, provide a fallback.
This is presently written in terms of `ftruncate`, but it can be
improved to use `F_PREALLOCATE` instead, as mentioned in a comment.
2023-02-15 17:41:28 +01:00
..
arch/x86 Coroutine rework. 2017-02-20 17:24:19 +02:00
core Add contains to std/macrocache (#21304) 2023-02-01 10:00:10 +01:00
deprecated/pure stdlib organization & documentation improvements (#20971) 2022-12-06 09:37:03 +01:00
experimental make more standard libraries work with nimPreviewSlimSystem (#20343) 2022-09-27 20:06:23 +02:00
genode ref #20694; quit value gets saturated to ranges (#20753) 2022-11-05 10:58:57 +01:00
genode_cpp Genode: add scheduleCallbacks to asyncdispatch (#20708) 2022-10-31 19:24:57 +01:00
impure re and nre now link to regex and tinyre (#21161) 2022-12-23 10:50:07 -05:00
js std/asyncjs allow transforming proc types (#21356) 2023-02-14 08:14:19 +01:00
packages/docutils fixes #21232; highlite.getNextToken() returns gtOperator for '/' in C (#21234) 2023-01-08 15:40:27 +01:00
posix Fix closeHandle bug, add setFileSize, make resize work on Windows (#21375) 2023-02-15 17:41:28 +01:00
pure Fix closeHandle bug, add setFileSize, make resize work on Windows (#21375) 2023-02-15 17:41:28 +01:00
std Refines raises list in osproc (#21323) 2023-02-14 13:11:14 +01:00
system fixes #21195; std/assertions continue to use sysFatal when nimPreviewSlimSystem is not defined (#21196) 2022-12-29 14:15:08 -05:00
windows refactor os imports into corresponding small modules (#20720) 2022-11-01 10:18:04 +01:00
wrappers fixes SSL version check logic [backport] (#21324) 2023-02-02 16:44:14 +01:00
cycle.h
deps.txt added lib/deps.txt 2021-06-03 14:00:53 +02:00
nimbase.h fixes #20654 FAMs should not be used in the C++ backend (#20655) 2022-10-25 17:39:51 +02:00
nimhcr.nim fixes #20526; use nimPreviewSlimSystem for documentation build (#20714) 2022-11-01 12:53:14 +01:00
nimhcr.nim.cfg Initial version of the hot-code reloading support for native targets (#10729) 2019-02-26 15:48:55 +01:00
nimrtl.nim add missing docs (#18758) 2021-08-29 09:18:54 +02:00
nimrtl.nim.cfg Initial version of the hot-code reloading support for native targets (#10729) 2019-02-26 15:48:55 +01:00
stdlib.nimble attempt to make the build green again 2017-01-07 02:55:15 +01:00
system.nim fixes #21195; std/assertions continue to use sysFatal when nimPreviewSlimSystem is not defined (#21196) 2022-12-29 14:15:08 -05:00
system_overview.rst add link to setutils in system module docs (#21130) 2022-12-22 09:54:17 +01:00