Re: /usr/include/stdatomic.h is not self-contained (fwd from Cygwin list)
Corinna Vinschen <[email protected]> Thu, 12 Feb 2026 22:52:58 +0100
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On Feb 12 14:18, Brian Inglis wrote:
> On 2026-02-12 13:43, Corinna Vinschen wrote:
> > I pushed a couple of patches to pull this straight. Mainly we now
> > have the definition of __{u}int_fastN_t types in machine/_default_types.h,
> > as well as definitions of __wchar_t and __ptrdiff_t and the definition
> > of __ISO_C_VISIBLE for ISO C23 ialigned to FreeBSD to simplify porting
> > FreeBSD headers. For a start, the stdatomic.h header is now verbatim
> > FreeBSD.
>
> Do we really need to maintain these when gcc already provides them?
>
> $ wc -l /lib/gcc/x86_64-pc-cygwin/13/include/std{int{-gcc,},atomic}.h
> 14 /lib/gcc/x86_64-pc-cygwin/13/include/stdint.h
> 369 /lib/gcc/x86_64-pc-cygwin/13/include/stdint-gcc.h
> 255 /lib/gcc/x86_64-pc-cygwin/13/include/stdatomic.h
Basically I was thinking along the same lines. But...
- does Clang provide them, too? (I think so)
- can we absolutely safely assume that people use gcc or clang?
- and if so can we safely assume that the gcc version for this targte
is really newer than 4.5.0 or the clang version is newer than 2.9?
I honestly don't know, so it seems safer to provide own versions,
just like FreeBSD.
But in fact, if there's some kind of consensus to drop these files,
I'm all for it...
Corinna