> "Martijn Rijkeboer" <[email protected]> writes:
>
> > After quite some discussion here's take 4 of the update of
> > sysutils/cfengine. This version is based on Stuart's version which was
> > based on Jiri B's version.
..
> > Please commit so other people can start testing it.
Okan, these diffs change MAINTAINER to you but I haven't seen much
activity in the recent list posts, are you still interested in this?
On 2013/04/25 07:29, Timo Myyrä wrote:
>
> #ifdef LINUX
> @@ -2100,6 +2106,17 @@ const char *GetWorkDir(void)
>
> static void GetCPUInfo()
> {
> +#if defined(__OpenBSD)
This one should be __OpenBSD__, however it would probably be better
to use sysconf(_SC_NPROCESSORS_CONF) for this if available; it's more
portable and should be easier to feed upstream. sysconf(3) itself is
POSIX; _SC_NPROCESSORS_CONF is not POSIX but is fairly common.
> + int mib[2], count;
> + size_t len;
> + char buf[CF_BUFSIZE];
> +
> + mib[0] = CTL_HW;
> + mib[1] = HW_NCPU;
> + len = sizeof(count);
> + if (sysctl(mib, 2, &count, &len, NULL, 0) == -1)
> + err(1, "sysctl");
> +#else
> FILE *fp;
> char buf[CF_BUFSIZE];
> int count = 0;