Should fix the build after 96f32a2 inadvertently broke it. There is no snprintf() on Windows because, hey, it's a C99 addition and the people from Redmond, WA are still firmly stuck in 1989.
Switch to the build tool everyone loves to hate. The Makefile has served us well over the years but it's been acquiring more and more features that autotools gives us for free, like easy static+shared library building, sane install targets, and so on. This commit drops MinGW support. If there is demand for it, we'll re-add it.
They're BSD-isms and obsolete ones at that. Replace with S_IRUSR and S_IWUSR. Alias as _S_IREAD and _S_IWRITE on Windows because the '90s never ended in Redmond, WA.
Replace `void f()` with `void f(void)`; the former means "a function that takes any number of arguments, including none" while the latter is what is actually intended: a function taking no arguments. The first form also isn't strictly conforming ANSI/ISO C.
Consistent with Node, it has an ARRAY_SIZE() macro but not COUNTOF().