tech-userlevel archive

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

Re: reallocarr(3) cleanup



Joerg Sonnenberger wrote:
> On Wed, Mar 18, 2015 at 12:12:15AM +0100, Kamil Rytarowski wrote:
> > 
> > 
> > > Sent: Tuesday, March 17, 2015 at 11:00 PM
> > > From: "Joerg Sonnenberger" <joerg%britannica.bec.de@localhost>
> > > To: tech-userlevel%NetBSD.org@localhost
> > > Subject: Re: reallocarr(3) cleanup
> > >
> > > On Tue, Mar 17, 2015 at 11:56:35PM +0100, Kamil Rytarowski wrote:
> > > > - merge reallocarr.3 to malloc.3 for consistency,
> > > 
> > > No. Don't put standard and non-standard functions in the same man page.
> > > 
> > This is actually in the namespace of standard NetBSD functions.
> > For this reason I removed occurrences of reallocarray(3) from it (they were in reallocarr(3)).
> > 
> > I was following the rule of strtol(3), which includes strtoi(3).
> 
> That's a bug then. While it is acceptable for C99 and POSIX functions to
> co-inhabit the same man page, it is really unhelpful otherwise. That
> leads to accidental use in portable contexts, forcing everyone to accept
> the functions.
> 
As I understand, for this reason exists the STANDARDS section.
In the attached patch I've noted that reallocarr(3) is a NetBSD extension.
If the only reason to keep them separate is accidental misuse in a portable
code, then separate files won't make it clearer.

If it's really no-go, I will rework the patch. Are the other things OK?

Thanks!

> Joerg
> 


Home | Main Index | Thread Index | Old Index