We port registry by importing the (public domain) openbsd implementation
of the tfind/tsearch POSIX binary tree search functions.
These are only necessary when building on non-posix platforms
MSVC was complaining that the `tail` variable was potentially
uninitialized in the while branch. Since the while loop is actually
coupled to the if (head != NULL) that initializes the tail variable,
we move them together, which makes the warning disappear.
We replace instances of void* w/ char* arithmetics.
This allows system_allocator.c to be compiled with MSVC.
Also we introduce a struct to represent the size_t header.
In order to guarantee that Hammer can build on Windows, an appveyor.yml
and associated build scripts will build hammer and its examples. The idea
is that as soon as the appveyor.yml exists in the repository, pull
requests that would impede Windows portability would be immediately
detected.
The scripts expect CL.EXE to be in the path, and will produce their
results in build/
The highest level of warning is enabled on CL.EXE, minus warnings that
bring CL.EXE to a level that ressembles C99. The only notable warning
that was disabled is the one that tells you about implicit truncating
conversions.
Hammer's source code has quite a few implicit conversions say from a 64bit
unsigned integer to a integer of a lesser size (signed or otherwise)