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.
_POSIX2_C_DEV, _POSIX2_SW_DEV, _POSIX2_LOCALEDEF): Define to
200809L instead of 200112L.
(_XOPEN_VERSION): For __USE_XOPEN2K8 define to 700.
* posix/tst-sysconf.c (STDVER): Define to 200809L instead of 200112L.
2009-03-10 Jakub Jelinek <jakub@redhat.com>
* wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy,
wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs,
wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l.
* sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from
200112L to 200809L.
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
* posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and
_SC_THREAD_ROBUST_PRIO_PROTECT entries.
* bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and
_SC_THREAD_ROBUST_PRIO_PROTECT.
* posix/unistd.h: fexecve is in POSIX 2008.
* time/time.h: strftime_l is in POSIX 2008.
* io/sys/stat.h: futimens is in POSIX 2008.
* string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008.
* string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal,
strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008.
* stdlib/stdlib.h: mkdtemp is in POSIX 2008.
by default a POSIX mode, also define __USE_POSIX_IMPLICITLY.
* posix/Versions: Export __posix_getopt.
* posix/getopt.c (_getopt_initialize): Take additional parameter.
Use it to alternatively initialize __posixly_correct.
(_getopt_internal_r): Take addition parameter. Pass on to
_getopt_initialize.
(_getopt_internal): Take addition parameter. Pass on to
_getopt_internal_r.
(getopt): Pass additional zero to _getopt_internal.
(__posix_getopt): New function.
* posix/getopt.h: Add redirection for getopt.
* posix/getopt1.c (getopt_long): Pass additional zero to
_getopt_internal.
(getopt_long_only): Likewise.
(_getopt_long_r): Pass additional zero to _getopt_internal_r.
(_getopt_long_only_r): Likewise.
* posix/getopt_int.h: Adjust declarations of _getopt_internal and
_getopt_internal_r.
* elf/ldd.bash.in: Likewise.
* elf/sprof.c: Likewise.
* locale/programs/locale.c: Likewise.
* malloc/memusage.sh: Likewise.
* nss/getent.c: Likewise.
2009-02-06 Joseph Myers <joseph@codesourcery.com>
* debug/pcprofiledump.c (print_version,
argp_program_version_hook): New function.
* elf/ldconfig.c (more_help): New function.
(argp): Use it.
* elf/sln.c (usage): New function.
(main): Support --help and --version.
* malloc/memusagestat.c (print_version): New function.
(argp_program_version_hook): New variable.
* nscd/nscd.c (more_help): New function.
(argp): Use it.
* posix/getconf.c (main): Send --version output to stdout.
Support --help.
* sunrpc/rpc_main.c (usage, options_usage): Take STREAM and STATUS
arguments. All callers changed.
(print_version): New function.
(parseargs): Support --help and --version.
* sunrpc/rpcinfo.c (usage): Take STREAM argument. All callers
changed.
(print_version): New function.
(main): Use getopt_long. Support --help and --version.
* sysdeps/unix/sysv/linux/lddlibc4.c (main): Support --help and
--version.
2009-02-06 Ulrich Drepper <drepper@redhat.com>
* posix/regexec.c (prune_impossible_nodes): Handle sifted_states[0]
being NULL also if there are no backreferences.
* posix/rxspencer/tests: Add testcases.
file descriptors with close-on-exec set.
(exec_comm_child): Fix the case where the write end of the pipe is
STDOUT_FILENO already. In case it is, clear close-on-exec.
2008-03-29 Eric Blake <ebb9@byu.net>
Rewrite string searches to O(n) rather than O(n^2).
* string/str-two-way.h: New file. For linear fixed-allocation
string searching.
* string/memmem.c: New implementation.
* string/strstr.c: New implementation.
* string/strcasestr.c: New implementation.
* sysdeps/posix/getaddrinfo.c (getaddrinfo): Call _res_hconf_init
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.
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.
(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.
with __warning__/__error__ attributes.
(__warnattr): Define.
* stdlib/bits/stdlib.h (__realpath_chk_warn, __ptsname_r_chk_warn,
__mbstowcs_chk_warn, __wcstombs_chk_warn): New aliases with
__warnattr.
(realpath, ptsname_r, mbstowcs, wcstombs): Call __*_chk_warn instead
of __*_chk if compile time detectable overflow is found.
* libio/bits/stdio2.h (__fgets_chk_warn, __fread_chk_warn,
__fgets_unlocked_chk_warn, __fread_unlocked_chk_warn): New aliases
with __warnattr.
(fgets, fread, fgets_unlocked, fread_unlocked): Call __*_chk_warn
instead of __*_chk if compile time detectable overflow is found.
(__gets_alias): Rename to...
(__gets_warn): ... this. Add __warnattr.
(gets): Call __gets_warn instead of __gets_alias.
* socket/bits/socket2.h (__recv_chk_warn, __recvfrom_chk_warn): New
aliases with __warnattr.
(recv, recvfrom): Call __*_chk_warn instead of __*_chk if compile
time detectable overflow is found.
* posix/bits/unistd.h (__read_chk_warn, __pread_chk_warn,
__pread64_chk_warn, __readlink_chk_warn, __readlinkat_chk_warn,
__getcwd_chk_warn, __confstr_chk_warn, __getgroups_chk_warn,
__ttyname_r_chk_warn, __getlogin_r_chk_warn, __gethostname_chk_warn,
__getdomainname_chk_warn): New aliases with __warnattr.
(read, pread, pread64, readlink, readlinkat, getcwd, confstr,
getgroups, ttyname_r, getlogin_r, gethostname, getdomainname): Call
__*_chk_warn instead of __*_chk if compile time detectable overflow
is found.
(__getgroups_chk): Rename argument to __listlen from listlen.
(__getwd_alias): Rename to...
(__getwd_warn): ... this. Add __warnattr.
(getwd): Call __getwd_warn instead of __getwd_alias.
* wcsmbs/bits/wchar2.h (__wmemcpy_chk_warn, __wmemmove_chk_warn,
__wmempcpy_chk_warn, __wmemset_chk_warn, __wcsncpy_chk_warn,
__wcpncpy_chk_warn, __fgetws_chk_warn, __fgetws_unlocked_chk_warn,
__mbsrtowcs_chk_warn, __wcsrtombs_chk_warn, __mbsnrtowcs_chk_warn,
__wcsnrtombs_chk_warn): New aliases with __warnattr.
(wmemcpy, wmemmove, wmempcpy, wmemset, mbsrtowcs, wcsrtombs,
mbsnrtowcs, wcsnrtombs): Call __*_chk_warn instead of __*_chk if
compile time detectable overflow is found.
(wcsncpy, wcpncpy): Likewise. For constant __n fix check whether
to use __*_chk or not.
(fgetws, fgetws_unlocked): Divide __bos by sizeof (wchar_t), both
in comparisons which function should be called and in __*_chk*
arguments. Call __*_chk_warn instead of __*_chk if compile time
detectable overflow is found.
(swprintf, vswprintf): Divide __bos by sizeof (wchar_t) in
__*_chk argument.
* debug/tst-chk1.c (do_test): Add a few more tests.