Some of the POSIX 202405L functions are already in the system, make
them visible when appropriate.
Details
- Reviewers
imp des allanjude - Commits
- rG9d0eea9422d0: Make newly POSIX functions visible
Whip up some simple tests that call the functions using _POSIX_C_SOURCE
Make sure they confirm to POSIX (qsort_r especially)
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
So generally drop the __BSD_VISIBLE when testing for POSIX_VISIBLE. We define POSIX_VISIBLE to the the latest for bsd sources, so it's redundant.
include/dlfcn.h | ||
---|---|---|
87 | I'd do typedef struct dl_info Dl_info_t; inside this ifdef instead of the ugly comma dance. | |
125 | You don't need BSD_VISIBLE here. the only time you need it is when you're only showing the definition for earlier versions of posix. here it's posix-1.2024 and newer. | |
include/stdlib.h | ||
239 | same here and below for __BSD_VISIBLE unless I say differently. | |
include/string.h | ||
66–67 | Does posix require this to be visible even when memmem is a macro? | |
include/time.h | ||
184 | I'd replace the __BSD_VISIBLE here with | |
189 | If it's not defined in those standards. I haven't checked, though. I. thought TIME_MONOTONIC, though, was new with c23 | |
include/unistd.h | ||
487 | drop __BSD_VISIBLE |
apart from the __BSD_VISIBLE thing, this is close to landing, there's too many of them for me to hit accept though
include/dlfcn.h | ||
---|---|---|
125 | This was moved out of the __BSD_VISIBLE block below, so if POSIX isn't 202405, it still needs to be visible when __BSD_VISIBLE doesn't it? | |
include/time.h | ||
189 | I didn't think they reserved all TIME_ macros though. While those standards don't define it, I didn't think they precluded a system from defining other ones in this case. |
include/dlfcn.h | ||
---|---|---|
125 | Oh, I get it now... so there's no way to have __BSD_VISIBLE defined without also having __POSIX_VISIBLE be latest. |
include/time.h | ||
---|---|---|
184 | I've removed __BSD_VISIBLE, but this comment appears to have been truncated. |
include/string.h | ||
---|---|---|
66–67 | It states:
|
OK. All my nits are taken care of. There's one last comment that you may not have intended, but either way, I'm good with this being committed now.
thanks for your patience with my pickiness.
include/dlfcn.h | ||
---|---|---|
87 | Did you mean to keep this comment? |
Thanks for the review, I'm very happy to have a picky reviewer on this one especially.