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: Sun, 12 Jun 2022 18:47:46 -0400

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.

On Sun, Jun 12, 2022 at 6:39 PM Cristian Rodríguez
<crrodriguez_at_opensuse.org> wrote:
>
> On Sun, Jun 12, 2022 at 6:18 PM Daniel Stenberg <daniel_at_haxx.se> wrote:
> >
> > On Sun, 12 Jun 2022, Cristian Rodríguez wrote:
> >
> > > That does not appear to be the right way..
> > >
> > > __STDC_NO_ATOMICS__ means _Atomic is *not* implemented .
> > >
> > > it is not a library feature.
> >
> > I don't understand this remark. We don't check for __STDC_NO_ATOMICS__ at
> > all?
>
>
> In the referenced PR there is no check on __STDC_NO_ATOMICS__ which is
> actually the only thing that matters. _Atomic need implementation
> defined compiler support.
>
> http://port70.net/~nsz/c/c11/n1570.html#7.17
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-06-13