tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fdopendir visibility in dirent.h

In article <>,
Niclas Rosenvik  <> wrote:
>When fixing packages for pkgsrc-2021Q4
>I found that fdopendir is only visible
>when _NETBSD_SOURCE is defined.
>The thing is that it is a function
>defined in POSIX.1 2008 edition.
>So the function declaration
>is not visible when programs set
>-D_POSIX_C_SOURCE=200809L or
>I plan on putting
>#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \
>    defined(_NETBSD_SOURCE)
>#ifndef __LIBC12_SOURCE__
>DIR *fdopendir(int);
>in dirent.h so that it is also
>visible to POSIX and XOPEN users 
>if it is okay and no one
>objects to it.

Assuming it is correct go for it.


Home | Main Index | Thread Index | Old Index