Re: C11/POSIX-2024 Questions
John Scott <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
> I only have the final draft for POSIX-2024. It says "_POSIX_VERSION to the value 20yymmL." It isn't on the web yet for the HTML version. Anyone know the value this has in the final version? I assume you're referring to Draft 4.1, which indeed just has the placeholder. I don't have the final version, but the latest "interim build draft" had 202405L. I expect that this has not changed since this corresponds to the month that it was sent out for publication. > memmem is in string.h under the __GNU_VISIBLE guard. Does it now need to be under a __POSIX_VISIBLE > 2024mmdd and __GNU_VISIBLE? ISO C has reserved symbols starting with "str" and "mem" in <string.h> to the implementation at least since C99, and POSIX affirms this, so technically it does not, and has never needed, a guard at all. It can be exposed even in strict ISO C conformance mode unconditionally. This extends to strlcpy, strlcat, stpcpy, and friends too. > aligned_alloc in stdlib.h is only guarded by C > 2011. Does that need to be an || POSIX >= 2024 also? POSIX 2024 *requires* C11/C17: if someone has _POSIX_C_SOURCE set to 202405L but __STDC_VERSION__ < 201112L, that's not a conforming build environment and it's basically an error on the part of the user. I therefore don't think this deserves special accommodation: a conditional on the ISO C version should be adequate. Please note: I'm basically an amateur who lurks here and in the Austin Group and you should have healthy skepticism over my opinions here.
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSiPzylvTnZ6xisfzWz9N0oYfTNugUCZn7eHwAKCRCz9N0oYfTN ujIVAP0Y5me794BMcv62GowpKJl3y41OgDYKuvaUl2Mu/6J1fwD/fuUZegYqq723 HPEhCIhuq7eXbszRV7z5TumxE0MgbgA= =+ZFB -----END PGP SIGNATURE-----
smime.p7s
(application/pkcs7-signature, 6.1 KB) - not displayed