TARGET_WINVER fixes
-
If TARGET_WINVER is defined, ensure that WINVER and _WIN32_WINNT are unconditionally set.
-
Provide stubs for inet_ntop() and inet_pton() for Windows versions earlier than Windows 8 (no, they do not exist for those earlier platforms.)
-
Add Meson option, "target_winver" (default: ""), to target versions other than Windows 7 (0x0601, the same as glib.) This sets a compiler command-line define "-DTARGET_WINVER=${target_winver}", which unconditionally sets WINVER and _WIN32_WINNT to select the requested target Windows API.
Ref: https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt