/rinutils

C11 / gnu11 utilities C library by Shlomi Fish / Rindolf

Primary LanguageCMIT LicenseMIT

rinutils - A C11 / gnu11 utilities C library

Introduction

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:

  1. sizeof-aware wrappers for malloc()/realloc()

  2. COUNT() and LAST() macros.

  3. DLLEXPORT symbols-modifiers.

  4. likely() and unlikely() CPU branch-prediction hints (see Stack Overflow question).

  5. long long sprintf()-formats

  6. min() and max()

  7. rinutils/portable_time.h for cross-platform time querying.

  8. Some string utilities as inline functions.

  9. typeof_wrap.h for C++-"auto"-like macros.

  10. GCC_UNUSED for silencing warnings.

  11. 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.

License

This code is licensed under the MIT/Expat license .