Pure C linked list implimentation.
The implementation method is the same as in Linux kernel.
Example usage app is available in example/main.c.
Unit tests are implemented in tests/main.cpp.
Catch2 C++ unit tests framework is used to test the linked list in this repo.
Catch2 is single header framework that is located in tests/ext/catch.hpp.
The following commands should be used to compile tests and example binaries:
git clone https://github.com/konstantin89/pure-c-linked-list
cd pure-c-linked-list
mkdir build
cd build
cmake ..
make
Output artifacts will be located under pure-c-linked-list/output
This code can be compiled only with GCC. It will not work on Visual Studio compiler.
The reason for this is that the statement expressions feature is specific to GCC.