summaryrefslogtreecommitdiff
path: root/libc/inet
AgeCommit message (Collapse)Author
2004-03-18Based on a patch from Alexandre Oliva, remove all reference to 'bzero' (whichEric Andersen
is not a SuSv3 symbol). Rather than using __bzero internally per Alexandre's original patch, use memset instead.
2004-03-18Reduce memory used by static buffers and allocate that memory dynamiclyEric Andersen
instead. Based on an initial patch from Tobias Anderberg, but reworked. I asked Tobias to look into doing something more like what is done in busybox, but that proved to be a pain. One possible concern is that these buffers will probably show up as memory leaks i.e. with valgrind. Perhaps we should add in an atexit call to free this memory right after we allocate it?
2004-03-10Bug fix: gethostbyname2_r would fail if /etc/host was missing.Manuel Novoa III
Bug fix: gethostbyname_r checked errno without first setting it to a known value.
2004-02-18Alexandre Oliva writes:Eric Andersen
While testing the FR-V code with GCC mainline, I ran into some problems in the RPC code. It relies on a GCC extension that is no longer available, namely, the result of a cast is no longer considered an lvalue. This patch enables the code to compile. I haven't been able to test RPC though, especially in a multi-threaded environment.
2004-02-11New stdio core. Should be more maintainable. Fixes a couple of bugs.Manuel Novoa III
Codepaths streamlined. Improved performance for nonthreaded apps when linked with a thread-enabled libc. Minor iconv bug and some locale/thread related startup issues fixed. These showed up in getting a gcj-compiled java helloworld app running. Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.
2004-01-24Imre Sunyi writes:Eric Andersen
Hi Erik I have corrected a bug in uClibc/libc/inet/resolv.c in function __dns_lookup(). Have attaced a txt file with my diffs regarding to uClibc 0.9.26. If two nameservers are included in /etc/resolv.conf and the first one is wrong and the secondary is correct the algorithm never looked up the secondary one. Please review my diff and feel free to submit the patch onto your CVS. If reading manual page resolv.conf(5) under nameserver and how the algorithm should work the previous dns_lookup did not fully followed that. Regards Imre Sunyi
2004-01-16s/UCLIBC_HAS_MMU/ARCH_HAS_MMU/gEric Andersen
2004-01-04Implement res_search and res_querydomain based on netbsd code,Eric Andersen
but remove support for host aliases (the HOSTALIASES env variable) which looks like a very bad idea. -Erik
2003-12-28Fix a really dumb bug introduced in version 1.4 of this file (a patch for ipv6Eric Andersen
support) which could cause things like EOF and read errors while reading /etc/services to always return a TRY_AGAIN. The perl test suite would alloc a larger buffer and try again until all memory was exhausted. When we get a read error, or EOF, it means we didn't get what we wanted, and so we should return an error. Doing so fixes the failing perl 5.8.2 test. -Erik
2003-12-28Fix whitespaceEric Andersen
2003-12-27Fix a long-standing bug with pthreads. A couple of linuxthreads filesManuel Novoa III
were including libc-lock.h which had a bunch of weak pragmas. Also, uClibc supplied a number of no-op weak thread functions even though many weren't needed. This combined result was that sometimes the functional versions of thread functions in pthread would not override the weaks in libc. While fixing this, I also prepended double-underscore to all necessary weak thread funcs in uClibc, and removed all unused weaks. I did a test build, but haven't tested this since these changes are a backport from my working tree. I did test the changes there and no longer need to explicitly add -lpthread in the perl build for perl to pass its thread self tests.
2003-12-02Add function versions of ntohl and friendsEric Andersen
2003-12-02Avoid a potentially undefined operation with a veriable++ in a macroEric Andersen
2003-10-19We were failing to properly set h_errno on success, which couldEric Andersen
cause gethostbyaddr_r to keep looping allocating more and more memory each time till alloca finally caused a segfault. Ugh. This fixes that as well... -Erik
2003-10-18Peter Kjellerstedt writes:Eric Andersen
rm.patch: * Define $(RM) as rm -f in Rules.mak and test/Rules.mak (this is the same definition as gmake uses by default). * Change all occurrences of rm and rm -f into $(RM).
2003-10-15Patch from Tony J. White:Eric Andersen
I've created a patch for adding dn_expand() to uClibc 0.9.21. dn_expand() is used by at least ipsec-tools and also openldap I think.
2003-10-08Atsushi Nemoto writes:Eric Andersen
I found inappropriate data types are used in some places in networking codes. * tcp_seq is 32bit (u_long -> u_int32_t) * in_addt_t should be used for internet address (unsigned long -> in_addr_t) * socklen_t should be used for accept() This is a patch against uclibc-0.9.21 (can be applied for current CVS). 64bit platforms (sizeof(int)!=sizeof(long)) will need this. I believe this patch does not harm any 32bit platforms.
2003-09-0115 retries is really rather excessive...Eric Andersen
2003-08-04Update inet_aton() to support an undocumented feature of inet_aton,Eric Andersen
per UNIX Network Programming, Volume 1, second edition: An undocumented feature of inet_aton is that if addrptr is a null pointer, the function still performs it validation of the input string, but does not store the result.
2003-08-01Add a new *scanf implementation, includeing the *wscanf functions.Manuel Novoa III
Should be standards compliant and with several optional features, including support for hexadecimal float notation, locale awareness, glibc-like locale-specific digit grouping with the `'' flag, and positional arg support. I tested it pretty well (finding several bugs in glibc's scanf in the process), but it is brand new so be aware. The *wprintf functions now support floating point output. Also, a couple of bugs were squashed. Finally, %a/%A conversions are now implemented. Implement the glibc xlocale interface for thread-specific locale support. Also add the various *_l(args, locale_t loc_arg) funcs. NOTE!!! setlocale() is NOT threadsafe! NOTE!!! The strto{floating point} conversion functions are now locale aware. The also now support hexadecimal floating point notation. Add the wcsto{floating point} conversion functions. Fix a bug in mktime() related to dst. Note that unlike glibc's mktime, uClibc's version always normalizes the struct tm before attempting to determine the correct dst setting if tm_isdst == -1 on entry. Add a stub version of the libintl functions. (untested) Fixed a known memory leak in setlocale() related to the collation data. Add lots of new config options (which Erik agreed to sort out :-), including finally exposing some of the stripped down stdio configs. Be careful with those though, as they haven't been tested in a long time. (temporary) GOTCHAs... The ctype functions are currently incorrect for 8-bit locales. They will be fixed shortly. The ctype functions are now table-based, resulting in larger staticly linked binaries. I'll be adding an option to use the old approach in the stub locale configuration.
2003-06-27Per a patch from Rob McMullen, add getprotoent_r, getprotobyname_r,Eric Andersen
and getprotobynumber_r
2003-06-17Patch from Ronald Wahl fixing an IPV6 specific problemEric Andersen
with getaddrinfo().
2003-03-01Patch from Jeffrey Damick:Eric Andersen
With glibc if you do a res_init() that forces a reread of the nameservers file, but in uClibc the res_init will not force a reread if it has already read the file because then the nameservers value is greater than 0. So res_init must call close_nameservers() before calling open_nameservers().
2003-02-12Eliminate a needless externEric Andersen
2003-01-30Per discussion with Nick Fedchik, restore original LGPLEric Andersen
licensing to libc/inet/ether_addr.c
2003-01-10Patch from Jay Kulpinski:Eric Andersen
__decode_dotted() does not count the null terminating byte of a hostname in the DNS response. This causes lookups to fail if the DNS response doesn't compress domain names in the message.
2003-01-10Fix warningsEric Andersen
2003-01-10Patch from Nick Fedchik to support ether_atonEric Andersen
2002-12-04Implement the rest of the missing include/net/if.h interfacesEric Andersen
-Erik
2002-11-21Oops.Eric Andersen
2002-11-21Cleanup use of in6addr_loopback and in6addr_anyEric Andersen
2002-11-03Patch from "Cho, Seong-Myun" <smcho@xecurenexus.com> to limitEric Andersen
things to the lower 16 bits of 'id'.
2002-10-31Ok, this commit is _huge_ and its gonna change the world. I'veEric Andersen
been working on a new config system on and off for about 6 months now, but I've never been fully satisfied. Well, I'm finally am happy with the new config system, so here it is. This completely removes the old uClibc configuration system, and replaces it with an entirely new system based on LinuxKernelConf, from http://www.xs4all.nl/~zippel/lc/ As it turns out, Linus has just merged LinuxKernelConf into Linux 2.5.45, so it looks like I made the right choice. I have thus far updated only x86. I'll be updating the other architectures shortly. -Erik
2002-09-17Fix a memory corruption bug.David McCullough
With gcc, sizeof on a sized array argument to a function returns 4, not 16 as was expected in this code. This caused inet_ntoa to overwrite whatever came before the buffer in the BSS by up to 12 bytes.
2002-08-19Fixup struct _res handling so apps using struct _res can actuallyEric Andersen
compile ("worst standard ever!") -Erik
2002-08-17Fixed __read_etc_hosts_r to return alias list and modified bufferManuel Novoa III
allocation accordingly. This fixes the segfault in the Python 2.2.1 socket test.
2002-08-16Remove __res_state function.Miles Bader
2002-08-16Make INCLUDE_FULL_RPC default to !HAVE_SHARED.Miles Bader
2002-08-16Replace all instances of _LIBC_REENTRANT with __UCLIBC_HAS_THREADS__Eric Andersen
-Erik
2002-08-12I missed a spot.Eric Andersen
-Erik
2002-08-12Fix use of __pthread_once, and fix rpc usage of thread localEric Andersen
storage.... -Erik
2002-08-11Ugh. Make uClibc cross compile with gcc 2.95.x and threads. I wonderEric Andersen
if this is serious enough to warrent 0.9.14? -Erik
2002-08-09Changes so that this file builds if we are not using threads.David McCullough
2002-08-08Oops. missed a spot.Eric Andersen
-Erik
2002-08-08Fix a silly bug with using fstat64 instead of just fstat. NoEric Andersen
reason for 64bit stuff just to check perms. -Erik
2002-08-07Add getrpcent.c to default rpc buildEric Andersen
2002-08-07Apply integer overflow security fix for "CERT Advisory CA-2002-25 IntegerEric Andersen
Overflow In XDR Library" http://www.cert.org/advisories/CA-2002-25.html Patch from Solar Designer <solar@openwall.com>.
2002-08-06Fixup the last missing pieces of thread lockingEric Andersen
-Erik
2002-08-06Rework RPC code once again. By default, only enable theEric Andersen
stuff needed for NFS mounts, rsh, and similar. -Erik
2002-07-10Per bug report from Ronald Wahl <rwa@peppercon.com>:Eric Andersen
...inet_pton breaks since tolower is implemented as a macro and its argument is evaluated more than once: while ((ch = tolower (*src++)) != '\0') { So I fixed it by just undefining tolower() so we use the function version, not the macro. -Erik