curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: cmake windows build on 32 bit ARM, appveyor

From: Martin Storsjö <martin_at_martin.st>
Date: Fri, 27 Oct 2017 11:19:47 +0300 (EEST)

On Fri, 27 Oct 2017, Daniel Stenberg wrote:

> On Fri, 27 Oct 2017, Martin Storsjö wrote:
>
>> ... and after typing all this, I realize that you already have support for
>> targeting curl towards windows store apps (which probably isn't
>> surprising), so setting CURL_WINDOWS_APP while building might be an even
>> better fix for your issue.
>
> Thanks for explaining!
>
> It seems our curl_setup.h header file already tries to detect this setup and
> set CURL_WINDOWS_APP automatically:
>
> https://github.com/curl/curl/blob/master/lib/curl_setup.h#L754-L760
>
> I assume it means this check isn't good enough for the ARM build I try?

The check probably is almost ok, but it seems to fail on the surrounding
ifdefs (which makes sure we don't try to include winapifamily.h in a
configuration where it doesn't exist) - as Marcel points out in the other
mail, cmake seems to default _WIN32_WINNT to 0x0600.

In other projects, I've used #ifdef WINAPI_FAMILY instead, as condition
for including winapifamily.h. Does anybody know of a case where
WINAPI_FAMILY isn't defined but including the header and performing the
WINAPI_FAMILY_PARTITION check would end up defining CURL_WINDOWS_APP?

I guess it'd be safe to at least amend it with an "||
defined(WINAPI_FAMILY)". I can send a PR with that.

// Martin

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-10-27