bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Implementations of random, srandom, initstate, setstate, ran


From: Bruno Haible
Subject: Re: [PATCH] Implementations of random, srandom, initstate, setstate, rand, srand. [rebased]
Date: Tue, 4 Nov 2008 03:35:13 +0100
User-agent: KMail/1.5.4

Richard W.M. Jones wrote:
> This version also preserves the glibc locking code, albeit as empty
> macros, so that the code more closely follows what was originally in
> glibc.

Good.

> +/* Locks are not yet implemented in gnulib.  These macros allow us to
> + * preserve the ones which were in glibc.
> + */
> +#define __libc_lock_lock(x)
> +#define __libc_lock_unlock(x)

It's good to enclose such code in
   #if !_LIBC
   #endif
so that the extent of the gnulib specific code is clear to the reader, and
to facilitate future comparisons between the glibc code and the gnulib code.

The #defines are fine for gnulib, but the comment is inaccurate: gnulib has
a module 'lock'. It's simply your choice to not use it here.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]