Skip to content

Ninja: Fix unrestricted sysconf() returns

Christian Pfeiffer requested to merge ChrisTX/cmake:sysconf-infity-fix into master

As observed in #16740 (closed) , the calculateCommandLineLengthLimit incorrectly treats -1 returns from sysconf() calls as numerical -1 whereas it represents an undefined limit, i.e. infinity.

Given this value is only defined for limit queries, it should be only needed for the query to _SC_MAX_ARG.

Fixes: #16740 (closed)
Topic-rename: ninja-fix-sysconf-non-limit

Merge request reports