* posix/Makefile ($(inst_libexecdir)/getconf): Make hard links to
$(inst_bindir)/getconf if possible.
* posix/Makefile ($(objpfx)getconf.speclist): New target.
(generated): Add it.
($(inst_libexecdir)/getconf): Use it.
(tests): Add tst-cpucount.
* posix/sched_cpucount.c: New file.
* posix/tst-cpucount.c: New file.
* posix/Versions: Export __sched_cpucount with version GLIBC_2.6.
(fnmatch): Pass NULL as last argument to internal_fn{,w}match.
* posix/fnmatch_loop.c (struct STRUCT): New type.
(FCT): Add ends argument. If ends != NULL and normal * is
seen in the pattern, store current pattern and string pointers
and return. Adjust recursive calls.
(EXT): Adjust FCT callers.
(STRUCT): Undef at the end of the file.
* posix/Makefile (tests): Add tst-fnmatch2.
* posix/tst-fnmatch2.c: New test.
2007-02-05 Jakub Jelinek <jakub@redhat.com>
[BZ #3957]
* posix/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
bit for RE_HAT_LISTS_NOT_NEWLINE.
(build_charclass_op): Remove bogus comment.
* posix/Makefile (tests): Add bug-regex27 and bug-regex28.
* posix/bug-regex27.c: New test.
* posix/bug-regex28.c: New test.
2006-06-23 Joseph Myers <joseph@codesourcery.com>
[BZ #2980]
* posix/Makefile (CFLAGS-waitid.c): Add
-fasynchronous-unwind-tables.
2006-08-02 Ulrich Drepper <drepper@redhat.com>
* elf/dl-addr.c (_dl_addr): If GNU-style hash tables are present,
walk them instead of the symbol table.
been converted at all, set *last_wc to WEOF. If mbrtowc failed, set wc
to the byte which couldn't be converted.
(re_string_reconstruct): Don't clear valid_raw_len before calling
re_string_skip_chars. If wc is WEOF after re_string_skip_chars, set
tip_context using re_string_context_at.
* posix/Makefile: Add rules to build and run bug-regex25 test.
* posix/bug-regex25.c: New test.
* sysdeps/unix/get_child_max.c: New file.
* posix/get_child_max.c: New file.
* posix/Makefile (routines): Add it.
* include/sys/sysinfo.h (__get_child_max): Declare it.
* sysdeps/posix/sysconf.c (__sysconf) [! CHILD_MAX]: Use it.
* 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.
tst-execlp2, tst-execv1, tst-execv2, tst-execl1, tst-execl2,
tst-execve1, tst-execve2, tst-execle1, and tst-execle2.
* posix/tst-execl1.c: New file.
* posix/tst-execl2.c: New file.
* posix/tst-execle1.c: New file.
* posix/tst-execle2.c: New file.
* posix/tst-execlp1.c: New file.
* posix/tst-execlp2.c: New file.
* posix/tst-execv1.c: New file.
* posix/tst-execv2.c: New file.
* posix/tst-execve1.c: New file.
* posix/tst-execve2.c: New file.
* posix/tst-execvp1.c: New file.
* posix/tst-execvp2.c: New file.
map if requested.
* debug/chk_fail.c: Request backtrace and memory map dump.
* Versions.def: Add GLIBC_2.4 for libc.
* debug/fgets_chk.c: New file.
* debug/fgets_u_chk.c: New file.
* debug/getcwd_chk.c: New file.
* debug/getwd_chk.c: New file.
* debug/readlink_chk.c: New file.
* debug/read_chk.c: New file.
* debug/pread_chk.c: New file.
* debug/pread64_chk.c: New file.
* debug/recv_chk.c: New file.
* debug/recvfrom_chk.c: New file.
* debug/Versions: Add all new functions with version GLIBC_2.4.
* debug/Makefile (routines): Add fgets_chk, fgets_u_chk, read_chk,
pread_chk, pread64_chk, recv_chk, recvfrom_chk, readlink_chk,
getwd_chk, and getcwd_chk. Plus appropriate CFLAGS definitions.
* debug/tst-chk1.c: Add more tests.
* libio/bits/stdio2.h: Add macros for fgets and fgets_unlocked.
* include/stdio.h: Declare __fgets_chk and __fgets_unlocked_chk.
* posix/unistd.h: Include <bits/unistd.h> for fortification.
* posix/bits/unistd.h: New file.
* posix/Makefile (headers): Add bits/unistd.h.
* socket/sys/socket.h: Include <bits/socket2.h> for fortification.
* socket/bits/socket2.h: New file.
* socket/Makefile (headers): Add bits/socket2.h.
* string/bits/string3.h: Extend memset macro to check for zero 3rd
parameter and use __memset_zero_constant_len_parameter in that case.
* sysdeps/generic/memset_chk.c: Add
__memset_zero_constant_len_parameter alias and linker warning.
* debug/Versions: Add __memset_zero_constant_len_parameter to libc
with version GLIBC_2.4.
* sysdeps/generic/bits/types.h: Don't unnecessarily use __extension__
in __STD_TYPE definition.
2005-02-21 Jakub Jelinek <jakub@redhat.com>
* malloc/malloc.c (malloc_printerr): If MALLOC_CHECK_={5,7}, print
the error message rather than program name.
2005-02-21 Ulrich Drepper <drepper@redhat.com>
2005-01-22 Ulrich Drepper <drepper@redhat.com>
* posix/Makefile: Use CFLAGS-*.os instead of CFLAGS-*.c for frame
pointer option.
* stdlib/Makefile (CFLAGS-system.os): Use this instead of
CFLAGS-system.c for frame pointer option.
2005-01-20 Ulrich Drepper <drepper@redhat.com>
* posix/execl.c: Do not allocate potentially large buffers on the
stack.
* posix/execle.c: Likewise.
* posix/execlp.c: Likewise.
* posix/execlp.c: Likewise.
(script_execute): Removed.
(allocate_scripts_argv): New function. Called at most once to
allocate memory, not every time a script is run. Adjust caller.
* sysdeps/generic/wordexp.c (exec_comm): Add a few
TEMP_FAILURE_RETRY. Reorganize code to avoid multiple calls to
exec_comm_child.
(exec_comm_child): Can now be inlined.
* posix/Makefile: Add -fomit-frame-pointer for a few more files.
* stdlib/Makefile: Likewise.
* posix/Makefile (install-others): Add $(inst_libexecdir)/getconf.
(CFLAGS-sysconf.c): Add -D_GETCONF_DIR.
(CFLAGS-getconf.c): New.
($(inst_libexecdir)/getconf): New.
* posix/confstr.c (confstr): Use __sysconf to query specifications
that don't have _POSIX_V6_* macros defined. Use __*_{C,LD}FLAGS
macros defined in bits/environments.h.
* sysdeps/posix/sysconf.c: Include stdlib.h, string.h and
sys/stat.h.
(__sysconf_check_spec): New routine.
(__sysconf): Use it.
* posix/getconf.c (specs): Change into structure array.
(main): If -v is not given, try to get default from
$(libexecdir)/getconf/default. If specification is not
supported by this getconf, try to execute
$(libexecdir)/getconf/$(specification).
* sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.h: New file.
* sysdeps/unix/sysv/linux/s390/bits/environments.h: New file.
* sysdeps/unix/sysv/linux/powerpc/bits/environments.h: New file.
* sysdeps/unix/sysv/linux/sparc/bits/environments.h: New file.
* sysdeps/unix/sysv/linux/i386/bits/environments.h: New file.
* sysdeps/unix/sysv/linux/x86_64/bits/environments.h: New file.
* sysdeps/generic/bits/environments.h (__ILP32_OFFBIG_CFLAGS):
Define.
2004-11-26 Jakub Jelinek <jakub@redhat.com>
Update.
2004-11-18 Jakub Jelinek <jakub@redhat.com>
[BZ #544]
* posix/regex.h (RE_NO_SUB): New define.
* posix/regex_internal.h (OP_DELETED_SUBEXP): New.
(re_dfa_t): Add subexp_map.
* posix/regcomp.c (struct subexp_optimize): New type.
(optimize_subexps): New routine.
(re_compile_internal): Call it.
(re_compile_pattern): Set preg->no_sub to 1 if RE_NO_SUB.
(free_dfa_content): Free subexp_map.
(calc_inveclosure, calc_eclosure): Skip OP_DELETED_SUBEXP
nodes.
* posix/regexec.c (re_search_internal): If subexp_map
is not NULL, duplicate registers as needed.
* posix/Makefile: Add rules to build and run tst-regex2.
* posix/tst-regex2.c: New test.
* posix/rxspencer/tests: Fix last two tests (\0 -> \1).
Add some new tests for nested subexpressions.
2004-11-12 Ulrich Drepper <drepper@redhat.com>
* posix/Makefile (tests): Add bug-regex24.
* posix/bug-regex24.c: New file.
2004-11-12 Paolo Bonzini <bonzini@gnu.org>
* posix/regexec.c (check_dst_limits_calc_pos_1): Use the map to
cut recursive paths. Make exit condition more precise.
(match_ctx_add_entry): Initialize the map.
* posix/regex_internal.h (struct re_backref_cache_entry): Add a map of
reachable subexpression nodes from each backreference cache entry.
2004-10-27 Jakub Jelinek <jakub@redhat.com>
* sysdeps/generic/glob.c (globfree): Clear gl_pathv after freeing it.
* posix/Makefile: Add rules to build and run bug-glob2 test.
* posix/bug-glob2.c: New test.
Update.
2004-09-26 Ulrich Drepper <drepper@redhat.com>
* sysdeps/posix/getaddrinfo.c (getaddrinfo): Remove incorrect
requirement on socktype and protocol.
(gaih_inet): If numeric port number is given, return records for all
possible socket types.
* posix/tst-getaddrinfo2.c: New file.
* posix/Makefile (tests): Add tst-getaddrinfo2. [BZ #358]
* nscd/aicache.c: Prefer using gethostbyname3_r NSS callback to also
get ttl and canonical name. Use these two values.
* resolv/Versions: Export _nss_dns_gethostbyname3_r from libnss_dns.
* resolv/nss_dns/dns-host.c (getanswer_r): Take two new parameters.
If nonnull fill with TTL and pointer to canonical name respectively.
(_nss_dns_gethostbyaddr_r): Pass NULL in new parameters of getanswer_r.
(_nss_dns_gethostbyname2_r): Just wrapper around
_nss_dns_gethostbyname3_r.
(_nss_dns_gethostbyname3_r): Renamed from _nss_dns_gethostbyname2_r.
Take two new parameters which as passed to getanswer_r.
2004-02-23 Jakub Jelinek <jakub@redhat.com>
* sysdeps/posix/getaddrinfo.c (gaih_inet): If _res has not been
inited yet, try to init it before saving old _res.options.
* posix/Makefile (xtests): Add bug-ga2.
(generated): Add bug-ga2.mtrace and bug-ga2-mem.
(xtests): Depend on bug-ga2-mem.
($(objpfx)bug-ga2-mem, bug-ga2-ENV): New.
* posix/bug-ga2.c: New test.
2004-01-05 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c (regcomp): Fix comment typo.
(regfree): Free preg->translate, clear buffer, allocated, fastmap
and translate fields.
* posix/regcomp.c (build_charclass, buld_charclass_op): Change first
argument to unsigned RE_TRANSLATE_TYPE.
* posix/regex_internal.h (re_string_t): Change trans type to
unsigned RE_TRANSLATE_TYPE.
* posix/regex_internal.c (re_string_construct_common): Cast
trans to unsigned RE_TRANSLATE_TYPE.
(re_string_peek_byte_case, re_string_fetch_byte_case): Avoid fast
path if pstr->trans. Never translate the character through
pstr->trans.
* posix/Makefile (tests): Add bug-regex22.
(bug-regex22-ENV): Set.
* posix/bug-regex22.c: New test.
2003-11-20 Ulrich Drepper <drepper@redhat.com>
* posix/PTESTS: Fix first test in GA143.
2003-11-20 Jakub Jelinek <jakub@redhat.com>
* posix/regex_internal.h (re_dfastate_t): Remove trtable_search.
Add word_trtable.
* posix/regex_internal.c (create_newstate_common, free_state):
Don't free trtable_search.
* posix/regexec.c (check_matching): Remove fl_search argument.
(transit_state_sb): Likewise. #ifdef out as unused.
(build_trtable): Remove fl_search argument. Set state->word_trtable
and state->trtable. Build separate word and non-word tables if
multi-byte and they differ for some character.
(transit_state): Remove fl_search argument. Don't update
state->trtable here. Handle state->word_trtable.
#ifdef out unused call to transit_state_sb.
(re_search_internal): Update check_matching caller.
(group_nodes_into_DFAstates): Don't clear non-ascii chars in accepts
bitmask for multi-byte locales.
* posix/bug-regex19.c (tests): Enable some commented out tests, add
2 new tests.
* posix/tst-rxspencer.c (mb_tests): Don't test [[=b=]] for now as
multi-byte. Don't run identical multi-byte tests multiple times
unnecessarily.
(main): Check setlocale return value.
* posix/Makefile (tst-rxspencer-ARGS): Add --utf8 argument.
(tst-rxspencer-ENV): Remove MALLOC_TRACE, add LOCPATH.
($(objpfx)tst-rxspencer-mem): Run another tst-rxspencer test
here, without --utf8 argument but with MALLOC_TRACE.
2003-11-19 Jakub Jelinek <jakub@redhat.com>
* posix/regexec.c (extend_buffers): Don't allocate
twice as big state_log as needed. Don't modify pstr->valid_len
for mb_cur_max == 1 !icase !trans.
* posix/regcomp.c (free_bin_tree): Removed.
(create_tree): Add dfa argument. Don't call re_malloc for
each tree, instead allocate from str_tree_storage.
(re_dfa_add_tree_node): New function.
(free_dfa_content): Handle freeing if dfa->nodes == NULL
or dfa->state_table == NULL.
(re_compile_internal): Call free_dfa_content if init_dfa
fails. Call free_workarea_compile, re_string_destruct
and free_dfa_content for most of the other failure paths.
(init_dfa): Initialize str_tree_storage_idx.
Don't clear any fields on allocation failure.
(free_workarea_compile): Free str_tree_storage chunks
instead of free_bin_tree (dfa->str_tree).
(parse): Call re_dfa_add_tree_node instead of re_dfa_add_node
followed by create_tree. Add dfa argument to remaining
create_tree calls. Remove new_idx variable. Remove calls
to free_bin_tree.
(parse_reg_exp, parse_branch, parse_expression, parse_sub_exp,
parse_dup_op, parse_bracket_exp, build_charclass_op): Likewise.
(duplicate_tree): Remove calls to free_bin_tree, add dfa
argument to create_tree.
* posix/regex_internal.h (BIN_TREE_STORAGE_SIZE): Define.
(bin_tree_storage_t): New type.
(re_dfa_t): Add str_tree_storage and str_tree_storage_idx
fields.
* posix/Makefile (tests): Add bug-regex21.
(generated): Add bug-regex21-mem, bug-regex21.mtrace,
tst-rxspencer-mem and tst-rxspencer.mtrace.
(tests): Depend on $(objpfx)bug-regex21-mem
and $(objpfx)tst-rxspencer-mem.
(bug-regex21-ENV, tst-rxspencer-ENV): Set.
($(objpfx)bug-regex21-mem, $(objpfx)tst-rxspencer-mem): New.
* posix/tst-rxspencer.c (main): Add call to mtrace.
Free line at the end.
* posix/bug-regex21.c: New test.
* posix/regexec.c (get_subexp): After calling get_subexp_sub
* posix/Makefile: Add rules to build and run tst-rxspencer.
(distribute): Add rxspencer/tests and rxspencer/COPYRIGHT.
* posix/tst-rxspencer.c: New file.
* posix/rxspencer/tests: New file.
* posix/rxspencer/COPYRIGHT: New file.
Patch mostly by Jakub Jelinek.
* posix/regcomp.c (optimize_utf8): New function.
(re_compile_fastmap_iter): Use dfa->mb_cur_max > 1 instead
of !icase.
(re_compile_internal): Call optimize_utf8 if not case insensitive
and in UTF-8 locale.
* posix/regex_internal.h: Ifdef out some prototypes if
RE_NO_INTERNAL_PROTOTYPES is defined to shut up warnings.
* posix/Makefile (tests): Add bug-regex20.
(bug-regex20-ENV): Add LOCPATH.
* posix/bug-regex20.c: New test.
2003-11-12 Jakub Jelinek <jakub@redhat.com>