Fix MS-Windows build with mingw.org's MinGW

mingw.org's MinGW by default targets Windows 9X, so
_WIN32_WINNT is set to a value that bypasses declarations
in system headers we need to compile network_interface_list.
Also, the code needed a workaround for Windows XP, where
some functionality is missing from the GetAdaptersAddresses
API.

* src/w32.c (_WIN32_WINNT): Define to 0x0501, if the value is
lower, temporarily while processing iphlpapi.h.
(address_prefix_match): New helper function.
(network_interface_list): Work around the fact that the
OnLinkPrefixLength member of IP_ADAPTER_UNICAST_ADDRESS is not
available when _WIN32_WINNT < 0x0600.  On Windows XP use
special code that calls address_prefix_match to compute the
network prefix length.
1 job for master in 64 minutes and 39 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
failed #4350
test-all

01:04:39

 
Name Stage Failure
failed
test-all Test
make[2]: *** [check-doit] Error 1
Makefile:319: recipe for target 'check-doit' failed
make[2]: Leaving directory '/builds/emacs/emacs/test'
make[1]: *** [check-expensive] Error 2
make: *** [check-expensive] Error 2
Makefile:294: recipe for target 'check-expensive' failed
make[1]: Leaving directory '/builds/emacs/emacs/test'
Makefile:959: recipe for target 'check-expensive' failed
ERROR: Job failed: exit code 1