From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E6AEE1F565 for ; Sat, 9 Sep 2023 12:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1694260903; bh=HqQzfQQdSK7u0AGQCmd2omDpyJ76XjO2hTImSKBySF4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=d+y5JUSP1KmlAPsLY/itc6YrSFTWiF1k7yU8LF4Ef0oVHaxP3IYf4ZlivkpyVWTv4 YPgTD+fLdhJ3wmCzGiGXD8A9ewmNU3bcMnNWxFTLdtWs8KsEinxxM/7ojaMRy/vpN1 O3WpiA+k9roXLQPAQD/tbWcj07HkqnJRH5E9D/LM= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/8] Makefile.PL: check `getconf NPROCESSORS_ONLN', too Date: Sat, 9 Sep 2023 12:01:35 +0000 Message-ID: <20230909120142.1041752-2-e@80x24.org> In-Reply-To: <20230909120142.1041752-1-e@80x24.org> References: <20230909120142.1041752-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: NetBSD and OpenBSD getconf(1) don't accept a leading underscore, while glibc getconf(1) only accepts the leading underscore (`_NPROCESSORS_ONLN'). FreeBSD getconf(1) accepts both variants. --- Makefile.PL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 5a5628ba..d0652410 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -196,7 +196,8 @@ WriteMakefile( ); sub MY::postamble { - my $N = (`{ getconf _NPROCESSORS_ONLN || nproc; } 2>/dev/null` || 1); + my $N = (`{ getconf _NPROCESSORS_ONLN || getconf NPROCESSORS_ONLN || + gnproc || nproc; } 2>/dev/null` || 1); $N += 1; # account for sleeps in some tests (and makes an IV) <