mirror of git://sourceware.org/git/glibc.git
Clean up _res declaration to use __thread unconditionally.
This commit is contained in:
parent
bd81123a8b
commit
fb431262c1
|
@ -1,5 +1,12 @@
|
||||||
2013-08-27 Roland McGrath <roland@hack.frob.com>
|
2013-08-27 Roland McGrath <roland@hack.frob.com>
|
||||||
|
|
||||||
|
* include/resolv.h [_RESOLV_H_]:
|
||||||
|
Don't include <tls.h>.
|
||||||
|
(__resp, _res): Move declaration and macro out of [_LIBC_REENTRANT].
|
||||||
|
* resolv/res_libc.c: Don't include <tls.h>.
|
||||||
|
(_res): Use __attribute__ ((nocommon)) in place of
|
||||||
|
__attribute__ ((section (".bss"))).
|
||||||
|
|
||||||
* Makefile ($(common-objpfx)linkobj/libc_pic.a):
|
* Makefile ($(common-objpfx)linkobj/libc_pic.a):
|
||||||
If [sunrpc not in $(subdirs)], define to use libc_pic.a directly.
|
If [sunrpc not in $(subdirs)], define to use libc_pic.a directly.
|
||||||
|
|
||||||
|
|
|
@ -13,20 +13,12 @@
|
||||||
|
|
||||||
#ifdef _RESOLV_H_
|
#ifdef _RESOLV_H_
|
||||||
|
|
||||||
# ifdef _LIBC_REENTRANT
|
# ifndef NOT_IN_libc
|
||||||
# include <tls.h>
|
# define __resp __libc_resp
|
||||||
# undef _res
|
|
||||||
# ifndef NOT_IN_libc
|
|
||||||
# define __resp __libc_resp
|
|
||||||
# endif
|
|
||||||
# define _res (*__resp)
|
|
||||||
extern __thread struct __res_state *__resp attribute_tls_model_ie;
|
|
||||||
# else
|
|
||||||
# ifndef __BIND_NOSTATIC
|
|
||||||
# undef _res
|
|
||||||
extern struct __res_state _res;
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
|
extern __thread struct __res_state *__resp attribute_tls_model_ie;
|
||||||
|
# undef _res
|
||||||
|
# define _res (*__resp)
|
||||||
|
|
||||||
/* Now define the internal interfaces. */
|
/* Now define the internal interfaces. */
|
||||||
extern int __res_vinit (res_state, int);
|
extern int __res_vinit (res_state, int);
|
||||||
|
|
|
@ -122,9 +122,7 @@ libc_hidden_def (__res_maybe_init)
|
||||||
This differs from plain `struct __res_state _res;' in that it doesn't
|
This differs from plain `struct __res_state _res;' in that it doesn't
|
||||||
create a common definition, but a plain symbol that resides in .bss,
|
create a common definition, but a plain symbol that resides in .bss,
|
||||||
which can have an alias. */
|
which can have an alias. */
|
||||||
struct __res_state _res __attribute__((section (".bss")));
|
struct __res_state _res __attribute__ ((nocommon));
|
||||||
|
|
||||||
#include <tls.h>
|
|
||||||
|
|
||||||
#undef __resp
|
#undef __resp
|
||||||
__thread struct __res_state *__resp = &_res;
|
__thread struct __res_state *__resp = &_res;
|
||||||
|
|
Loading…
Reference in New Issue