libconfuse v3.4
Permanent link:
cppdashboard.dev/r/2026/08/libconfuse-v3-4Small configuration file parser library for C.
Release notes
### Changes
* Support for `CFGT_RAWSEC`, capture a section body verbatim, by Alexey Volokitin
* Support for an `include()` function within a section, enabled with the `CFGF_USE_INCLUDE_FUNCTION` flag, by Alexey Volokitin
* Support binary radix (`0b...`) for `CFG_INT`, issue #145
* Add support for fixed-width and unsigned integer types, `CFG_INT8/16/32/64` and `CFG_UINT8/16/32/64`, alongside the platform-width `CFG_INT`, issue #11
* Update doxygen documentation and sync with modern doxygen
* Automatic large file support (LFS), by Mike Frysinger
* `cfg_parse_buf()` now keeps a caller-set `cfg->filename` for `file:line` diagnostics, defaulting to `[buf]` only when unset, the same way `cfg_parse_fp()` handles `FILE`
* Optional JSON-style `[ ]` list syntax, enable with `CFGF_JSON_LISTS` flag to `cfg_init()`; `cfg_print()` then emits `[ ]` as well. The default `{ }` syntax is unchanged
* Georgian translation, by Temuri Doghonadze
* Updated Swedish, French, and German translations, Joachim Wiberg
### Fixes
* Issue #147: fix the bundled `fmemopen()` replacement for systems without a native one (e.g. older macOS/BSD), so the write-then-read round-trip works; diagnosed by sevan
* Issue #150: comments are now accepted anywhere between tokens, e.g. inside lists and inline C-style, not only before an option name
* Issue #152: fail to build with gettext 0.20, by heitbaum
* Issue #153: German translation update
* Issue #158: `cfg_addtsec()` returns the existing section when the title already exists, matching the documented behavior
* Issue #163: heap overflow in `cfg_tilde_expand()`, found by Han Zheng
* Issue #172: document the working MSYS2/MINGW64 Windows build; the old windows/mingw instructions were obsolete and failed to link
* Issue #179: `cfg_addlist()` now preserves default list values when appending, by Yi Chen
* Issue #180: `isspace()` argument fix, could crash the lexer, by Thomas Klausner
* Issue #182: guard against stack exhaustion from deeply nested sections, by Yi Chen
* Issue #187: null dereference on an empty comment (e.g. `#`) with `CFGF_COMMENTS` enabled, found and fixed by Benjamin Ali
* Fix null termination when expanding environment variables, by Igor Ponomarenko
* Only apply search path logic to relative pathnames, absolute paths are no longer altered, by Rasmus Villemoes
* Remove spurious 'no such option' errors for `KEYSTRVAL` sections
* Fix `configure` failure with autoconf 2.73, backslash continuations in the `AC_CONFIG_FILES` list are no longer accepted Share this resource