]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r342952:
authorngie <ngie@FreeBSD.org>
Mon, 11 Mar 2019 18:17:12 +0000 (18:17 +0000)
committerngie <ngie@FreeBSD.org>
Mon, 11 Mar 2019 18:17:12 +0000 (18:17 +0000)
commit69cfc97effbccf3a9d03e41c5426515bb69fbb06
tree4ba4909ae9a703efd721dc056e4cfb657cdd2af5
parent530fca00c8a3b337080d43810c5ab0f507fe3394
MFC r342952:

Add Linux compatibility support for `SC_NPROCESSORS_{CONF,ONLN}` as `_SC_NPROCESSORS_{CONF,ONLN}`

The goal of this change is to make it easier to use getconf to query
the number of available processors.

Sadly it's unclear per POSIX, which form (with a preceding _ or
lacking it) is correct. I will bring this up on the Austin Group list so
this point is clarified for implementors that might rely on this getconf
variable in future POSIX spec versions.

This is something I noticed when trying to import GoogleTest to FreeBSD
as one of the CI scripts uses this variable on Linux.

Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D19527
usr.bin/getconf/sysconf.gperf