Replace the red-black tree with a heap. The most common operation that
libuv performs on timers is looking up the first timer to expire. With
a red-black tree, that operation is O(log n). With a heap, it's O(1).
Default CC to `gcc` instead of `cc` because at least on the mingw
installation I had there was no `cc` executable. This avoids having
to type `CC=gcc` in all the `make` commands.
Also append to `CFLAGS` instead of defining if not previously defined.
These flags are required to build libuv, so they should not be
overridden if other extra CFLAGS are supplied via the command
line as well.
* add a very simple Makefile.mingw that builds libuv.a
* apply a couple of fixes to src/win so it actually builds with mingw
(mostly missing includes)
Fixes#847.