Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2016-01-21 22:03:31 +0300
committerKamil Rytarowski <n54@gmx.com>2016-01-21 22:43:59 +0300
commit7e3b65cbb6ae3c7432515b4ffcaf5fb7e0c3514a (patch)
treefcc4181d9f7fd075faf7a69188484a062a1074e0 /src/coreclr/run-cppcheck.sh
parenta48d46fd0dbcad5d049966e6a53787609bbaa800 (diff)
NetBSD: Add support for retrieving the number of available CPUs
$ uname NetBSD $ getconf NPROCESSORS_ONLN 2 $ getconf _NPROCESSORS_ONLN getconf: _NPROCESSORS_ONLN: unknown variable Commit migrated from https://github.com/dotnet/coreclr/commit/5998f75a480eca0651051374a4e6c712bae830f8
Diffstat (limited to 'src/coreclr/run-cppcheck.sh')
-rwxr-xr-xsrc/coreclr/run-cppcheck.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/coreclr/run-cppcheck.sh b/src/coreclr/run-cppcheck.sh
index 6888468bfa4..c505fd184de 100755
--- a/src/coreclr/run-cppcheck.sh
+++ b/src/coreclr/run-cppcheck.sh
@@ -41,6 +41,8 @@ SloccountOutput="sloccount.sc"
# processors available to a single process.
if [ `uname` = "FreeBSD" ]; then
NumProc=`sysctl hw.ncpu | awk '{ print $2+1 }'`
+elif [ `uname` = "NetBSD" ]; then
+NumProc=$(($(getconf NPROCESSORS_ONLN)+1))
else
NumProc=$(($(getconf _NPROCESSORS_ONLN)+1))
fi
@@ -114,4 +116,4 @@ then
fi
echo Check finished. Results can be found in: $CppCheckOutputs $SlocCountOutputs
-exit 0 \ No newline at end of file
+exit 0