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. -
DLLEXPORT
symbols-modifiers. -
likely()
andunlikely()
CPU branch-prediction hints (see Stack Overflow question). -
long long
sprintf()-formats -
min()
andmax()
-
rinutils/portable_time.h
for cross-platform time querying. -
Some string utilities as inline functions.
-
typeof_wrap.h
for C++-"auto"-like macros. -
GCC_UNUSED
for silencing warnings. -
rinutils/rin_cmocka.h
for 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 .