From nobody Wed Oct 27 14:23:40 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3BF8E18251B2; Wed, 27 Oct 2021 14:23:45 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X448 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "anongoth.pl", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HfWC50Vhbz4hdh; Wed, 27 Oct 2021 14:23:44 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from anongoth.pl (unknown [192.168.1.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id B7E41123AA1; Wed, 27 Oct 2021 16:23:41 +0200 (CEST) Date: Wed, 27 Oct 2021 16:23:40 +0200 From: Piotr Kubaj To: Alexey Dokuchaev Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 981564583497 - main - net/cjdns: fix build on powerpc64* Message-ID: References: <202110261848.19QImqrt031580@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3RZko24Ko6ngRveI" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4HfWC50Vhbz4hdh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N --3RZko24Ko6ngRveI Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Not really: > os.cpus() [] > Math.floor((os.cpus() =3D=3D [] ? 1 : cpus.length) * 1.25) Uncaught ReferenceError: cpus is not defined > Math.floor((os.cpus() =3D=3D 0 ? 1 : cpus.length) * 1.25) 1 On 21-10-27 06:42:33, Alexey Dokuchaev wrote: > On Tue, Oct 26, 2021 at 06:48:52PM +0000, Piotr Kubaj wrote: > > commit 9815645834977fe2ada5052d3c81881b7624bed7 > >=20 > > net/cjdns: fix build on powerpc64* > > =20 > > On powerpc64 and powerpc64le systems, os.cpus(), gets defined to []: > > > cpus =3D os.cpus() > > [] > > =20 > > It has type object: > > > typeof cpus > > 'object' > > =20 > > This causes jobs to be 0: > > > Math.floor((typeof cpus =3D=3D=3D 'undefined' ? 1 : cpus.length) = * 1.25); > > 0 > > =20 > > Change it so that instead of comparing type to undefined, we compar= e to 0: > > > Math.floor((os.cpus() =3D=3D 0 ? 1 : cpus.length) * 1.25); >=20 > Wouldn't os.cpus() =3D=3D [] be more correct^Wreadable? >=20 > On a related note, JavaScript is horrible language, don't write in it. > Pro tip: if some $lang has =3D=3D=3D operator, it's highly likely that it= is > just as bad. >=20 > ./danfe --3RZko24Ko6ngRveI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmF5YOwACgkQelmbhSCD nJ0gUw/6AoM3/XDBAdh3Q02h60rVPbj1Ob8FQfSaRTZd+sXSDrjM2dhcsUhx5+CH eJneP6KNvE970NAF3bhF8odL5h5DGqh3CCB1VLRRpqI+1AQhVACfL6+ixNqbw55s MfxlF9EQUFRrOyPp5hn8eKVRiP0diq8T6Uj3OY9/Us9IJHzP70eUQurwQqp1QNHf 5pbzH2jpP6zh0q8teYjx+8wdraUZEY0z/B/mmka4v273GoVrCTg4IchmlwItDiCo nFYJCwauR4eMmMSZGuFT5AHVtjJz22T4/M+Id1Z2kQDQnrZR1GX7ab0NbIOA0u7W dSOxY/PpN8SuO9bPpG1hBGYvQDy6CupHCGQL8A1R7SEedfhQk8qry0WDQ5zwHhDk 7q9qGlnXWevPxS3MwsxP28rj0ZuDVGkwoYfkiSGv3rmoRqDsYDdtJnpVm+8MZVCT ckZmdMymk9yAxutomWOsol6iKFwXDjHQWNaqqgxuqFwbITGiHUC5uITvzs1Du5sv +x+VnllDk7WB5nxEOgC6vl8FQtH3W9jxbr86647FkqbAW5CXIJvEcmdMF6pf4JP0 pBNtuz8A/hIVnEOcnyN+qRKQvLhI6SM4BSx/u/sZFQ/tLawH168flnw4a0MYR1Ht DBLAWYxjFY+DEEgtA9izO+WuqdPToyXTiW05oEVmcA06jd23TtI= =nxaQ -----END PGP SIGNATURE----- --3RZko24Ko6ngRveI--