From owner-cvs-all Mon Sep 11 20:27:41 2000 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 7CB2B37B424; Mon, 11 Sep 2000 20:27:33 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id OAA28854; Tue, 12 Sep 2000 14:27:15 +1100 Date: Tue, 12 Sep 2000 14:27:14 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Greg Lehey Cc: John Baldwin , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/libkern arc4random.c In-Reply-To: <20000912093140.S19431@wantadilla.lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 12 Sep 2000, Greg Lehey wrote: > On Monday, 11 September 2000 at 19:10:20 +1100, Bruce Evans wrote: > > On Sun, 10 Sep 2000, John Baldwin wrote: > > > >> jhb 2000/09/10 22:51:58 PDT > >> > >> Modified files: > >> sys/libkern arc4random.c > >> Log: > >> Add #include's of sys/proc.h and sys/param.h to silence a warning. > >> > >> Revision Changes Path > >> 1.5 +3 -1 src/sys/libkern/arc4random.c > > > > #include's shouldn't be added or unsorted to work around new > > misimplementations in headers. ( now has a gratuitous > > dependency on because it doesn't forward-declare ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > "struct proc". has a not-so-gratuitous dependency on ^^^^^^^^^^^^^ > > because it calls snprintf(). We hacked around the > > corresponding problem for macros that call panic() by declaring > > panic() in the wrong place.) > > What's the correct solution? See above for . is also missing some declarations: --- diff -c2 random.h~ random.h *** random.h~ Mon Sep 11 23:09:05 2000 --- random.h Tue Sep 12 01:47:13 2000 *************** *** 32,35 **** --- 32,37 ---- #ifdef _KERNEL + struct proc; + u_int read_random(struct proc *, void *, u_int); *************** *** 37,40 **** --- 39,44 ---- ENTROPYSOURCE }; void random_harvest(void *, u_int, u_int, u_int, enum esource); + void random_set_wakeup(int *var, int value); + void random_set_wakeup_exit(int *var, int value, int exitval); #endif --- This doesn't fix the style bugs. should probably declare snprintf() if it uses it. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message