This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] PR58669: does not detect all cpu cores/threads
- From: AndÃÃ <gnu_andrew at member dot fsf dot org>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 Oct 2013 16:41:48 +0100
- Subject: Re: [PATCH] PR58669: does not detect all cpu cores/threads
- Authentication-results: sourceware.org; auth=none
- References: <20131018011541 dot GA29495 at carrie dot the212 dot com> <87a9i7s48n dot fsf at fleche dot redhat dot com>
On 18 October 2013 03:27, Tom Tromey <email@example.com> wrote:
>>>>>> "Andrew" == Andrew <firstname.lastname@example.org> 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.
I can add an #ifdef _SC_NPROCESSORS_ONLN around it too.
Is that enough to imply we have sysconf too?