This is just a standalone, portable version of obstack.h from the GNU C library.
-
Install CMake for your platform. Probably this is
brew install cmake, orapt install cmake, or something like that. -
build and install it
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local make make install
see also: CMAKE_INSTALL_PREFIX
It's only one source file and one header.
gcc -I. obstack.c tst-obstack.c -o tst-obstack