+2003-07-09 Christopher Faylor <cgf@redhat.com>
+
+ * sysconf.cc (sysconf): Return processors online rather than bitmask
+ for _SC_NPROCESSORS_ONLN.
+
2003-07-08 Christopher Faylor <cgf@redhat.com>
* cygheap.cc (creturn): Set appropriate errno when out of memory.
case _SC_NPROCESSORS_CONF:
return sbi.NumberProcessors;
case _SC_NPROCESSORS_ONLN:
- return sbi.ActiveProcessors;
+ {
+ int i = 0;
+ do
+ if (sbi.ActiveProcessors & 1)
+ i++;
+ while (sbi.ActiveProcessors >>= 1);
+ return i;
+ }
case _SC_PHYS_PAGES:
return sbi.NumberOfPhysicalPages;
case _SC_AVPHYS_PAGES: