curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Reducing windows compiler warnings

From: Sergei Nikulov via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 5 Jul 2017 10:59:48 +0300

2017-07-05 10:44 GMT+03:00 Daniel Stenberg <daniel_at_haxx.se>:
> On Wed, 5 Jul 2017, Sergei Nikulov via curl-library wrote:
>
>> AFAIR, inet_pton is defined since Windows Vista, according to
>> https://msdn.microsoft.com/en-us/library/windows/desktop/cc805844(v=vs.85).aspx
>>
>> This definition will break this rules
>> add_definitions(-D_WIN32_WINNT=0x0501)
>>
>> This will explicitly enforce Windows XP, so I suspect inet_pton exists in
>> libraries but disabled in headers.
>
>
> Uh oh. Thanks, that's probably it, yes.
>
> It's a weird combination then to set an old lowest windows version and yet
> use newer functions. How would windows devs like to handle this?

AFAIK, the simple way - just drop XP support :-)

Otherwise, if inet_pton found, we should increase API requirements (at
least to _WIN32_WINNT_VISTA).

BTW, you've merged changes with ENABLE_INET_PTON recently.
Perhaps we should play with this switch to set correct define for _WIN32_WINNT.

> --
>
> / daniel.haxx.se

-- 
Best Regards,
Sergei Nikulov
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-07-05