Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/lib/libc
> Date: Sat, 14 Sep 2024 22:26:37 -0000 (UTC)
> From: christos%astron.com@localhost (Christos Zoulas)
>
> In article <ZuH9e1qHreEvUUss%exadelic.gatalith.at@localhost>,
> Thomas Klausner <wiz%NetBSD.org@localhost> wrote:
> >On Wed, Sep 11, 2024 at 09:50:35AM -0400, Christos Zoulas wrote:
> >> POSIX.1-2024 removes asctime_r and ctime_r and does not let
> >> libraries define them, so remove them except when needed to
> >> conform to earlier POSIX. These functions are dangerous as they
> >> can overrun user buffers. If you still need them, add
> >> -DSUPPORT_POSIX2008 to CFLAGS.
> >
> >Hm, that sounds like we should hide asctime_r and ctime_r?
>
> I think that it will break stuff in pkgsrc... We could, I guess.
We have to continue defining the symbols in libc. We can put the
declarations in time.h under
#if (_POSIX_C_SOURCE - 0 < 202405L) || defined(_NETBSD_SOURCE)
...
#endif
in addition to whatever conditions are already there.
The _POSIX_C_SOURCE part is mandatory for POSIX.1-2024 compliance.
The _NETBSD_SOURCE part is up to us and we could choose to remove it
later (or invent a date system for _NETBSD_SOURCE like
_POSIX_C_SOURCE), or, rather, replace it by __LIBC12_SOURCE__ so the
libc definitions still work.
Home |
Main Index |
Thread Index |
Old Index