Maybe @eli-schwartz could have a look, for me this would suffice.
The configuration data seems fine to me. As discussed on the bug report:
I guess the intention was to replicate the olde timey idiom of not defining `THING` or `#define THING 1` if it was defined.
As you say most of the actual tests just look for "defined" and don't care what value, so hopefully true/false will work just fine.
My personal sense of aesthetics suggests consistently defining things, but this PR implements the compatible approach instead, which is a very justifiable decision to make and should work quite well.
I haven't reviewed the second or third commits -- I am not a mingw or generally a Windows person, so I can't do a good job evaluating when to `-DWIN32`.