svn commit: trunk/uClibc/libc/inet

Denys Vlasenko vda.linux at googlemail.com
Fri Jun 6 13:25:30 UTC 2008


On Friday 06 June 2008 15:02, Bernhard Fischer wrote:
> On Fri, Jun 06, 2008 at 12:49:33PM +0200, Carmelo AMOROSO wrote:
> >Bernd Schmidt wrote:
> >> vda at uclibc.org wrote:
> >>   
> >>> Author: vda
> >>> Date: 2008-06-06 00:25:12 -0700 (Fri, 06 Jun 2008)
> >>> New Revision: 22244
> >>>
> >>> Log:
> >>> Use more natural way to return a value in __read_etc_hosts_r:
> >>>     
> 
> hah. vda bashing! ;) No, serious:
> 
> In file included from libc/inet/read_etc_hosts_r.c:8:
> libc/inet/resolv.c:1549: warning: 'visibility' attribute ignored on non-class types
> 
> I think i did not see this before you recently touching that resolv
> mess.

Indeed. I removed attribute_hidden now:

diff -d -urpN uClibc.0/libc/inet/resolv.c uClibc.1/libc/inet/resolv.c
--- uClibc.0/libc/inet/resolv.c 2008-06-06 09:20:13.000000000 +0200
+++ uClibc.1/libc/inet/resolv.c 2008-06-06 15:09:58.000000000 +0200
@@ -1545,7 +1545,7 @@ libc_hidden_def(gethostbyaddr)

 #ifdef L_read_etc_hosts_r

-FILE * attribute_hidden __open_etc_hosts(void)
+FILE * __open_etc_hosts(void)
 {
        FILE * fp;
        if ((fp = fopen("/etc/hosts", "r")) == NULL) {

We already have attribute_hidden in this function's declaration, so
this removal changed nothing. I verified that .so files are byte identical
before and after.

> PS:
> You know that i usually do not blindly rewrite stuff, but the resolver
> code is really an ugly and bloated mess (and doesn't even work for
> IPv6-only), but this time i think it would be saner to write this thing
> from scratch and not try to beat it into shape.

Makes sense.

> See ifenslave for an example if somebody beats something into shape.
> While the task itself is not really rocket-science and should fit in
> let's say 1.4kB _at_most_, the current crap uses 2.6kB, is ugly as hell
> and all around bad. Let's not do such stuff, please. There is no point
> in it and in the end, no benefit either to have something like that.

You mean ifenslave applet in busybox?
--
vda



More information about the uClibc mailing list