It is rather disappointing on Windows that I keep hitting "incompatibilities" with the standard.
Some examples: Windows has no inet_pton or inet_ntop built-in and getaddrinfo run against gethostname's return value doesn't do what the deprecated ipv4 gethostbyname function does.
For instance, getaddrinfo is returning 127.0.0.1 or ::1 instead of 192.168.1.x
Windows has their own non-standard functions Inet_pton and Inet_ntop avaible on Windows 8

I ended up snagging inet_pton equivalents.
I guess I don't fully understand why a company with so many resources can screw up stuff like this. I guess I will need to use deprecated gethostbyname on Windows, which is maddeningly stupid.
I'm not sure what to do for IPv6 since addresses the address have more information packed into them, you can't just convert an ipv4 address to ipv6 and have the right result (i.e. fe80::/10).