Date: Tue, 2 Jun 1998 07:33:03 +1000 From: Bruce Evans <bde@zeta.org.au> To: mike@smith.net.au, wollman@khavrinen.lcs.mit.edu Cc: freebsd-current@FreeBSD.ORG Subject: Re: cdrecord trouble on currnet Message-ID: <199806012133.HAA00254@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> This would defeat the entire purpose of sysconf(), which is to pass >> opaque constants to the kernel. > >Bullshit. Go look at the code before making pronouncements from on >high. > >In particular, note the code which quite clearly states: > > case _SC_CHILD_MAX: > return (getrlimit(RLIMIT_NPROC, &rl) ? -1 : rl.rlim_cur); > case _SC_CLK_TCK: > return (CLK_TCK); > >There is no earthly reason why a: > > case _SC_PAGESIZE: > return (getpagesize()); > >...cannot be added to this same switch statement. Except it gives yet more namespace pollution. Existing namespace pollution can be leveraged by calling sysctl() directly: case _SC_PAGESIZE: mib[0] = CTL_HW; mib[1] = HW_PAGESIZE; break; Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806012133.HAA00254>