Fix compilation under cygwin.
Start conversion to C++ under cygwin.
Snapshot of current work.