C11/POSIX-2024 Questions

Joel Sherrill <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAF9ehCVyevWK5GaGrPAz713rnpZnXFHaXedcu=0eAu-98RbsLg@mail.gmail.com>
Hi

I am finishing up reviewing the additions from POSIX Issue 8 which was
released recently. I noticed a few things and have questions on the right
approach.

+ 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?

+ sys/features.h appears to need this new POSIX version added at least to
the comment block. I don't think it necessarily changes any logic below
that.

+ memmem is in string.h under the __GNU_VISIBLE guard. Does it now need to
be under a __POSIX_VISIBLE > 2024mmdd and __GNU_VISIBLE?

+ aligned_alloc in stdlib.h is only guarded by C > 2011. Does that need to
be an || POSIX >= 2024 also?

+ C11 and POSIX-2024 add these complex methods.

double complex CMPLX(double x, double y);
float complex CMPLXF(float x, float y);
long double complex CMPLXL(long double x, long double y);

FreeBSD has a macro implementation (
https://github.com/lattera/freebsd/blob/master/include/complex.h#L49). If I
add that to complex.h, does it also need a __ISO_C_VISIBLE >= 2011 ||
__POSIX_VISIBLE > 2024mmdd guard?

+ Should I continue to look for guards on things that are newly added in
POSIX 2024 and already in newlib?

That's it so far. Just picky stuff that I plan to address given some advice.

--joel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.