about summary refs log tree commit homepage
path: root/Makefile.PL
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-09-18 10:15:10 +0000
committerEric Wong <e@80x24.org>2023-09-20 19:14:19 +0000
commit6b70d5f03b688ee24df38ea669c0d800a6ad3b49 (patch)
tree51f0bd6e3cc9739bbf9f43284fbe49fa65bc03a5 /Makefile.PL
parentd6e792f9eb38258dd79eed7626b3cab1eb25cd1f (diff)
downloadpublic-inbox-6b70d5f03b688ee24df38ea669c0d800a6ad3b49.tar.gz
`getconf NPROCESSORS_ONLN' will succeed on GNU/Linux systems
anyways; and the non-underscore-prefixed invocation works fine
on all BSD flavors tested.

Thus the `nproc' and `gnproc' attempts will never be reached.
The only downside is we lose the ability to account for CPU
affinity, but that's probably not an issue since CPU affinity
(AFAIK) isn't a commonly-used feature.
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 5b7914dc..97e00395 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -199,8 +199,8 @@ WriteMakefile(
 );
 
 sub MY::postamble {
-        my $N = (`{ getconf _NPROCESSORS_ONLN || getconf NPROCESSORS_ONLN ||
-                gnproc || nproc; } 2>/dev/null` || 1);
+        my $N = (`{ getconf _NPROCESSORS_ONLN ||
+                getconf NPROCESSORS_ONLN; } 2>/dev/null` || 1);
         $N += 1; # account for sleeps in some tests (and makes an IV)
         <<EOF;
 PROVE = prove