summaryrefslogtreecommitdiff
path: root/libc/inet
AgeCommit message (Collapse)Author
2008-10-22- remove superfluous ';'. No objcode changes.Bernhard Reutner-Fischer
2008-10-20- need to grab features before looking at eventually requested netlink supportBernhard Reutner-Fischer
Thanks to Peter S. Mazinger for pointing out this (obvious) error. The __ASSUME_NETLINK from ricardw's r22531 references a non-existing variable in certain cases. I don't see how that could possibly work..
2008-10-19- do not include netlink headers if netlink is turned off (Michael Deutschmann)Bernhard Reutner-Fischer
Closes #5544
2008-10-17- des uses ntohlBernhard Reutner-Fischer
2008-10-06- hide relocation (Peter S. Mazinger)Bernhard Reutner-Fischer
2008-10-03- use c89-style commentsBernhard Reutner-Fischer
Closes issue #5194
2008-09-11- remove gethostbyname_r relocationBernhard Reutner-Fischer
2008-08-28Move ifaddrs.h from uClibc-internal location libc/inet/ to include/, and makeRicard Wanderlof
it conditionally included among the installed header files depending on UCLIBC_HAS_AI_ADDRCONFIG.
2008-08-27Removed redundant includes.Ricard Wanderlof
2008-07-23- trim any trailing whitespaceBernhard Reutner-Fischer
2008-07-01Simplified check_pf() so it returns a bit vector in an unsigned int,Ricard Wanderlof
instead of modifying the contents of two bools.
2008-06-28#include <ifaddrs.h> should be #include "ifaddrs.h"Denis Vlasenko
2008-06-27Removed include/ifaddrs.h and put contents in libc/inet/ifaddrs.h, as we do notRicard Wanderlof
need the file outside of uClibc anyway.
2008-06-27Fixed #if -> #if defined.Ricard Wanderlof
Take __UCLIBC_HAS_IPV4__ into account.
2008-06-27Added support for the AI_ADDRCONFIG flag in the hints->ai_flags parameter to ↵Ricard Wanderlof
getaddrinfo(3).
2008-06-12Revert revision 19347, plus libc_hidden_proto for __uc_malloc.Bernd Schmidt
Some of the code is functionally identical before and after, but for now I'm just mechanically reverting the entire mess.
2008-06-12Revert revision 19343 and also remove libc_hidden_proto for __uc_malloc.Bernd Schmidt
For now, a straight revert; we can decide later wheter we want to do something more.
2008-06-10Revert revison 19346, except parts needed by later patches (r19347 also addedBernd Schmidt
__uc_malloc calls in getnetent.c, so we must retain the include and libc_hidden_proto).
2008-06-06Remove superfluous attribute_hidden from functionDenis Vlasenko
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).
2008-06-06Use more natural way to return a value in __read_etc_hosts_r:Denis Vlasenko
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.
2008-06-06Fix failure in test/inet/gethost_r-align:Denis Vlasenko
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
2008-06-04This fixes a problem with the move of libc_hidden_proto to string.h.Bernd Schmidt
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>.
2008-06-03close bug 473:Denis Vlasenko
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.
2008-06-03- adds several config-options to allow for turning off certain featuresBernhard Reutner-Fischer
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.
2008-06-02libc/inet/resolv.c: use ip6.arpa instead of ip6.int for reverseDenis Vlasenko
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.
2008-06-02libc/inet/addr.c: fix broked indentation and bad style. No code changes.Denis Vlasenko
2008-06-01suppress a few "might be used uninitialized" warnings. No code growth.Denis Vlasenko
2008-06-01add missing includes of unistd.h for smallint usageDenis Vlasenko
remove a few duplicate includes of unistd.h
2008-05-31- generate deps via gccBernhard Reutner-Fischer
2008-05-30- Avoid warning about undefined preprocessor token. No obj-code changes.Bernhard Reutner-Fischer
2008-05-29- fix dependencies for multi-sourceBernhard Reutner-Fischer
2008-05-27Fix build failure due to missing 'smallint' definitionCarmelo Amoroso
by adding <unistd.h> header file. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-05-25Slight size reduction by use of smallints/consts:Denis Vlasenko
- 288016 1924 7176 297116 4889c libuClibc-0.9.29.so + 287956 1924 7168 297048 48858 libuClibc-0.9.29.so
2008-05-22convert two more static ints used as flags to smallintsDenis Vlasenko
2008-05-20replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe.Denis Vlasenko
2008-05-20Introduce and use small[u]int type. Changes in size:Denis Vlasenko
- 79 0 28 107 6b libc/inet/rpc/create_xid.o + 76 0 25 101 65 libc/inet/rpc/create_xid.o - 126 0 4 130 82 libc/misc/assert/__assert.o + 123 0 1 124 7c libc/misc/assert/__assert.o - 648 4 24 676 2a4 libc/misc/internals/__uClibc_main.o + 645 4 21 670 29e libc/misc/internals/__uClibc_main.o - 230 0 4 234 ea libc/stdlib/abort.o + 216 0 1 217 d9 libc/stdlib/abort.o - 129 0 4 133 85 libc/termios/tcgetsid.o + 126 0 1 127 7f libc/termios/tcgetsid.o
2008-05-20- remove old-style definitions. No object-code changes.Bernhard Reutner-Fischer
2008-05-19Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko
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.
2008-04-28Experimentally move libc_hidden_proto(time) to time.h.Denis Vlasenko
The only code change observed is actually a case where we were not doing that as needed: 00000000 <__GI_tzset>: -53 push %ebx -e8 00 00 00 00 call 6 <__GI_tzset+0x6> -5b pop %ebx -81 c3 03 00 00 00 add $0x3,%ebx - R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 6a 00 push $0x0 -e8 fc ff ff ff call 10 <__GI_tzset+0x10> - R_386_PLT32 time +e8 fc ff ff ff call 3 <__GI_tzset+0x3> + R_386_PC32 __GI_time 3d ff 4e 98 45 cmp $0x45984eff,%eax 0f 9e c0 setle %al 0f b6 c0 movzbl %al,%eax 50 push %eax -e8 fc ff ff ff call 21 <__GI_tzset+0x21> +e8 fc ff ff ff call 14 <__GI_tzset+0x14> R_386_PC32 _time_tzset 58 pop %eax 5a pop %edx -5b pop %ebx c3 ret No mass migration of libc_hidden_proto(foo) planned. Lets wait for potential fallout first.
2008-04-25reinstate external visibility of inet_ntoa_r,Denis Vlasenko
and add it to arpa/inet.h header.
2008-04-12Functions should be either exported in public .h filesDenis Vlasenko
and marked with libc_hidden_proto/def(), or not be exported in .h files and be hidden (or even static if possible). We have five functions which violate this. Fixing: netdb.h: export ruserpass() rpc/rpc.h: export xdr_accepted_reply() and xdr_rejected_reply() make inet_ntoa_r static function (it is not exported in any .h file) make _time_tzset hidden function (it is not exported in any .h file)
2008-02-28Fix file permissionsCarmelo Amoroso
2008-02-28Added support for ether_line, ether_ntohost and ether_hostton.Carmelo Amoroso
Added related test cases. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Hacked-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-02-23Ricard Wanderlof writes:Mike Frysinger
The following definitions in getaddrinfo.c seem redundant as they _are_ defined in the public netdb.h header, contrary to the comment. AI_DEFAULT is not, however it is not used in the file either so can be safely removed.
2008-02-12add hidden_proto's for __uc_mallocDenis Vlasenko
(patch by Bernd Schmidt <bernds_cb1 at t-online.de>)
2008-02-07Added AI_NUMERICSERV flag and check if the string is not just a numberCarmelo Amoroso
when AI_NUMERICSERV flag set. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
2008-01-11Use poll() rather than select() if the former is available to wait inPeter Kjellerstedt
__dns_lookup(). This avoids segmentation faults when more than 1024 file descriptors are used by an application.
2008-01-09Daniel Jacobowitz writes:Mike Frysinger
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.
2007-09-28This patch will fix a problem when the same host is defined with both IPv4 andMike Frysinger
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>
2007-09-28do not check the pointer before freeing it since free(NULL) works just fineMike Frysinger