From owner-freebsd-current@FreeBSD.ORG Mon May 17 00:30:50 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4156B106564A; Mon, 17 May 2010 00:30:50 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id ADC9D8FC12; Mon, 17 May 2010 00:30:49 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@freebsd.org X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.2, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_50 0.80) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: o4H0B7Ei019440 Received: from kobe.laptop (ppp-94-64-236-75.home.otenet.gr [94.64.236.75]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.1) with ESMTP id o4H0B7Ei019440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 17 May 2010 03:11:14 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.4/8.14.4) with ESMTP id o4H0B701084785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 May 2010 03:11:07 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.4/8.14.4/Submit) id o4H0B6O2084782; Mon, 17 May 2010 03:11:06 +0300 (EEST) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: Maxim Sobolev References: <4BCF5BAF.7010501@FreeBSD.org> Date: Mon, 17 May 2010 03:11:06 +0300 In-Reply-To: <4BCF5BAF.7010501@FreeBSD.org> (Maxim Sobolev's message of "Wed, 21 Apr 2010 13:10:23 -0700") Message-ID: <877hn3tmjp.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: current@freebsd.org Subject: Re: SYSCTL_XXX(9) manual page deficiency X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 00:30:50 -0000 On Wed, 21 Apr 2010 13:10:23 -0700, Maxim Sobolev wrote: > Hi, > > According to the manual page for the SYSCTL_XXX(9) family of > functions, in order to use them one needs to include sys/types.h and > sys/sysctl.h. However, if you do just that the code doesn't compile > due to missing DATA_SET() macros, which is defined in > sys/linker_set.h. My question is whether or not sysctl.h should > include sys/linker_set.h or manual page to be extended to also > suggests that this include is required to use those functions? linker_set.h is a relatively small header that defines only a minimal amount of macros in the public namespace. Some of these symbols are a bit generic, e.g. SET_BEGIN, SET_END, SET_ENTRY, SET_FOREACH and SET_ITEM might conflict with symbol names from other code. On the other hand, the XXX_SET() code is only visible at the end of the SYSCTL_XXX() macros only for kernel code, and it has been there for a *very* long time: since phk committed revision 11863 in 1995. If there ever was a consumer of the kernel API of sysctl.h who had problems with the generic XXX_SET() macros in linker_set.h we'd probably know by now. IMO adding linker_set.h to sysctl.h is fine.