Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2025-08-01 | Add function effect attributes and warning suppression macros | David Robillard | 12 | -104/+121 | |
2025-08-01 | Avoid static const local variables and use constexpr where possible | David Robillard | 7 | -27/+51 | |
We need to avoid static local variables because clang (annoyingly) can't infer nonblocking for functions with them, even if they're trivial types. So, switch to using constexpr if building as C23, otherwise, just use const (this is trivial for the optimizer to figure out anyway). | |||||
2025-08-01 | Record complexity explicitly in clang-tidy configuration | David Robillard | 1 | -2/+4 | |
This documents the complexity of the different areas of code in a machine-checked way that highlights where the most complexity lies, and will trigger a warning if it creeps further. Unfortunately, a few massive outliers here obscure the much lower average complexity. | |||||
2025-08-01 | Add missing pure function attribute | David Robillard | 1 | -1/+1 | |
2025-07-25 | Fix crash when attempting to remove from an empty BTree | David Robillard | 1 | -0/+4 | |
2025-06-30 | Strengthen Windows warning flags | David Robillard | 1 | -6/+6 | |
2025-06-30 | Strengthen file copying and comparison functions | David Robillard | 6 | -49/+124 | |
2025-06-30 | Avoid "deprecated" POSIX functions on Windows | David Robillard | 7 | -40/+93 | |
May I never screw anything up as badly as Microsoft screwed up this whole C "security" thing. | |||||
2025-06-29 | Test failed allocation in zix_create_directories() | David Robillard | 1 | -25/+25 | |
2025-06-29 | Gracefully handle failed allocation in path functions | David Robillard | 1 | -1/+7 | |
2025-06-29 | Improve test coverage | David Robillard | 3 | -18/+23 | |
2025-06-29 | Simplify conditionals | David Robillard | 2 | -11/+16 | |
2025-06-29 | Fix handling of errors when closing files | David Robillard | 2 | -8/+6 | |
The old logic here was backwards, but wasn't caught by the tests since hitting this situation requires filesystem failures that are hard to mock. The preliminary errno check also isn't necessary, dealing with any previous error condition is the responsibility of the caller. | |||||
2025-06-25 | Suppress new warnings in clang and clang-tidy 20 | David Robillard | 1 | -0/+2 | |
2025-06-07 | Fix word size calculation in BTree implementation | David Robillard | 1 | -4/+5 | |
2025-06-07 | Add missing const qualifiers | David Robillard | 1 | -3/+3 | |
2025-06-07 | Reduce empty BTree memory requirements | David Robillard | 1 | -22/+27 | |
Avoid over-allocating the ZixBTree structure, and only allocate a root node when elements are inserted. The over-allocation was to make all allocations use pages (towards disk-backed storage), but since this isn't actually supported at the moment it was just a waste of memory. | |||||
2025-06-07 | Fix potential memory leak on failed allocation in POSIX environment | David Robillard | 1 | -0/+1 | |
Adds a test for a new potentially failing allocation added in 8348512a60399d172fc83cd7bdf121d4c0b1015e "Use getenv() instead of environ to avoid issues on FreeBSD", and fixes the memory leak it exposes. Avoiding this temporary allocation (which is only for adding null termination) is the main reason getenv() was initially avoided. | |||||
2025-06-07 | Fix typo in comment | David Robillard | 1 | -1/+1 | |
2025-02-10 | Use getenv() instead of environ to avoid issues on FreeBSD | David Robillard | 1 | -31/+30 | |
2025-02-10 | Fully parenthesize expressions | David Robillard | 2 | -2/+2 | |
2024-12-11 | Add assertion to ensure integer overflow is avoided | David Robillard | 1 | -0/+1 | |
2024-12-11 | Avoid _get_osfhandle with clang on Windows | David Robillard | 1 | -0/+12 | |
This function crashes when called in a clang build, I'm not sure why. File locking in general isn't a realiable enough facility, and this API weirdly uses FILE* unlike anything else, adding it was probably a mistake. | |||||
2024-12-11 | Fix clang and clang-tidy warnings on Windows | David Robillard | 4 | -3/+10 | |
2024-12-11 | Remove old tree_debug.h header | David Robillard | 2 | -167/+6 | |
2024-12-11 | Fix potential null dereferences | David Robillard | 2 | -2/+4 | |
2024-12-11 | Fix memory leak | David Robillard | 1 | -5/+4 | |
Also removes the last MAX_PATH buffer limit. | |||||
2024-12-11 | Handle emscripten and MinGW stubs the same way | David Robillard | 2 | -3/+3 | |
2024-12-11 | Add ZixDirEntryVisitFunc | David Robillard | 2 | -10/+6 | |
Although this type is only used once in the API, define it to avoid the complicated syntax of inline function pointer parameters, which confuses both people and clang-format. | |||||
2024-12-11 | Support building for UWP | David Robillard | 2 | -21/+75 | |
2024-12-11 | Support building for Windows with or without UNICODE | David Robillard | 4 | -41/+267 | |
2024-12-11 | Add option to build for older Windows versions | David Robillard | 3 | -22/+81 | |
Adds configuration checks for Windows API functions, and a win_ver configuration option to change the targeted API version. | |||||
2024-12-11 | Clean up platform C flags | David Robillard | 1 | -1/+0 | |
Remove platform flags from executable (test program) builds, since they shouldn't be needed there (that being the whole point of a portability library), and replace POSIX flags in WIndows with WIN32_LEAN_AND_MEAN. | |||||
2024-12-11 | Use DeleteFile() instead of remove() | David Robillard | 1 | -4/+3 | |
2024-12-11 | Use CreateDirectory() instead of _mkdir() | David Robillard | 1 | -4/+3 | |
2024-12-11 | Fix widening conversions after arithmetic | David Robillard | 4 | -11/+11 | |
2024-11-24 | Clean up includes | David Robillard | 2 | -3/+3 | |
2024-11-24 | Add zix_expand_environment_strings() | David Robillard | 2 | -0/+156 | |
2024-11-23 | Use angle brackets for library includes | David Robillard | 23 | -46/+58 | |
2024-11-15 | Update clang-format configuration | David Robillard | 7 | -44/+22 | |
2024-07-18 | Add missing include | David Robillard | 1 | -0/+1 | |
2024-07-18 | Suppress new warnings in clang and clang-tidy 18 | David Robillard | 1 | -0/+1 | |
2024-07-15 | Add missing pure function attributes | David Robillard | 1 | -0/+2 | |
2024-06-26 | Add zix_string_view_equals() | David Robillard | 1 | -1/+20 | |
2024-06-23 | Fix build on POSIX systems without PATH_MAX defined | David Robillard | 1 | -3/+5 | |
2024-06-22 | Avoid cppcheck warning about self-assignment | David Robillard | 1 | -4/+5 | |
2024-06-22 | Remove redundant conditionals | David Robillard | 2 | -4/+5 | |
2024-06-22 | Add missing const qualifier | David Robillard | 1 | -1/+1 | |
2024-06-04 | Add missing include | David Robillard | 1 | -0/+1 | |
2023-11-17 | Avoid fdatasync() on Darwin | David Robillard | 1 | -1/+7 | |
This isn't present at all on (older?) literal Darwin, and additionally fsync() there doesn't actually flush writes to storage like it does on Linux. So, use F_FULLFSYNC which was invented as an alternative API to do this. |