curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: help making a cmake check for _Atomic?

From: Cristian Rodríguez via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 13 Jun 2022 09:04:25 -0400

On Mon, Jun 13, 2022 at 2:09 AM Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Sun, 12 Jun 2022, Cristian Rodríguez wrote:
>
> > so, if target environment is said to support c11 and not defined
> > __STDC_NO_ATOMICS__ then include header, define some internal flag else not
> > supported.
>
> That seems more complicated than what we do now.
>
> configure tests need to check for the presence of things, not the absense of
> the opposite.
>
> If you build curl with C89 compiler from the early 90s, __STDC_NO_ATOMICS__
> will not be defined even if atomic and friends are not supported.

Yes, but then __STDC_VERSION__ will not be defined to 201112L as
_Atomic depends on the memory model which was standarized by C11,
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-06-13