This is a set of C headers containing macros and static functions that are expected to work on Unix-like systems and MS Windows that have been extracted from Shlomi Fish´s projects.
Note that we publish releases source tarballs: https://github.com/shlomif/rinutils/tags .
These headers include:
-
sizeof-aware wrappers for malloc()/realloc()
-
COUNT()andLAST()macros. -
DLLEXPORTsymbols-modifiers. -
likely()andunlikely()CPU branch-prediction hints (see Stack Overflow question). -
long longsprintf()-formats -
min()andmax() -
rinutils/portable_time.hfor cross-platform time querying. -
Some string utilities as inline functions.
-
typeof_wrap.hfor C++-"auto"-like macros. -
GCC_UNUSEDfor silencing warnings. -
rinutils/rin_cmocka.hfor reducing cmocka’s boilerplate.
Note: we only support the -std=gnu11
dialect as supported by GCC,
clang and compatible compilers. Other compilers
are not supported.
This code is licensed under the MIT/Expat license .