This makes libvhd run on windows, with some minor tweaks on Unix.
The latter make it possible to capture errors on a terminal rather than syslog.
A bug was fixed where an error code wasn't properly negated on return.
The 'absolute path" code now writes an absolute path.
Many compiler warnings were dealt with; this code now compiles cleanly under
MSVC as well as linux (gcc).
The approach was to do as much mechanical substitution as possible to avoid
introducing new bugs - even where some re-engineering would be profitable.
These comprise the vhd library from the XEN project. They are a subset of the XEN tools.
From http://www.openfoundry.org/svn/xenids/xen-4.0.0/tools/blktap2/
This commit is the baseline as found in XEN. Subsequent commits will fix compile issues
and allow compilation under Windows.
The API will remain compatible with the shared library, which can also be used. (With
these headers.)