aboutsummaryrefslogtreecommitdiff
path: root/posix/tst-rfc3484.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-21Mark internal nss symbols with attribute_hidden [BZ #18822]H.J. Lu1-2/+0
Mark internal nss symbols with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. Tested on x86-64 with and without --disable-nscd. [BZ #18822] * grp/initgroups.c (__nss_group_database): Removed. (__nss_initgroups_database): Likewise. * nscd/gai.c (__nss_hosts_database): Likewise. * nss/XXX-lookup.c (DATABASE_NAME_SYMBOL): Likewise. * posix/tst-rfc3484-2.c (__nss_hosts_database): Likewise. * posix/tst-rfc3484-3.c (__nss_hosts_database): Likewise. * posix/tst-rfc3484.c (__nss_hosts_database): Likewise. * sysdeps/posix/getaddrinfo.c (__nss_hosts_database): Likewise. * nss/getXXent.c (INTERNAL (REENTRANT_GETNAME)): Add attribute_hidden. * nss/nsswitch.c (__nss_database_custom): Define only if USE_NSCD is defined. (__nss_configure_lookup): Use __nss_database_custom only if USE_NSCD is defined. * nss/nsswitch.h (__nss_database_custom): Declare only if USE_NSCD is defined. Add attribute_hidden. (__nss_setent): Add attribute_hidden. (__nss_endent): Likewise. (__nss_getent_r): Likewise. (__nss_getent): Likewise. (DEFINE_DATABASE): Declare __nss_##arg##_database.
2014-11-12Fix qsort_r namespace (bug 17571).Joseph Myers1-0/+1
qsort_r is defined in the same file as qsort, but is not an ISO C function, so should be a weak alias for __qsort_r. The uses in getaddrinfo should also call __qsort_r, since getaddrinfo is a POSIX function and qsort_r isn't. This patch implements this. Because nscd uses the getaddrinfo sources outside libc, as do the tst-rfc3484 tests, a #define of __qsort_r to qsort_r is added there alongside the similar defines for other libc-internal symbols used in getaddrinfo. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17571] * stdlib/msort.c (qsort_r): Rename to __qsort_r and define as weak alias of __qsort_r. (qsort): Call __qsort_r instead of qsort_r. * include/stdlib.h (qsort_r): Do not call libc_hidden_proto. (__qsort_r): Declare. Call libc_hidden_proto. * sysdeps/posix/getaddrinfo.c (getaddrinfo): Call __qsort_r instead of qsort_r. * nscd/gai.c (__qsort_r): Define to qsort_r. * posix/tst-rfc3484.c (__qsort_r): Likewise. * posix/tst-rfc3484-2.c (__qsort_r): Likewise. * posix/tst-rfc3484-3.c (__qsort_r): Likewise.
2013-05-16Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold1-0/+1
2012-09-28 [BZ #11438]Jeff Law1-1/+4
* sysdeps/posix/getaddrinfo.c (default_scopes): Map RFC 1918 * addresses to global scope. * posix/tst-rfc3484.c: Verify 10/8, 172.16/12 and 196.128/16 addresses are in the same scope as 192.0.2/24. * posix/gai.conf: Document new scope table defaults.
2012-08-23Fix tst-rfc3484* build failures from USE_NSCD move to config.h.Roland McGrath1-0/+1
2011-11-01Fix tst-rfc3484 build failuresUlrich Drepper1-0/+6
2009-07-23Avoid warnings in test cases.Ulrich Drepper1-0/+2
The posix/tst-rfc3484* test cases caused warnings in newer gccs because the unused but copied sin_zero part of sockaddr_in wasn't explicitly initialized.
2008-05-15* posix/regcomp.c (optimize_utf8): Add a note on why we testUlrich Drepper1-0/+11
opr.ctx_type. (calc_first): Initialize constraint field. (duplicate_node_closure): Use it instead of special casing ANCHORS. Use search_duplicated_node to avoid loops. Fix grammar. (duplicate_node): Merge constraint field for all node types. (calc_eclosure_iter): Look at constraint field for all node types. * posix/regex_internal.c (create_cd_newstate): Don't look at create_cd_newstate. * posix/tst-rfc3484.c: Add dummy definition of _res_hconf_init. * posix/tst-rfc3484-2.c: Likewise. * posix/tst-rfc3484-3.c: Likewise.
2008-01-10* sysdeps/posix/getaddrinfo.c (sort_results): Remove service_orderUlrich Drepper1-3/+5
field. Use sockaddr_in6 for source_addr. (get_scope): Change type of parameter to sockaddr_in6. Adjust. (match_prefix): Likewise. (get_label): Likewise. (get_precedence): Likewise. (rfc3484_sort): Change to use indirect access to results array. Adjust to use of sockaddr_in6. Replace service_order test with simple index comparison. (getaddrinfo): Define order array. Initialize it. Don't initialize service_order field. Adjust qsort_t calls. Access sorted result array indirectly through order array. * posix/tst-rfc3484.c: Adjust for change of rfc3484_sort. * posix/tst-rfc3484-2.c: Likewise. * posix/tst-rfc3484-3.c: Likewise.
2007-11-20* sysdeps/posix/getaddrinfo.c (defaults_scopes, scopes): New variables.Ulrich Drepper1-0/+1
(get_scope): For IPv4 scope, use scopes table. (fini): Free scopes table if necessary. (free_scopelist): New function. (scopecmp): New function. (gaiconf_init): Also handle scopev4 entries. * posix/tst-rfc3484.c (do_test): Initialize scopes. * posix/tst-rfc3484-2.c (do_test): Likewise. * posix/gai.conf: Document scopev4 defaults. * posix/Makefile (tests): Add tst-rfc3484-3. * posix/tst-rfc3484-3.c: New file.
2007-11-14* include/ifaddrs.h: Remove in6ai_temporary.Ulrich Drepper1-1/+9
(struct in6addrinfo): Add index element. Declare __check_native. * inet/Makefile (aux): Add check_native. * sysdeps/unix/sysv/linux/check_native.c: New file. * sysdeps/unix/sysv/linux/check_pf.c: No need to recognize IFA_F_TEMPORARY. Pass back ifa_index. * sysdeps/posix/getaddrinfo.c: Remove netlink compatibility code. (rfc3484_sort): Add new parameter. Implement rule 7 correctly: call __check_native if necessary. (getaddrinfo): Fill in index field. Use qsort_r instead of qsort to sort addresses. Pass information about the results. * posix/tst-rfc3484.c: Adjust for addition of index field and change of rfc3484_sort interface. * posix/tst-rfc3484-2.c: Likewise.
2007-11-13* posix/tst-rfc3484.c: Adjust for addition of prefixlen field.Ulrich Drepper1-0/+1
* posix/tst-rfc3484-2.c: Likewise.
2007-10-14* posix/tst-rfc3484-2.c (do_test): Likewise.Ulrich Drepper1-0/+1
2007-08-26* posix/tst-rfc3484.c (__idna_to_unicode_lzlz): Initialize *OUTPUT.Ulrich Drepper1-0/+1
* posix/tst-rfc3484-2.c (__idna_to_unicode_lzlz): Likewise.
2006-05-04* sysdeps/posix/getaddrinfo.c: Implement configuration fileUlrich Drepper1-0/+12
handling. /etc/gai.conf can contain replacements for the label and precedence table. Fix byte order of default label and precedence table. * posix/gai.conf: New file. * posix/tst-rfc3484.c: Adjust for changes to getaddrinfo.c. * posix/tst-rfc3484-2.c: Likewise.
2006-04-24* posix/tst-rfc3484.c (do_test): Also initialize source_addr_flagscvs/fedora-glibc-20060425T0903Ulrich Drepper1-0/+1
field. * posix/tst-rfc3484-2.c (do_test): Likewise.
2006-04-24* posix/tst-rfc3484.c: Include <ifaddrs.h> early.Ulrich Drepper1-0/+1
* posix/tst-rfc3484-2.c: Likewise.
2006-04-20* include/ifaddrs.h: Get uint32_t definition.Ulrich Drepper1-1/+3
* posix/tst-rfc3484.c: Update fake __check_pf implementation. * posix/tst-rfc3484-2.c: Likewise.
2005-09-26[BZ #644]Ulrich Drepper1-0/+98
* sysdeps/posix/getaddrinfo.c (fls): New function. (gaih_inet): Don't use ffs, use fls. Convert address to native byte order first. * posix/Makefile (tests): Add tst-rfc3484. * posix/tst-rfc3484.c: New file.
2004-12-22(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper1-114/+0
2007-07-122.5-18.1Jakub Jelinek1-0/+114