commit:     24c8d94b431b33ab40719e6728dbd7dac5d86531
Author:     Michael Haubenwallner <michael.haubenwallner <AT> ssi-schaefer 
<DOT> com>
AuthorDate: Fri May 20 11:18:23 2016 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Fri May 20 11:18:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=24c8d94b

Cygwin: use cmd to gain NUMBER_OF_PROCESSORS, for env -i

 scripts/bootstrap-prefix.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 3377cb7..74863d4 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1781,7 +1781,7 @@ EOF
        echo
        local ncpu=
     case "${CHOST}" in
-               *-cygwin*)     ncpu=${NUMBER_OF_PROCESSORS}                     
   ;;
+               *-cygwin*)     ncpu=$(cmd /D /Q /C 'echo 
%NUMBER_OF_PROCESSORS%')  ;;
                *-darwin*)     ncpu=$(/usr/sbin/sysctl -n hw.ncpu)              
   ;;
                *-freebsd*)    ncpu=$(/sbin/sysctl -n hw.ncpu)                  
   ;;
                *-solaris*)    ncpu=$(/usr/sbin/psrinfo | wc -l)                
   ;;

Reply via email to