mirror of git://gcc.gnu.org/git/gcc.git
runtime: Check for CPU_COUNT itself, don't check glibc version.
Fixes issue 38. From-SVN: r215832
This commit is contained in:
parent
5d20321177
commit
60d9e9fc19
|
|
@ -6,7 +6,7 @@
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
|
|
||||||
// CPU_COUNT is only provided by glibc 2.6 or higher
|
// CPU_COUNT is only provided by glibc 2.6 or higher
|
||||||
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6)
|
#ifndef CPU_COUNT
|
||||||
#define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int))
|
#define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int))
|
||||||
static int _CPU_COUNT(unsigned int *set, size_t len) {
|
static int _CPU_COUNT(unsigned int *set, size_t len) {
|
||||||
int cnt;
|
int cnt;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue