Skip to content

proven_c_lib-v0.1.1

Choose a tag to compare

@rubidus-api rubidus-api released this 21 Sep 06:47
· 45 commits to main since this release

A PATCH release: the tutorial gains three lessons, and the hand build the manual prints works
on GCC 14 with glibc. No public API changes.

Added

  • Tutorial lessons 7-9 (manual/manual-t-tutorial.md and the Korean edition): memory freed
    all at once (proven_arena_reset in a per-round loop, and PROVEN_ERR_NOMEM when the arena
    is too small), a container that keeps its allocator (PROVEN_ARRAY_* growing past its
    starting capacity), and failures from outside the program (a whole-file write and read, then
    PROVEN_ERR_NOT_FOUND for the removed file). Lesson 5 already pointed at lesson 7 for the
    arena reset; it now exists. Each lesson is a runnable program in both example trees
    (tut_07_arena, tut_08_containers, tut_09_files), so the full run is 84 manual examples
    and 202 executables.

Fixed

  • The hand build the manual prints now compiles on GCC 14 with glibc. The tutorial and
    Chapter 0 give cc -std=c23 -Iinclude your_program.c src/proven/*.c platform/*.c with no
    -D flags. Under a strict -std, glibc hides the POSIX declarations the PAL uses
    (pread, pwrite, ftruncate, clock_gettime, nanosleep, O_CLOEXEC), and GCC 14
    treats an implicit declaration as an error, so proven_sys_io.c, proven_sys_random.c
    and proven_sys_time.c failed. Nothing here noticed because nob.c passes
    -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L itself. Every PAL source now requests them
    before its first include, as proven_sys_fs.c already did; -D flags given on the
    command line still win. tests/test_portability_source_contracts checks all eight.