Re: New module nproc

2009-03-25 Thread Glen Lenker
On Thu, Mar 26, 2009 at 12:42:56AM +0100, Bruno Haible wrote: > > +/* Return the total number of processors. The result is guaranteed to > > + be at least 1. */ > > +unsigned long int > > +num_processors (void) > > +{ > > +#ifdef _SC_NPROCESSORS_ONLN > > + long int nprocs = sysconf (_SC_NPROCE

Re: New module pthread

2009-03-25 Thread Bruno Haible
Hi Paul, Two remarks about the pthread module: - You are certainly aware of the modules 'thread', 'tls', 'lock', 'cond', 'yield' that we have in gnulib? While the new 'pthreads' module wants to be "a trivial subset of the pthreads library", the aforementioned modules provide an API very sim

Re: New module nproc

2009-03-25 Thread Bruno Haible
Hi Paul, > +/* Return the total number of processors. The result is guaranteed to > + be at least 1. */ > +unsigned long int > +num_processors (void) > +{ > +#ifdef _SC_NPROCESSORS_ONLN > + long int nprocs = sysconf (_SC_NPROCESSORS_ONLN); > + if (0 < nprocs) > +return nprocs; > +#endif

Re: test-sockets compilation

2009-03-25 Thread Simon Josefsson
Eric Blake writes: > Is it okay to commit this, to silence a gcc warning about a statement with no > effect on non-mingw systems? Please do. /Simon

test-sockets compilation

2009-03-25 Thread Eric Blake
Is it okay to commit this, to silence a gcc warning about a statement with no effect on non-mingw systems? From: Eric Blake Date: Wed, 25 Mar 2009 09:35:18 -0600 Subject: [PATCH] test-sockets: avoid gcc warning * tests/test-sockets.c (main): Silence compiler warning. Signed-off-by: Eric Blake

[PATCH] New modules nproc, pthread.

2009-03-25 Thread Paul Eggert
This patch is to add multithread support for coreutils. The code was written by Glen Lenker, who has filed papers with the GNU project. The pthread emulation (for platforms that lack pthreads) is very minimal, just enough for coreutils to get by. * MODULES.html.sh: Add pthread, nproc. * lib/nproc

Re: ls -v is still inconsistent

2009-03-25 Thread Jim Meyering
Ondřej Vašík wrote: > Subject: [PATCH] doc: Update suffix regex in version sort > > * doc/coreutils.texi: Reflect current filevercmp regex Thanks! Pushed.

Re: ls -v is still inconsistent

2009-03-25 Thread Ondřej Vašík
Jim Meyering wrote: > Pushed. > > http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=1721cf06d9 I guess info doc about suffix regex should be updated too... Greetings, Ondrej From 88ebd00c46668f2b677c8da9a7e40584d5b97d9b Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Ond=C5=99ej=20Va

Re: Feature request: c-snprintf

2009-03-25 Thread John Darrington
On Tue, Mar 24, 2009 at 11:18:12PM +0100, Bruno Haible wrote: So, for numbers to strings, there are four ways to proceed: 1) Use the snprintf_l function available on MacOS X 10.5. Drawback: Unportable, and gnulib cannot provide an easy replacement for lo