about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-17 16:34:08 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-17 16:34:08 +0000
commit9e9f1f159bb957faa125f50efb953088aec831ef (patch)
treeaf62e0da12e48f5ee247ce2722d6c86762bb2e0b
parentef4d5b32b37ba6af985d427ee7c120532d62cc6b (diff)
downloadglibc-9e9f1f159bb957faa125f50efb953088aec831ef.tar.gz
glibc-9e9f1f159bb957faa125f50efb953088aec831ef.tar.xz
glibc-9e9f1f159bb957faa125f50efb953088aec831ef.zip
Update.
	* sysdeps/unix/sysv/linux/system.c: If compiled without threads
	don't do anything fancy.

	* sysdeps/generic/bits/libc-lock.h: Define
	__rtld_lock_define_initialized_recursive.
-rw-r--r--ChangeLog6
-rw-r--r--bits/libc-lock.h3
-rw-r--r--sysdeps/generic/bits/libc-lock.h3
-rw-r--r--sysdeps/unix/sysv/linux/system.c8
4 files changed, 16 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a21e9dd06..628fff9e14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2003-04-17  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/unix/sysv/linux/system.c: If compiled without threads
+	don't do anything fancy.
+
+	* sysdeps/generic/bits/libc-lock.h: Define
+	__rtld_lock_define_initialized_recursive.
+
 	* nss/getXXbyYY_r.c [USE_NSCD] (REENTRANT_NAME): Only retry
 	contacting nscd if NOT_USENSCD_NAME > 0.
 	* nss/nsswitch.c (__nss_disable_nscd): New function.
diff --git a/bits/libc-lock.h b/bits/libc-lock.h
index c2bb494940..9a99d51bfd 100644
--- a/bits/libc-lock.h
+++ b/bits/libc-lock.h
@@ -1,5 +1,5 @@
 /* libc-internal interface for mutex locks.  Stub version.
-   Copyright (C) 1996,97,99,2000,01,02 Free Software Foundation, Inc.
+   Copyright (C) 1996,97,99,2000-2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -40,6 +40,7 @@
 /* Define an initialized recursive lock variable NAME with storage
    class CLASS.  */
 #define __libc_lock_define_initialized_recursive(CLASS,NAME)
+#define __rtld_lock_define_initialized_recursive(CLASS,NAME)
 
 /* Initialize the named lock variable, leaving it in a consistent, unlocked
    state.  */
diff --git a/sysdeps/generic/bits/libc-lock.h b/sysdeps/generic/bits/libc-lock.h
index c2bb494940..9a99d51bfd 100644
--- a/sysdeps/generic/bits/libc-lock.h
+++ b/sysdeps/generic/bits/libc-lock.h
@@ -1,5 +1,5 @@
 /* libc-internal interface for mutex locks.  Stub version.
-   Copyright (C) 1996,97,99,2000,01,02 Free Software Foundation, Inc.
+   Copyright (C) 1996,97,99,2000-2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -40,6 +40,7 @@
 /* Define an initialized recursive lock variable NAME with storage
    class CLASS.  */
 #define __libc_lock_define_initialized_recursive(CLASS,NAME)
+#define __rtld_lock_define_initialized_recursive(CLASS,NAME)
 
 /* Initialize the named lock variable, leaving it in a consistent, unlocked
    state.  */
diff --git a/sysdeps/unix/sysv/linux/system.c b/sysdeps/unix/sysv/linux/system.c
index ffb308b045..3fdff04c22 100644
--- a/sysdeps/unix/sysv/linux/system.c
+++ b/sysdeps/unix/sysv/linux/system.c
@@ -37,19 +37,22 @@
   INLINE_SYSCALL (clone, 3, CLONE_PARENT_SETTID | SIGCHLD, 0, &pid)
 #endif
 
+#ifdef _LIBC_REENTRANT
 static void cancel_handler (void *arg);
 
-#define CLEANUP_HANDLER \
+# define CLEANUP_HANDLER \
   __libc_cleanup_region_start (1, cancel_handler, &pid)
 
-#define CLEANUP_RESET \
+# define CLEANUP_RESET \
   __libc_cleanup_region_end (0)
+#endif
 
 
 /* Linux has waitpid(), so override the generic unix version.  */
 #include <sysdeps/posix/system.c>
 
 
+#ifdef _LIBC_REENTRANT
 /* The cancellation handler.  */
 static void
 cancel_handler (void *arg)
@@ -71,3 +74,4 @@ cancel_handler (void *arg)
 
   DO_UNLOCK ();
 }
+#endif