Age | Commit message (Collapse) | Author |
|
For now, a straight revert; we can decide later wheter we want to do something
more.
|
|
definition. I seems to produce spurious warning:
libc/inet/resolv.c:1549: warning: 'visibility' attribute ignored on non-class types
(seems like gcc bug)
and it is not really needed - attribute_hidden was already
specified in function _declaration_ so it is not necessary here.
No code changes (verified with objdump).
|
|
text data bss dec hex filename
- 230 0 9 239 ef libc/inet/gethostent.o
+ 224 0 9 233 e9 libc/inet/gethostent.o
- 782 0 0 782 30e libc/inet/read_etc_hosts_r.o
+ 767 0 0 767 2ff libc/inet/read_etc_hosts_r.o
Run tested.
|
|
we were closing a FILE, but did not record that fact by setting
a variable to NULL, and then we used it for reading!
While at it, small reduction in bss.
Run tested.
text data bss dec hex filename
- 210 0 12 222 de libc/inet/gethostent.o
+ 230 0 9 239 ef libc/inet/gethostent.o
|
|
The obsolete functions bcopy, index, etc. are not supposed to be used within
uClibc itself. Hence, there is no libc_hidden_def for them, but the previous
patch did not just move libc_hidden_protos, it also added new ones for the
legacy functions. As a result, programs which use these functions can no
longer link with uClibc.
This fixes it by removing the unnecessary libc_hidden_protos. I've also
removed all inclusions of <strings.h> from uClibc source files: since we
define _GNU_SOURCE, it is sufficient to include <string.h>. We then do not
need to duplicate the libc_hidden_proto block in <strings.h>.
|
|
1. names with two consecutive dots are not valid
2. if name ends with a dot, dont try appending search domain(s)
alos a few small optimisations are here.
|
|
like
o UCLIBC_HAS_GNU_ERROR
o UCLIBC_HAS_BSD_ERR
o UCLIBC_HAS_PTY
o UCLIBC_HAS_GETPT (1)
o UCLIBC_SYSCALL_STUBS
o UCLIBC_SYSCALL_STUB_WARNING
o UCLIBC_LINUX_SPECIFIC (2)
o UCLIBC_BSD_SPECIFIC (3)
o UCLIBC_NTP_LEGACY (4)
o UCLIBC_SV4_DEPRECATED (5)
o UCLIBC_HAVE_REALTIME (6)
o UCLIBC_HAVE_ADVANCED_REALTIME (7)
o UCLIBC_HAVE_EPOLL (8)
o UCLIBC_HAVE_XATTR (9)
o UCLIBC_HAVE_PROFILING (10)
(1) make non-standard getpt optional and implement standard posix_openpt
(2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(),
personality()
ppoll(), setresuid()
(3) mincore(), getdomainname(), setdomainname()
(4) ntp_adjtime(), ntp_gettime() aliases
(5) ustat() [use statfs(2) in your code instead]
(6) All marked as "(REALTIME)" in SUSv3
(7) All marked as "(ADVANCED REALTIME)" in SUSv3
(8) epoll_create(), epoll_ctl(), epoll_wait()
(9) all Extended Attributes
(10) helpers for gcc's -finstrument-functions
- Fixes _dl_exit()
- Implements sleep(3) for !UCLIBC_HAVE_REALTIME
- Implements usleep(3) for !UCLIBC_HAVE_REALTIME
- adds #warning about incorrect posix_fadvise{,64}()
- removes unused and unwanted uselib()
Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead
of formerly 130k.
|
|
IPv6 DNS resolv. rfc4159 mandated this 3 years ago. Closes bug 1020.
Also cleans up some stype inconsistensied and saves 2 bytes of rw data.
|
|
by adding <unistd.h> header file.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
|
|
in string.h and strings.h. This caught unguarded string ops in
libc/inet/ethers.c __ether_line_w() function.
I will wait for fallout reports for a week or so,
then continue converting more libc_hidden_proto's.
|
|
(patch by Bernd Schmidt <bernds_cb1 at t-online.de>)
|
|
__dns_lookup(). This avoids segmentation faults when more than 1024
file descriptors are used by an application.
|
|
MontaVista noticed that when their kernels were configured to trap on unaligned
access gethostbyname_r could mysteriously crash. I tracked this down to an
unaligned buffer being passed to gethostbyname_r from some other part of uClibc
(afraid I don't remember where from any more). We have to pad the beginning of
the buffer to a pointer alignment before we store pointers in it.
|
|
IPv6 entries in /etc/hosts. Previous only the first of these host would work,
as uClibc would read the /etc/hosts file from top to bottom, failing if the
first hit did not match the IP type.
Now uClibc will continue reading, even if the first correct entry name, but wrong IP
type fails. Thus, allowing a second correct entry name with correct IP type
will result in a name resolve.
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I have successfully made gethostbyname_r(), res_init(), and gethostid() fully
reentrant. In addition, I have added a NULL check to inet_aton(). This is
where SEG FAULTs were coming from when gethostbyname_r() was called.
|
|
|
|
|
|
Hi Erik,
Thanks for all your great work. I found a set of bugs in
resolv.c . Basically, there is code that looks like:
BIGLOCK;
__nameserversXX=__nameservers;
__nameserverXX=__nameserver;
BIGUNLOCK;
i = __dns_lookup(dname, type, __nameserversXX, __nameserverXX, &packet, &a);
which is a problem because the declarations are
int __nameservers;
char * __nameserver[MAX_SERVERS];
int __searchdomains;
char * __searchdomain[MAX_SEARCH];
so you can see that __nameserver is a pointer. Copying the
pointer to __nameserverXX doesn't protect the global variable
space. I have attached a patch and the new file. I hope you
will incorporate these bug fixes. I spent quite a bit of time
tracking them down.
Many thanks,
Ron
|
|
gethostbyname2_r tries to resolve an ipv6 address from /etc/hosts using
get_hosts_byname_r, but with AF_INET instead of the supplied address family.
This returns ipv4 addresses marked as ipv6 ones. Fix from nbd.
|
|
|
|
things, and avoid potential deadlocks caused when a thread holding a uClibc
internal lock get canceled and terminates without releasing the lock. This
change also provides a single place, bits/uClibc_mutex.h, for thread libraries
to modify to change all instances of internal locking.
|
|
otherwise we get messed up alias memory and this simple test case will
segfault:
python -c 'import socket; print socket.gethostbyaddr("80.68.88.204")[2];'
see bug report in blackfin tracker for more info:
http://blackfin.uclinux.org/tracker/index.php?func=detail&aid=1503&group_id=17&atid=141
|
|
defined, gettimeofday has other prototype and tm_gmtoff/tm_zone do not exist
|
|
|
|
most of global data relocations are back
|
|
|
|
|
|
gone from libc. The remaining are left as exercise for others ;-)
|
|
|
|
|
|
missing headers, other jump relocs removed
|
|
|
|
was indeed a badly chosen name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x_internal, do not use cascading aliases
|
|
|
|
|