Re: POSIX-2024 and dirent.h

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Aug 14 13:53, Joel Sherrill wrote:
> Hi
> 
> POSIX Issue 8 (2024) adds the following to dirent.h:
> 
> DT_BLK, DT_CHR, DT_DIR, DT_FIFO, DT_LNK, DT_REG, DT_SOCK, DT_UNKNOWN,
> DT_MQ, DT_SEM, DT_SHM, and DT_TMO
> 
> These were not mentioned in POSIX Issue 7 (2018).
> 
> The default dirent.h and sys/dirent.h do not support anything. I only see
> the DT_ constants in the sys/rtems version.
> 
> The sys/rtems version has the constants inside a __BSD_VISIBLE guard.
> 
> I think these should also be under a (_POSIX_C_SOURCE >= 202405L) guard.
> 
> I am looking for concurrence and whether adding a check for 202405L has any
> impact on sys/features.h. POSIX-2018 (Issue 7) still specifies
> using 200809L for _POSIX_C_SOURCE.

Yes, this should be added to sys/features.h with a matching __POSIX_VISIBLE
which in turn should be used in the affected headers.  _GNU_SOURCE and
_DEFAULT_SOURCE should set _POSIX_C_SOURCE to 202405L. _XOPEN_SOURCE is
unaffected.


Thanks,
Corinna
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.