There were no further comments except Pádraig's one, so I committed the change:
2009-11-04 Bruno Haible <br...@clisp.org> Make num_processors more flexible and consistent. * lib/nproc.h (enum nproc_query): New type. (num_processors): Add a 'query' argument. * lib/nproc.c: Include <stdlib.h>, <sched.h>, c-ctype.h. (num_processors): Add a 'query' argument. Test the value of the OMP_NUM_THREADS environment variable if requested. On Linux, NetBSD, mingw, count the number of CPUs available for the current process. * m4/nproc.m4 (gl_PREREQ_NPROC): Require AC_USE_SYSTEM_EXTENSIONS. Check for sched_getaffinity and sched_getaffinity_np. * modules/nproc (Depends-on): Add c-ctype, extensions. * NEWS: Mention the change. See http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4e4fd5b6c34d828725994b7f444e18fcf3f85589