Re: [PATCH] PR58669: does not detect all cpu cores/threads

Andïï <[email protected]> Fri, 18 Oct 2013 16:41:48 +0100
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.java.patches
Message-ID <CAFXTvn7nSaJzAPWhE2XbmL1+t3c_8BVWPc=vnF87in=etxJVmg@mail.gmail.com>
On 18 October 2013 03:27, Tom Tromey <[email protected]> wrote:
>>>>>> "Andrew" == Andrew  <[email protected]> writes:
>
> Andrew> +#ifdef HAVE_UNISTD_H
> Andrew> +  procs = sysconf(_SC_NPROCESSORS_ONLN);
> Andrew> +#endif
>
> Space before the "(".
>
> Technically you should probably check for sysconf in configure.ac.
> I'm not sure whether it matters any more.
>
> I think _SC_NPROCESSORS_ONLN is not portable though.
>
> Tom

I can add an #ifdef _SC_NPROCESSORS_ONLN around it too.
Is that enough to imply we have sysconf too?
-- 
Andii :-)