Re: kernel features MIB




On Fri, 28 Dec 2007, John Baldwin wrote:

On Thursday 27 December 2007 05:04:44 pm John Baldwin wrote:

At work we don't have a pretty API for this at all, but I'm thinking for FreeBSD we can do this:

FEATURE(foo, "description of foo")

which is a macro to create the 'kern.features.foo' node and set it to 1. Then we could have a routine in libc:

int feature_present(const char *name);

That returns a boolean to indicate if a given feature is present or not by invoking sysctlbyname(3), etc.

Any objections to the idea?

So here's a bikeshed question I have no idea for. Which header should feature_present()'s prototype go in? I anticipate this routine being used in libc itself, so I don't think it can go into libutil.

#include <sys/feature.h>

feature_check(2)?

Does POSIX talk about the namespace for non-portable names being passed to sysconf(3)?

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: kernel features MIB
    ... FEATURE(foo, "description of foo") ... which is a macro to create the 'kern.features.foo' node and set it to 1. ... I anticipate this routine being ... used in libc itself, so I don't think it can go into libutil. ...
    (freebsd-arch)
  • Re: kernel features MIB
    ... On Thursday 27 December 2007 05:04:44 pm John Baldwin wrote: ... which is a macro to create the 'kern.features.foo' node and set it to 1. ... I anticipate this routine being ... used in libc itself, so I don't think it can go into libutil. ...
    (freebsd-arch)
  • Re: AutoOpen Macro Not Showing Toolbar
    ... > in his AutoClose macro. ... routine displayed the toolbar. ... I created AutoOpen and AutoClose ... Then it suddenly occurred to me that I had made AutoOpen a private routine. ...
    (microsoft.public.word.vba.general)
  • The great Homophones Problem.
    ... I am trying to include in an existing macro a routine to offer help to ... learners writing English. ... BluWord followed by three suggested substitutions for it, ...
    (microsoft.public.word.vba.beginners)
  • Re: Save - Yes / No / Cancel
    ... Peltier Technical Services ... I have found some vba that may " Force users to enable ... hidden except one that says about your macro status. ... other sheets are visable using the very-visable routine. ...
    (microsoft.public.excel.misc)