Deconditionalize use of LLL_LOCK_INITIALIZER in bits/libc-lock.h.

This commit is contained in:
Roland McGrath 2014-05-01 13:08:30 -07:00
parent a849e80035
commit c727f03253
2 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,11 @@
2014-05-01 Roland McGrath <roland@hack.frob.com>
* nptl/sysdeps/pthread/bits/libc-lock.h
[_LIBC && (!NOT_IN_libc || IS_IN_libpthread)]
(__libc_lock_define_initialized_recursive): Always define using
initializer. Modern compilers treat uninitialized (implicit zero) and
explicit zero initializers the same (i.e. put the datum in bss).
2014-05-01 Andreas Schwab <schwab@linux-m68k.org>
* nscd/nscd-client.h: Include <string.h>.

View File

@ -48,13 +48,8 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
/* Define an initialized recursive lock variable NAME with storage
class CLASS. */
#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
# if LLL_LOCK_INITIALIZER == 0
# define __libc_lock_define_initialized_recursive(CLASS,NAME) \
CLASS __libc_lock_recursive_t NAME;
# else
# define __libc_lock_define_initialized_recursive(CLASS,NAME) \
# define __libc_lock_define_initialized_recursive(CLASS, NAME) \
CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER;
# endif
# define _LIBC_LOCK_RECURSIVE_INITIALIZER \
{ LLL_LOCK_INITIALIZER, 0, NULL }
#else