summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
11 daysFix word size calculation in BTree implementationDavid Robillard1-4/+5
11 daysAdd missing const qualifiersDavid Robillard1-3/+3
11 daysReduce empty BTree memory requirementsDavid Robillard1-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.
11 daysFix potential memory leak on failed allocation in POSIX environmentDavid Robillard1-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.
11 daysFix typo in commentDavid Robillard1-1/+1
2025-02-10Use getenv() instead of environ to avoid issues on FreeBSDDavid Robillard1-31/+30
2025-02-10Fully parenthesize expressionsDavid Robillard2-2/+2
2024-12-11Add assertion to ensure integer overflow is avoidedDavid Robillard1-0/+1
2024-12-11Avoid _get_osfhandle with clang on WindowsDavid Robillard1-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-11Fix clang and clang-tidy warnings on WindowsDavid Robillard4-3/+10
2024-12-11Remove old tree_debug.h headerDavid Robillard2-167/+6
2024-12-11Fix potential null dereferencesDavid Robillard2-2/+4
2024-12-11Fix memory leakDavid Robillard1-5/+4
Also removes the last MAX_PATH buffer limit.
2024-12-11Handle emscripten and MinGW stubs the same wayDavid Robillard2-3/+3
2024-12-11Add ZixDirEntryVisitFuncDavid Robillard2-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-11Support building for UWPDavid Robillard2-21/+75
2024-12-11Support building for Windows with or without UNICODEDavid Robillard4-41/+267
2024-12-11Add option to build for older Windows versionsDavid Robillard3-22/+81
Adds configuration checks for Windows API functions, and a win_ver configuration option to change the targeted API version.
2024-12-11Clean up platform C flagsDavid Robillard1-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-11Use DeleteFile() instead of remove()David Robillard1-4/+3
2024-12-11Use CreateDirectory() instead of _mkdir()David Robillard1-4/+3
2024-12-11Fix widening conversions after arithmeticDavid Robillard4-11/+11
2024-11-24Clean up includesDavid Robillard2-3/+3
2024-11-24Add zix_expand_environment_strings()David Robillard2-0/+156
2024-11-23Use angle brackets for library includesDavid Robillard23-46/+58
2024-11-15Update clang-format configurationDavid Robillard7-44/+22
2024-07-18Add missing includeDavid Robillard1-0/+1
2024-07-18Suppress new warnings in clang and clang-tidy 18David Robillard1-0/+1
2024-07-15Add missing pure function attributesDavid Robillard1-0/+2
2024-06-26Add zix_string_view_equals()David Robillard1-1/+20
2024-06-23Fix build on POSIX systems without PATH_MAX definedDavid Robillard1-3/+5
2024-06-22Avoid cppcheck warning about self-assignmentDavid Robillard1-4/+5
2024-06-22Remove redundant conditionalsDavid Robillard2-4/+5
2024-06-22Add missing const qualifierDavid Robillard1-1/+1
2024-06-04Add missing includeDavid Robillard1-0/+1
2023-11-17Avoid fdatasync() on DarwinDavid Robillard1-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.
2023-09-21Avoid type conversionsDavid Robillard1-42/+41
Rework arithmetic slightly to avoid some type conversions, and warnings with clang-tidy 16.0.6. Also consistently use explicitly unsigned literals where appropriate to minimize unsigned/signed conversions in general.
2023-09-21Remove unnecessary includes and forward declarationsDavid Robillard2-3/+0
According to include-what-you-use 0.20 (7301b1f) based on clang 16.0.6.
2023-08-23Improve test coverageDavid Robillard3-29/+32
2023-05-10Add ZIX_STATIC_STRING()David Robillard1-2/+4
2023-02-13Improve system feature detectionDavid Robillard2-75/+65
2023-02-06Simplify string view interfaceDavid Robillard1-11/+7
2023-02-05Fix MinGW buildDavid Robillard1-2/+2
2023-02-04Fix inconsistent parameter namesDavid Robillard1-10/+10
2023-02-04Fix inconsistent defineDavid Robillard1-1/+1
2023-02-04Suppress/fix clang-tidy warnings on WindowsDavid Robillard3-2/+14
2023-02-04Avoid use of rand()David Robillard1-1/+13
2023-02-04Fix clang build on WindowsDavid Robillard1-2/+0
2022-12-18Fix warnings on Windows without CreateSymbolicLinkDavid Robillard1-0/+4
2022-11-25Explicitly ignore posix_fadvise() return valueDavid Robillard1-2/+2
If some error happened here, there's nothing we can do but proceed and try to copy anyway.