about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-05-15 07:15:04 +0000
committerAndreas Jaeger <aj@suse.de>2000-05-15 07:15:04 +0000
commitf14273c5a2409a2e0d0ceb0897a0bb8b855bdb7f (patch)
treee8d37f8be41f091a9d33a316c5529044144433bd
parent99356b9b902fc8d96a3cf7891cc9f8d1ff6a0163 (diff)
downloadglibc-f14273c5a2409a2e0d0ceb0897a0bb8b855bdb7f.tar.gz
glibc-f14273c5a2409a2e0d0ceb0897a0bb8b855bdb7f.tar.xz
glibc-f14273c5a2409a2e0d0ceb0897a0bb8b855bdb7f.zip
2000-05-13 Jakub Jelinek <jakub@redhat.com>
	* elf/soinit.c (__libc_global_ctors): Move
	__pthread_initialize_minimal call out of HAVE_DWARF2_* defines.
	* resolv/resolv.h (__res_state): Added __attribute__((const)).
	(_res): If __RES_PTHREAD_INTERNAL is defined, declare it as
	variable, don't define it to __res_state call.

2000-05-13  Jakub Jelinek  <jakub@redhat.com>

	* internals.h (__RES_PTHREAD_INTERNAL): Define.
2000-05-13  Jakub Jelinek  <jakub@redhat.com>

	* internals.h (__RES_PTHREAD_INTERNAL): Define.
-rw-r--r--elf/soinit.c5
-rw-r--r--linuxthreads/ChangeLog4
-rw-r--r--linuxthreads/internals.h1
-rw-r--r--resolv/resolv.h12
4 files changed, 16 insertions, 6 deletions
diff --git a/elf/soinit.c b/elf/soinit.c
index 7db054e4d4..3cb5584f6c 100644
--- a/elf/soinit.c
+++ b/elf/soinit.c
@@ -49,13 +49,14 @@ __libc_global_ctors (void)
 {
   /* Call constructor functions.  */
   run_hooks (__CTOR_LIST__);
-#ifdef HAVE_DWARF2_UNWIND_INFO
-# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
+
   /* Initialize the thread library at least a bit since the libgcc functions
      are using thread functions if these are available.  */
   if (__pthread_initialize_minimal)
     __pthread_initialize_minimal ();
 
+#ifdef HAVE_DWARF2_UNWIND_INFO
+# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
   {
     static struct object ob;
     __register_frame_info (__EH_FRAME_BEGIN__, &ob);
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 551fbce21b..f9fca506f1 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-13  Jakub Jelinek  <jakub@redhat.com>
+
+	* internals.h (__RES_PTHREAD_INTERNAL): Define.
+
 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
 
 	* mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h
index 4d273f8917..e41e5d3a72 100644
--- a/linuxthreads/internals.h
+++ b/linuxthreads/internals.h
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <bits/libc-tsd.h> /* for _LIBC_TSD_KEY_N */
 
+#define __RES_PTHREAD_INTERNAL
 #include <resolv.h> /* for per-thread resolver context */
 
 
diff --git a/resolv/resolv.h b/resolv/resolv.h
index 6c710ecafc..426ac7a2ed 100644
--- a/resolv/resolv.h
+++ b/resolv/resolv.h
@@ -172,7 +172,7 @@ struct res_sym {
 #define	RES_DFLRETRY		2	/* Default #/tries. */
 
 struct __res_state {
-	int	retrans;	 	/* retransmission time interval */
+	int	retrans;		/* retransmission time interval */
 	int	retry;			/* number of times to retransmit */
 	u_long	options;		/* option flags - see below. */
 	int	nscount;		/* number of name servers */
@@ -254,8 +254,12 @@ typedef struct __res_state *res_state;
 
 /* Things involving an internal (static) resolver context. */
 #if defined _REENTRANT || defined _LIBC_REENTRANT
-extern struct __res_state *__res_state(void);
-#define _res (*__res_state())
+extern struct __res_state *__res_state(void) __attribute__ ((__const__));
+# if defined __RES_PTHREAD_INTERNAL
+extern struct __res_state _res;
+# else
+#  define _res (*__res_state())
+# endif
 #else
 extern struct __res_state _res;
 #endif
@@ -288,7 +292,7 @@ __END_DECLS
 #if !defined(SHARED_LIBBIND) || defined(_LIBC)
 /*
  * If libbind is a shared object (well, DLL anyway)
- * these externs break the linker when resolv.h is 
+ * these externs break the linker when resolv.h is
  * included by a lib client (like named)
  * Make them go away if a client is including this
  *