visibility.m4

2009-11-01 Thread Mike Gran
Hello- If I use visibility.m4 on a platform with a recent GCC (4.x) on Cygwin, the visibility.m4 correctly discovers that gcc can compile with -fvisibility="hidden".  But, on Cygwin (and probably most non-ELF) gcc does not actualy implement the visibility and emits the warning "visibility attr

Re: [PATCH] core-count: A new program to count the number of cpu cores

2009-11-01 Thread Bruno Haible
Pádraig Brady wrote: > > + while (*envvalue != '\0' && c_isspace (*envvalue)) > > + envvalue++; > > A pedantic comment. Could one instead assume strtoul() skips leading > whitespace? But then strtoul would also skip a sign, and a value of, say, "+4" is not allowed by the OpenMP spec.

Re: [PATCH] core-count: A new program to count the number of cpu cores

2009-11-01 Thread Pádraig Brady
Bruno Haible wrote: > > Here is a proposed change to the gnulib 'nproc' module. It will > require changes (simplification) on Giuseppe's side, of course. Wow, this is great stuff Bruno, thanks! > *** lib/nproc.c.orig 2009-11-01 14:55:37.0 +0100 > --- lib/nproc.c 2009-11-01 14:54:5

Re: [PATCH] core-count: A new program to count the number of cpu cores

2009-11-01 Thread Bruno Haible
Pádraig Brady wrote: > num_processors() already uses _NPROCESSORS_ONLN (online processors) > so I then wondered how this be different to that returned by > pthread_getaffinity_np() ? > > A quick google for cpuset shows: > http://www.kernel.org/doc/man-pages/online/pages/man7/cpuset.7.html > > Als

Re: [PATCH] core-count: A new program to count the number of cpu cores

2009-11-01 Thread Pádraig Brady
Giuseppe Scrivano wrote: > Hi Pádraig, > > > Pádraig Brady writes: > >> I do wonder though whether it would be better >> to have num_processors() try to return this by default? > > num_processors is going to be used by programs as nproc will be used by > scripts; all considerations we made for