Date: Fri, 7 Jan 2011 12:58:21 +0100 From: joris dedieu <joris.dedieu@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-doc@freebsd.org, freebsd-gnats-submit@freebsd.org Subject: Re: docs/153654: [patch] incorrect include in sysctl.9 Message-ID: <AANLkTikA7Oor_6dVAnT50i=70oDuOaPK4X1QYQSwhVai@mail.gmail.com> In-Reply-To: <201101031406.18219.jhb@freebsd.org> References: <201101031758.p03Hwr7k054742@red.freebsd.org> <201101031406.18219.jhb@freebsd.org>
index | next in thread | previous in thread | raw e-mail
2011/1/3 John Baldwin <jhb@freebsd.org>: > On Monday, January 03, 2011 12:58:53 pm Joris Dedieu wrote: >> >> >Number: 153654 >> >Category: docs >> >Synopsis: [patch] incorrect include in sysctl.9 >> >Confidential: no >> >Severity: non-critical >> >Priority: low >> >Responsible: freebsd-doc >> >State: open >> >Quarter: >> >Keywords: >> >Date-Required: >> >Class: doc-bug >> >Submitter-Id: current-users >> >Arrival-Date: Mon Jan 03 18:00:24 UTC 2011 >> >Closed-Date: >> >Last-Modified: >> >Originator: Joris Dedieu >> >Release: 8.1-RELEASE-p2 >> >Organization: >> >Environment: >> FreeBSD ladybug2.rmdir.fr 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #0: Mon Dec 27 15:39:23 CET 2010 > joris@ladybug2.rmdir.fr:/usr/obj/usr/src/sys/GENERIC amd64 >> >> >Description: >> Has DATA_SET is defined in sys/kernel.h most SYSTL_* macros don't work if you don't include it. >> >How-To-Repeat: >> >> >Fix: >> --- share/man/man9/sysctl.9.orig 2011-01-03 18:43:53.000000000 +0100 >> +++ share/man/man9/sysctl.9 2011-01-03 18:44:17.000000000 +0100 >> @@ -44,7 +44,7 @@ >> .Nm SYSCTL_QUAD >> .Nd Static sysctl declaration functions >> .Sh SYNOPSIS >> -.In sys/types.h >> +.In sys/kernel.h >> .In sys/sysctl.h >> .Fn SYSCTL_DECL name >> .Fn SYSCTL_INT parent nbr name access ptr val descr > > <sys/kernel.h> does not include <sys/types.h>. Plus, all of <sys/kernel.h> > is not needed. <sys/linker_set.h> is what defines DATA_SET(). This is > probably the "right" set of includes: > > #include <sys/types.h> > #include <sys/linker_set.h> > #include <sys/sysctl.h> > > OTOH, <sysctl.h> should perhaps have a nested include of <sys/linker_set.h> > in the #ifdef _KERNEL case in which case the manpage would not need changing. You are right. My patch is wrong and your solution sounds better. Should I submit an other pr ? Joris > > -- > John Baldwin >home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikA7Oor_6dVAnT50i=70oDuOaPK4X1QYQSwhVai>
