Fix compiler warning that broke build
Correct reporting of number of CPU cores on Linux

There are a number of problems with the implementation of
sigar_cpu_info_list_get() on Linux:

* The call sysconf(_SC_NPROCESSORS_CONF) returns the number of processors
  in the system, not the number of cores (i.e. in a hyperthreaded
  system, sigar_cpu_total_count() gives the number of threads, not cores).
* It turns out that the CPUINFO instruction on x86 is not a reliable way of
  getting the number of cores, or even the number of threads (which is what
  sigar_cpu_core_count() is actually trying to read).
* core_rollup ignores all but one processor per socket, on the assumption
  that entries in /proc/cpuinfo appear grouped by socket. This assumption
  is not correct.
* The get_cpuinfo_max_freq() function retrieves data corresponding to the
  wrong processor in the presence of the core_rollup option (although the
  practical effect is cancelled out by the previous issue, purely by
  coincidence).

The solution is to obtain all information required about the processors
from the kernel via the /proc/cpuinfo file. This allows us to return the
actual number of cores, rather than threads, in the cores_per_socket and
total_cores variables. It also allows us to return the correct number of
sockets in the system, which was broken by a combination of the first two
issues above. Theoretically, all of this would work even in an asymmetric
system with different numbers of cores in each socket. It should work even
if the processors listed in /proc/cpuinfo are in arbitrary order, even in
the presence of the core_rollup option.

Signed-off-by: Zane Bitter <zbitter@redhat.com>
Parse /proc/cpuinfo correctly on non-x86 platforms

S/390, PPC64 & Itanium have different formats for /proc/cpuinfo

Signed-off-by: Zane Bitter <zbitter@redhat.com>
Merge pull request #1 from zaneb/master

Include zanebs changes