svn commit: branches/uClibc-nptl: include libc/inet libc/misc/elf libc/mis etc...

Carmelo AMOROSO carmelo.amoroso at st.com
Tue Feb 17 12:53:49 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

kraj at uclibc.org wrote:
> Author: kraj
> Date: 2008-12-23 10:16:51 +0000 (Tue, 23 Dec 2008)
> New Revision: 24517
> 
> Log:
> Get non nptl threads compiled on x86.
> 
> 
> Modified:
>    branches/uClibc-nptl/include/resolv.h
> 
> 
> Changeset:
> Modified: branches/uClibc-nptl/include/resolv.h
> ===================================================================
> --- branches/uClibc-nptl/include/resolv.h	2008-12-23 09:39:05 UTC (rev 24516)
> +++ branches/uClibc-nptl/include/resolv.h	2008-12-23 10:16:51 UTC (rev 24517)SNIP]

>  struct __res_state {
> -	int	retrans;	 	/* retransmition time interval */
>  

[SNIP]

>  /* Things involving an internal (static) resolver context. */
> +#if 0
>  __BEGIN_DECLS
>  extern struct __res_state *__res_state(void) __attribute__ ((__const__));
>  __END_DECLS
>  #define _res (*__res_state())
> +#else
> +extern struct __res_state _res;
> +#endif

Hi Khem,
in this commit, while merging res_state restructuring from trunk, we had
_res changed from macro to and extern to the global variable.
When we have threads (NPTL or linuxthreads does not make difference),
user application should access the _res through a function call, that in
case of NTPL, will return the address of the TLS variable, otherwise
the address of the global variable. IIUC it should behaves as errno and
errno_location.

In the NPTL we have the __res_state function defined in
libc/inet/_res_state.c, so I think that we should go back to previous
version. What do you think ?

The same should apply to the linuxthreads in my opinion, but probably we
 should add the __res_state function too. Any other linuxthreads and
more expert on resolv stuff may comments ?

Thanks,
Carmelo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkmas10ACgkQoRq/3BrK1s8T9QCg2RuTbDn33sqTfWUbqElwWqYV
IYgAoNT28o54Rpb7zwsM01AtmOamiuIi
=TpFo
-----END PGP SIGNATURE-----


More information about the uClibc mailing list