I would prefer putting the Windows or Linux specific parts in separate files, rather than using #ifdefs, if possible.
I agree that we should probably get rid of the C99 stuff like declaring variables in places other than the start of a block.
There was a suggestion to use a library like uthash rather than the glibc hash table functions, since Windows doesn't have those. That could be a good idea. Alternately, we could just create our own hash table, since that is just not a very complex data structure. Having a statically sized hash table would probably be ok, since we should know roughly how many entries it should have based on looking at the code.