On Fri, May 01, 2015 at 01:10:14PM -0700, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 05/01/15 12:34, Baptiste Daroussin wrote: > > On Fri, May 01, 2015 at 10:22:50PM +0300, Sergey Kandaurov wrote: > >> On 1 May 2015 at 21:32, Baptiste Daroussin <b...@freebsd.org> > >> wrote: > >>> Author: bapt Date: Fri May 1 18:32:16 2015 New Revision: > >>> 282314 URL: https://svnweb.freebsd.org/changeset/base/282314 > >>> > >>> Log: Import reallocarray(3) from OpenBSD > >>> > >>> Add a manpage for it, assign the copyright to the OpenBSD > >>> project on it since it is mostly copy/paste from OpenBSD > >>> manpage. style(9) fixes [..] > >> > >>> Added: head/lib/libc/stdlib/reallocarray.3 > >>> ==================================================================== > ========== > >>> > >>> > - --- /dev/null 00:00:00 1970 (empty, because file is newly added) > >>> +++ head/lib/libc/stdlib/reallocarray.3 Fri May 1 18:32:16 > >>> 2015 (r282314) @@ -0,0 +1,136 @@ +.\" Copyright (c) 2015 > >>> OpenBSD +.\" All rights reserved. > >> > >> This copyright notice looks suspicious. > >> > > Well I wrote the man page but by copy/pasting code from OpenBSD > > malloc(3) manpage which copyright should I set? > > "OpenBSD" is not a legal entity so the declaration _may_ be invalid > (IANL). OpenBSD developers are very careful here, and there is no > reason we should do the opposite.
Fixed > > Normally you copy the copyright notice altogether (in this case, since > the text are mostly new creation from Theo de Raadt, he may have the > right to just license this portion to us; they probably didn't do it > because the new addition to the malloc(3) manual page is too small to > warrant additional owners) or rewrite it to make the copyright > ownership clear. > > I'm kinda disappointed with the fact that there is no seek for public > review (e.g. -arch@ or -standard@) on wider audience level for > essential system libraries like libc, as others may already working on > this in private, by the way. But since the API is already there I > guess it should stay. > > Two comments on the code change itself: > > a) __FreeBSD_version should be bumped and this should be documented. Done > > b) It may be sensible to use __builtin_umul_overflow instead of > hand-rolling the same functionality. I think the compiler is not > smart enough to handle that. > That I have no opinion about it, I just wanted to get the avoid the duplication of that code anywhere in base. Bapt
pgpRRxcyTH4_9.pgp
Description: PGP signature