Commit Graph

114 Commits

Author SHA1 Message Date
Ulrich Drepper a129c80d54 Fix memory leak for some invalid regular expressions. 2010-10-11 11:46:22 -04:00
Ulrich Drepper aa732e2b2b One forgotten checkin from regex changes. 2010-01-15 12:20:55 -08:00
Ulrich Drepper 2da42bc065 Fix a few more cases of ignored return values in regex. 2010-01-15 12:03:16 -08:00
Paul Eggert 21f5de55ec regcomp.c: do not ignore memory allocation failure 2010-01-14 21:35:15 -08:00
Paolo Bonzini 815d8147a3 Fix ranges with multibyte characters as endpoints.
This is another bug in computing the fastmap.  It was reported by a user
of sed because it usually does not happen with !_LIBC.  However, it is
there in that case too.

The bug is that whenever we have a range at the beginning of the regex,
the regex must be tested on any possible multibyte character.  The reason
why _LIBC masks it, is that in general there is a collation symbol for
each possible multibyte-character lead byte, so all the lead bytes are
in general already part of the fastmap.

The tests use cyrillic characters as an example.  With _LIBC, they pass
without the patch too, but you can make them fail by removing collation
symbols handling.
2009-11-17 16:23:24 -08:00
Ulrich Drepper 52db8039f5 Recognize ill-formed { } expressions in regcomp. 2009-08-23 15:22:00 -07:00
Ulrich Drepper bdb56bacd5 [BZ 9697]
* posix/bug-regex17.c: Add testcases.
	* posix/regcomp.c (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET
	handling.
2009-01-08 00:42:51 +00:00
Ulrich Drepper b3918c7d7f * posix/regcomp.c (re_compile_fastmap_iter): Use __mbrtowc.
* posix/regex_internal.c (build_wcs_buffer, build_wcs_upper_buffer,
	re_string_skip_chars, re_string_reconstruct): Likewise.
	* posix/regex_internal.h [!_LIBC] (__mbrtowc): New #define.
2009-01-08 00:23:09 +00:00
Ulrich Drepper 0caca71ac9 * string/Makefile (distribute): Add str-two-way.h.
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
2008-05-15 04:42:20 +00:00
Ulrich Drepper bc3e1c1273 * locale/nl_langinfo.c (nl_langinfo): Just call __nl_langinfo_l.
* locale/nl_langinfo_l.c: Real implementation, copied from
	nl_langinfo.c.
	* include/langinfo.h: Add libc_hidden_proto for __nl_langinfo_l.
2007-12-14 03:54:07 +00:00
Ulrich Drepper 77751669d7 * posix/regcomp.c (optimize_utf8): Fix a typo, s/idx/ctx_type/,
that would inhibit utf8-optimization of a regexp containing line-
	or buffer-anchors, e.g., `^', `$'.
2007-12-12 18:28:58 +00:00
Ulrich Drepper b7d1c5fa30 * posix/fnmatch_loop.c: Take rule index returned as part of
findidx return value into account when accessing weights.
	* posix/regcomp.c: Likewise.
	* posix/regexec.c: Likewise.
2007-10-12 17:47:19 +00:00
Ulrich Drepper a532a41df5 * posix/regcomp.c (lookup_collation_sequence_value): check that
nrules != 0 for multibyte chars.
2007-09-24 03:31:47 +00:00
Ulrich Drepper 784aacea3c [BZ #3957]
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.
2007-02-05 15:23:55 +00:00
Ulrich Drepper 11bf311edc [BZ #2510, BZ #2830, BZ #3137, BZ #3313, BZ #3426, BZ #3465, BZ #3480, BZ #3483, BZ #3493, BZ #3514, BZ #3515, BZ #3664, BZ #3673, BZ #3674]
2007-01-11  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/i386/soft-fp/sfp-machine.h: Remove.
	* sysdeps/x86_64/soft-fp/sfp-machine.h: Likewise.
2007-01-10  Ulrich Drepper  <drepper@redhat.com>
	* io/fts.c: Make sure fts_cur is always valid after return from
	fts_read.
	Patch by Miloslav Trmac <mitr@redhat.com>.
2006-10-27  Richard Sandiford  <richard@codesourcery.com>
	* elf/elf.h (R_MIPS_GLOB_DAT): Define.
	(R_MIPS_NUM): Bump by 1.
2007-01-03  Jakub Jelinek  <jakub@redhat.com>
	* posix/execvp.c: Include alloca.h.
	(allocate_scripts_argv): Renamed to...
	(scripts_argv): ... this.  Don't allocate buffer here nor count
	arguments.
	(execvp): Use alloca if possible.
	* posix/Makefile: Add rules to build and run tst-vfork3 test.
	* posix/tst-vfork3.c: New test.
	* stdlib/Makefile (tst-strtod3-ENV): Define.
2007-01-02  Ulrich Drepper  <drepper@redhat.com>
	* posix/getconf.c: Update copyright year.
	* nss/getent.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* catgets/gencat.c: Likewise.
	* csu/version.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/sprof.c (print_version): Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* nscd/nscd.c (print_version): Likewise.
	* debug/xtrace.sh: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/mtrace.pl: Likewise.
	* debug/catchsegv.sh: Likewise.
2006-12-24  Ulrich Drepper  <drepper@redhat.com>
	* malloc/malloc.c (sYSMALLOc): Remove some unnecessary alignment
	attempts.
2006-12-23  Ulrich Drepper  <drepper@redhat.com>
	* posix/wordexp.c: Remove some unnecessary tests.
2006-12-20  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>

	* sysdeps/unix/sysv/linux/sh/bits/shm.h: New file.

	* nss/getXXbyYY_r.c: Include atomic.h.
	(INTERNAL (REENTRANT_NAME)): Write startp after start_fct,
	add atomic_write_barrier () in between.

2006-11-28  Jakub Jelinek  <jakub@redhat.com>
	* elf/dl-support.c: Include dl-procinfo.h.
	* sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4,
	PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS,
	PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X):
	Define.
	(_dl_string_platform): Use PPC_PLATFORM_* macros instead of
	hardcoded constants.
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use
	PPC_PLATFORM_* macros for array designators.
2006-11-11  Steven Munroe  <sjmunroe@us.ibm.com>
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap
	names to the beginning.
	(_dl_powerpc_platforms): Add "power6x".
	* sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease.
	(HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP.
	(_DL_PLATFORMS_COUNT): Increase.
	(_dl_string_platform): Handle power6x case.
	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP,
	PPC_FEATURE_POWER6_EXT): Define.
	(PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment.
	[-2^31 .. 2^31) range.
	* sysdeps/unix/sysv/linux/bits/statvfs.h: Define ST_RELATIME.
	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
	Handle relatime mount option.

2006-12-13  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Include
	kernel-features.h.

2006-12-11  Ulrich Drepper  <drepper@redhat.com>

	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand
	separators also if no non-zero digits found.
	* stdlib/Makefile (tests): Add tst-strtod3.
	[BZ #3664]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix test to recognize
	empty parsed strings.
	* stdlib/Makefile (tests): Add tst-strtod2.
	* stdlib/tst-strtod2.c: New file.

	[BZ #3673]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix exp_limit
	computation.
	* stdlib/Makefile (tests): Add tst-atof2.
	* stdlib/tst-atof2.c: New file.

	[BZ #3674]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Adjust exponent value
	correctly if removing trailing zero of hex-float.
	* stdlib/Makefile (tests): Add tst-atof1.
	* stdlib/tst-atof1.c: New file.

	* misc/mntent_r.c (__hasmntopt): Check p[optlen] even when p == rest.
	Start searching for next comma at p rather than rest.
	* misc/Makefile (tests): Add tst-mntent2.
	* misc/tst-mntent2.c: New test.

2006-12-08  Ulrich Drepper  <drepper@redhat.com>
	* malloc/memusage.c: Handle realloc with new size of zero and
	non-NULL pointer correctly.
	(me): Really write first record twice.
	(struct entry): Make format bi-arch safe.
	(dest): Write out more realloc statistics.
	* malloc/memusagestat.c (struct entry): Make format bi-arch safe.
2006-12-05  Jakub Jelinek  <jakub@redhat.com>
	* nis/nis_subr.c (nis_getnames): Revert last change.
2006-12-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
	* sysdeps/unix/sysv/linux/sh/sys/io.h: Removed.
2006-11-30  H.J. Lu  <hongjiu.lu@intel.com>
	* sysdeps/i386/i686/memcmp.S: Use jump table as the base of
	jump table entries.

2006-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the outermost
	`clone' function to ensure proper unwinding stop of gdb.
	* sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.

2006-12-01  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd.init: Remove obsolete and commented-out -S option
	handling.

2006-11-23  Jakub Jelinek  <jakub@redhat.com>

	[BZ #3514]
	* manual/string.texi (strncmp): Fix pastos from wcscmp description.

	[BZ #3515]
	* manual/string.texi (strtok): Remove duplicate paragraph.

2006-12-01  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Fix compatibility with
	libgcc not supporting `rflags' unwinding (register # >= 17).

2006-11-30  Jakub Jelinek  <jakub@redhat.com>

	* sunrpc/svc_run.c (svc_run): Set my_pollfd to new_pollfd if realloc
	succeeded.

2006-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
	    Jakub Jelinek  <jakub@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sigaction.c (restore_rt): Add correct
	unwind information.
	* sysdeps/unix/sysv/linux/x86_64/Makefile: Provide symbols for
	'restore_rt' even in the 'signal' directory.
	* sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: Extend the regs list.
	malloc crashed.  Don't allocate memory unnecessarily in each
	loop.
2006-10-21  Jakub Jelinek  <jakub@redhat.com>
	* resolv/mapv4v6addr.h (map_v4v6_address): Fix last change.
2006-11-20  Ulrich Drepper  <drepper@redhat.com>
	* resolv/mapv4v6addr.h (map_v4v6_address): Optimize a bit.
2006-11-18  Bruno Haible  <bruno@clisp.org>
	* sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): Invoke
	__sysconf only after having tried to call getgroups32.
2006-11-19  Ulrich Drepper  <drepper@redhat.com>
	* nss/nss_files/files-hosts.c (LINE_PARSER): Support IPv6-style
	addresses for IPv4 queries if they can be mapped.
2006-11-16  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/x86_64/fpu/s_copysignf.S (__copysignf): Switch to .text.
	* sysdeps/x86_64/fpu/s_copysign.S (__copysign): Likewise.
	(signmask): Add .size directive.
	(othermask): Add .type directive.
2006-11-14  Ulrich Drepper  <drepper@redhat.com>
	* po/nl.po: Update from translation team.
	* timezone/zdump.c: Redo fix for BZ #3137.
2006-11-14  Jakub Jelinek  <jakub@redhat.com>
	* nss/nss_files/files-alias.c (get_next_alias): Set line back
	to first_unused after parsing :include: file.
	* timezone/africa: Update from tzdata2006o.
	* timezone/antarctica: Likewise.
	* timezone/asia: Likewise.
	* timezone/australasia: Likewise.
	* timezone/backward: Likewise.
	* timezone/europe: Likewise.
	* timezone/iso3166.tab: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/southamerica: Likewise.
	* timezone/zone.tab: Likewise.

	* time/tzfile.c (__tzfile_read): Extend to handle new file format
	on machines with 64-bit time_t.

	* timezone/checktab.awk: Update from tzcode2006o.
	* timezone/ialloc.c: Likewise.
	* timezone/private.h: Likewise.
	* timezone/scheck.c: Likewise.
	* timezone/tzfile.h: Likewise.
	* timezone/tzselect.ksh: Likewise.
	* timezone/zdump.c: Likewise.
	* timezone/zic.c: Likewise.

	[BZ #3483]
	* elf/ldconfig.c (main): Call setlocale and textdomain.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.

	[BZ #3480]
	* manual/argp.texi: Fix typos.
	* manual/charset.texi: Likewise.
	* manual/errno.texi: Likewise.
	* manual/filesys.texi: Likewise.
	* manual/lang.texi: Likewise.
	* manual/maint.texi: Likewise.
	* manual/memory.texi: Likewise.
	* manual/message.texi: Likewise.
	* manual/resource.texi: Likewise.
	* manual/search.texi: Likewise.
	* manual/signal.texi: Likewise.
	* manual/startup.texi: Likewise.
	* manual/stdio.texi: Likewise.
	* manual/sysinfo.texi: Likewise.
	* manual/syslog.texi: Likewise.
	* manual/time.texi: Likewise.
	Patch by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.

	[BZ #3465]
	* sunrpc/clnt_raw.c: Minimal message improvements.
	* sunrpc/pm_getmaps.c: Likewise.
	* nis/nss_nisplus/nisplus-publickey.c: Likewise.
	* nis/nis_print_group_entry.c: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/charmap.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* elf/dl-deps.c: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* libio/vswprintf.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* sunrpc/auth_unix.c: Likewise.
	* sunrpc/rpc_main.c: Likewise.
	* nscd/cache.c: Likewise.
	* locale/programs/repertoire.c: Unify output messages.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* nscd/selinux.c: Likewise.
	* elf/cache.c: Likewise.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.

2006-11-10  Jakub Jelinek  <jakub@redhat.com>

	* string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization
	if N is one bigger than return value.
	* string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1
	and l1 last arguments, if buf is defined, verify the return value
	equals to strlen (buf) and verify no byte beyond passed length
	is modified.

2006-11-10  Ulrich Drepper  <drepper@redhat.com>

	* po/sv.po: Update from translation team.

	* sysdeps/gnu/siglist.c (__old_sys_siglist, __old_sys_sigabbrev):
	Use __new_sys_siglist instead of _sys_siglist_internal as
	second macro argument.
	(_old_sys_siglist): Use declare_symbol_alias macro instead of
	strong_alias.
2006-11-09  Ulrich Drepper  <drepper@redhat.com>

	[BZ #3493]
	* posix/unistd.h (sysconf): Remove const attribute.

	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Fix test for
	temporary or deprecated addresses.
	Patch by Sridhar Samudrala <sri@us.ibm.com>.

	* string/Makefile (tests): Add tst-strxfrm2.
	* string/tst-strxfrm2.c: New file.

2006-10-09  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-debug.c (_dl_debug_initialize): Check r->r_map for 0
	rather than r->r_brk.
	* string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal
	optimization even if needed > n.

2006-11-07  Jakub Jelinek  <jakub@redhat.com>

	* include/libc-symbols.h (declare_symbol): Rename to...
	(declare_symbol_alias): ... this.  Add ORIGINAL argument, imply
	strong_alias (ORIGINAL, SYMBOL) in asm to make sure it preceedes
	.size directive.
	* sysdeps/gnu/errlist-compat.awk: Adjust for declare_symbol_alias
	changes.
	* sysdeps/gnu/siglist.c: Likewise.

2006-11-03  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/fpu/bits/mathinline.h
	[__LIBC_INTERNAL_MATH_INLINES]: Moved to ...
	* sysdeps/powerpc/fpu/math_private.h: ...here.  New file.

2006-11-05  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word):
	Update handling of cache descriptor 0x49 for new models.
	* sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_check_word):
	Likewise.

2006-11-02  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Work around ld --help change and avoid -z relro
	test completely if the architecture doesn't care about security.

2006-11-01  Ulrich Drepper  <drepper@redhat.com>

	* po/sv.po: Update from translation team.

2006-10-31  Ulrich Drepper  <drepper@redhat.com>

	* stdlib/atexit.c (atexit): Don't mark as hidden when used to
	generate compatibility version.

2006-10-29  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Relax -z relro requirement a bit.

	* po/sv.po: Update from translation team.

2006-10-29  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-sym.c (do_sym): Use RTLD_SINGLE_THREAD_P.
	* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Likewise.
	* elf/dl-close.c (_dl_close_worker): Likewise.
	* elf/dl-open.c (_dl_open_worker): Likewise.
	* sysdeps/generic/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define.

	* configure.in: Require assembler support for visibility, compiler
	support for visibility and aliases, linker support for various -z
	options.
	* Makeconfig: Remove conditional code which now is unnecessary.
	* config.h.in: Likewise.
	* config.make.in: Likewise.
	* dlfcn/Makefile: Likewise.
	* elf/Makefile: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/libc-symbols.h: Likewise.
	* include/stdio.h: Likewise.
	* io/Makefile: Likewise.
	* io/fstat.c: Likewise.
	* io/fstat64.c: Likewise.
	* io/fstatat.c: Likewise.
	* io/fstatat64.c: Likewise.
	* io/lstat.c: Likewise.
	* io/lstat64.c: Likewise.
	* io/mknod.c: Likewise.
	* io/mknodat.c: Likewise.
	* io/stat.c: Likewise.
	* io/stat64.c: Likewise.
	* libio/stdio.c: Likewise.
	* nscd/Makefile: Likewise.
	* stdlib/Makefile: Likewise.
	* stdlib/atexit.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/i386/sysdep.h: Likewise.
	* sysdeps/i386/i686/memcmp.S: Likewise.
	* sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.

	* Makerules: USE_TLS support is now default.
	* tls.make.c: Likewise.
	* csu/Versions: Likewise.
	* csu/libc-start.c: Likewise.
	* csu/libc-tls.c: Likewise.
	* csu/version.c: Likewise.
	* dlfcn/dlinfo.c: Likewise.
	* elf/dl-addr.c: Likewise.
	* elf/dl-cache.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-iteratephdr.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-lookup.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-reloc.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-sysdep.c: Likewise.
	* elf/dl-tls.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* elf/rtld.c: Likewise.
	* elf/tst-tls-dlinfo.c: Likewise.
	* elf/tst-tls1.c: Likewise.
	* elf/tst-tls10.h: Likewise.
	* elf/tst-tls14.c: Likewise.
	* elf/tst-tls2.c: Likewise.
	* elf/tst-tls3.c: Likewise.
	* elf/tst-tls4.c: Likewise.
	* elf/tst-tls5.c: Likewise.
	* elf/tst-tls6.c: Likewise.
	* elf/tst-tls7.c: Likewise.
	* elf/tst-tls8.c: Likewise.
	* elf/tst-tls9.c: Likewise.
	* elf/tst-tlsmod1.c: Likewise.
	* elf/tst-tlsmod13.c: Likewise.
	* elf/tst-tlsmod13a.c: Likewise.
	* elf/tst-tlsmod14a.c: Likewise.
	* elf/tst-tlsmod2.c: Likewise.
	* elf/tst-tlsmod3.c: Likewise.
	* elf/tst-tlsmod4.c: Likewise.
	* elf/tst-tlsmod5.c: Likewise.
	* elf/tst-tlsmod6.c: Likewise.
	* include/errno.h: Likewise.
	* include/link.h: Likewise.
	* include/tls.h: Likewise.
	* locale/global-locale.c: Likewise.
	* locale/localeinfo.h: Likewise.
	* malloc/arena.c: Likewise.
	* malloc/hooks.c: Likewise.
	* malloc/malloc.c: Likewise.
	* resolv/Versions: Likewise.
	* sysdeps/alpha/dl-machine.h: Likewise.
	* sysdeps/alpha/libc-tls.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/generic/tls.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/ia64/dl-machine.h: Likewise.
	* sysdeps/ia64/libc-tls.c: Likewise.
	* sysdeps/mach/hurd/fork.c: Likewise.
	* sysdeps/mach/hurd/i386/tls.h: Likewise.
	* sysdeps/powerpc/powerpc32/dl-machine.c: Likwise.
	* sysdeps/powerpc/powerpc32/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
	* sysdeps/s390/libc-tls.c: Likewise.
	* sysdeps/s390/s390-32/dl-machine.h: Likewise.
	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
	* sysdeps/sh/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
	* sysdeps/x86_64/dl-machine.h: Likewise.

	[BZ #3426]
	* stdlib/stdlib.h: Adjust comment for canonicalize_file_name to
	reality.

2006-10-27  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-lookup.c (_dl_debug_bindings): Remove unused symbol_scope
	argument.
	(_dl_lookup_symbol_x): Adjust caller.

	* sysdeps/generic/ldsodefs.h (struct link_namespaces): Remove
	_ns_global_scope.
	* elf/rtld.c (dl_main): Don't initialize _ns_global_scope.

	* elf/dl-libc.c: Revert l_scope name changes.
	* elf/dl-load.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/rtld.c: Likewise.
	* elf/dl-close.c (_dl_close): Likewise.
	* elf/dl-open.c (dl_open_worker): Likewise.  If not SINGLE_THREAD_P,
	always use __rtld_mrlock_{change,done}.  Always free old scope list
	here if not l_scope_mem.
	* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Revert l_scope name
	change.  Never free scope list here.  Just __rtld_mrlock_lock before
	the lookup and __rtld_mrlock_unlock it after the lookup.
	* elf/dl-sym.c: Likewise.
	* include/link.h (struct r_scoperec): Remove.
	(struct link_map): Replace l_scoperec with l_scope, l_scoperec_mem
	with l_scope_mem and l_scoperec_lock with l_scope_lock.

2006-10-25  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/gnu/netinet/tcp.h: Define TCP_CONGESTION.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Disable building profile libraries by default.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-lookup.c (_dl_lookup_symbol_x): Add warning to
	_dl_lookup_symbol_x code.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-runtime.c: Include sysdep-cancel.h.
	(_dl_fixup, _dl_profile_fixup): Use __rtld_mrlock_* and
	scoperec->nusers only if !SINGLE_THREAD_P.  Use atomic_*
	instead of catomic_* macros.
	* elf/dl-sym.c: Include sysdep-cancel.h.
	(do_sym): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.  Use atomic_* instead of catomic_* macros.
	* elf/dl-close.c: Include sysdep-cancel.h.
	(_dl_close): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.  Use atomic_* instead of catomic_* macros.
	* elf/dl-open.c: Include sysdep-cancel.h.
	(dl_open_worker): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.  Use atomic_* instead of catomic_* macros.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	[BZ #3313]
	* malloc/malloc.c (malloc_consolidate): Set maxfb to address of last
	fastbin rather than end of fastbin array.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/i486/bits/atomic.h (catomic_decrement): Use correct
	body macro.
	* sysdeps/x86_64/bits/atomic.h
	(__arch_c_compare_and_exchange_val_64_acq): Add missing casts.
	(catomic_decrement): Use correct body macro.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	* include/atomic.h: Add a unique prefix to all local variables
	in macros.
	* csu/tst-atomic.c (do_test): Test also catomic_* macros.

2006-10-14  Ulrich Drepper  <drepper@redhat.com>

	* resolv/arpa/nameser.h: Document that ns_t_a6 is deprecated.

	[BZ #3313]
	* malloc/malloc.c (malloc_consolidate): Don't use get_fast_max to
	determine highest fast bin to consolidate, always look into all of
	them.
	(do_check_malloc_state): Only require for empty bins for large
	sizes in main arena.

	* libio/stdio.h: Add more __wur attributes.

2006-11-12  Andreas Jaeger  <aj@suse.de>

	[BZ #2510]
	* manual/search.texi (Hash Search Function): Clarify.
	(Array Search Function): Clarify.

2006-11-12  Joseph Myers  <joseph@codesourcery.com>

	[BZ #2830]
	* math/atest-exp.c (main): Cast hex value to mp_limb_t before
	shifting.
	* math/atest-exp2.c (read_mpn_hex): Likewise.
	* math/atest-sincos.c (main): Likewise.

	* sysdeps/unix/sysv/linux/syscalls.list: Add epoll_pwait.
	* sysdeps/unix/sysv/linux/sys/epoll.h: Declare epoll_pwait.
	* sysdeps/unix/sysv/linux/Versions (libc): Add epoll_pwait for
	version GLIBC_2.6.
	* Versions.def: Add GLIBC_2.6 for libc.

	* sysdeps/i386/i486/bits/atomic.h: Add catomic_* support.

2006-10-11  Jakub Jelinek  <jakub@redhat.com>

	* malloc/malloc.c (_int_malloc): Remove unused any_larger variable.

	* nis/nis_defaults.c (__nis_default_access): Don't call getenv twice.

	* nis/nis_subr.c (nis_getnames): Use __secure_getenv instead of getenv.
	* sysdeps/generic/unsecvars.h: Add NIS_PATH.

2006-10-11  Ulrich Drepper  <drepper@redhat.com>

	* include/atomic.c: Define catomic_* operations.
	* sysdeps/x86_64/bits/atomic.h: Likewise.  Fix a few minor problems.
	* stdlib/cxa_finalize.c: Use catomic_* operations instead of atomic_*.
	* malloc/memusage.c: Likewise.
	* gmon/mcount.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-profile.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-runtime.c: Likewise.
	* elf/dl-fptr.c: Likewise.
	* resolv/res_libc.c: Likewise.

2006-10-10  Roland McGrath  <roland@frob.com>
	* sysdeps/mach/hurd/utimes.c: Use a union to avoid an improper cast.
	* sysdeps/mach/hurd/futimes.c: Likewise.
	* sysdeps/mach/hurd/lutimes.c: Likewise.

2006-10-09  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	Implement reference counting of scope records.
	* elf/dl-close.c (_dl_close): Remove all scopes from removed objects
	from the list in objects which remain.  Always allocate new scope
	record.
	* elf/dl-open.c (dl_open_worker): When growing array for scopes,
	don't resize, allocate a new one.
	* elf/dl-runtime.c: Update reference counters before using a scope
	array.
	* elf/dl-sym.c: Likewise.
	* elf/dl-libc.c: Adjust for l_scope name change.
	* elf/dl-load.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/link.h: Include <rtld-lowlevel.h>.  Define struct
	r_scoperec.  Replace r_scope with pointer to r_scoperec structure.
	Add l_scoperec_lock.
	* sysdeps/generic/ldsodefs.h: Include <rtld-lowlevel.h>.
	* sysdeps/generic/rtld-lowlevel.h: New file.

	* include/atomic.h: Rename atomic_and to atomic_and_val and
	atomic_or to atomic_or_val.  Define new macros atomic_and and
	atomic_or which do not return values.
	* sysdeps/x86_64/bits/atomic.h: Define atomic_and and atomic_or.
	Various cleanups.
	* sysdeps/i386/i486/bits/atomic.h: Likewise.

	* po/sv.po: Update from translation team.

2006-10-07  Ulrich Drepper  <drepper@redhat.com>

	* Versions.def: Add GLIBC_2.6 to libpthread.

	* include/shlib-compat.h (SHLIB_COMPAT): Expand parameters before use.
	(versioned_symbol): Likewise.
	(compat_symbol): Likewise.

	* po/tr.po: Update from translation team.
	* nis/Banner: Removed.  It's been integral part forever and the
	author info is incomplete anyway.
	* libio/Banner: Likewise.

2006-10-06  Ulrich Drepper  <drepper@redhat.com>

	* version.h (VERSION): Bump to 2.5.90 for new development tree.
2007-01-11 21:51:07 +00:00
Jakub Jelinek 32c075e1f0 . 2007-07-31 13:33:18 +00:00
Roland McGrath ac45d7f42b * inet/rcmd.c (iruserfopen): Remove redundant initialization.
From Bernhard Fischer <rep.nop@aon.at>.

	* posix/regcomp.c (calc_eclosure_iter): Remove dead variables.
	Reported by Mike Frysinger <vapier@gentoo.org>.
2006-01-31 19:18:14 +00:00
Ulrich Drepper 9b0c3f38d3 [BZ #1224]
2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
	[BZ #1224]
	* posix/regcomp.c (init_word_char, duplicate_node_closure,
	fetch_token, peek_token_bracket, build_range_exp,
	build_collating_symbol): Remove forward decls; no longer needed
	now that we use prototypes.
2005-10-15 21:14:58 +00:00
Ulrich Drepper 7d4722e3fd [BZ #368]
* SUPPORTED (SUPPORTED-LOCALES): Add dz_BT.UTF-8.
	[BZ #368]
	* locales/dz_BT: New file.
2005-10-14 22:56:25 +00:00
Ulrich Drepper 513bbb254d [BZ #1373]
2005-10-13  Ulrich Drepper  <drepper@redhat.com>
	[BZ #1373]
	* argp/argp.h: Remove __NTH for __argp_usage inline function.
2005-10-14 05:54:47 +00:00
Ulrich Drepper 0fd8ae9c17 * posix/regcomp.c: Likewise. 2005-10-13 20:40:05 +00:00
Ulrich Drepper 2c05d33f90 [BZ #1302]
2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
            Ulrich Drepper  <drepper@redhat.com>

	[BZ #1302]
	Change bitset word type from unsigned int to unsigned long int,
	as this has better performance on typical 64-bit hosts.  Change
	bitset type name to bitset_t.
	* posix/regcomp.c (build_equiv_class, build_charclass):
	(build_range_exp, build_collating_symbol):
	Prefer bitset_t to re_bitset_ptr_t in prototypes, when the actual
	argument is a bitset.  This is merely a style issue, but it makes
	it clearer that an entire array is expected.
	(re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps,
	lower_subexp): Adjust for new bitset_t definition.
	(lower_subexp, parse_bracket_exp, built_charclass_op): Likewise.
	* posix/regex_internal.h (bitset_set, bitset_clear, bitset_contain,
	bitset_not, bitset_merge, bitset_set_all, bitset_mask): Likewise.
	* posix/regexec.c (check_dst_limits_calc_pos_1,
	check_subexp_matching_top, build_trtable, group_nodes_into_DFAstates):
	Likewise.
	* posix/regcomp.c (utf8_sb_map): Don't assume initializer
	== 0xffffffff.
	* posix/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
	All uses changed.
	(BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
	(bitset_word_t): New type, replacing 'unsigned int' for bitset uses.
	All uses changed.
	(BITSET_WORD_MAX): New macro.
	(bitset_set, bitset_clear, bitset_contain, bitset_empty,
	(bitset_set_all, bitset_copy):  Adjust for bitset_t change.
	(bitset_empty, bitset_copy):
	Prefer sizeof (bitset_t) to multiplying it out ourselves.
	(bitset_not_merge): Remove; unused.
	(bitset_contain): Return bool, not unsigned int with one bit on.
	All callers changed.
	* posix/regexec.c (build_trtable): Don't assume bitset_t has no
	stricter alignment than re_node_set; do this by defining a new
	internal type struct dests_alloc and using it to allocate memory.
2005-09-28 17:33:18 +00:00
Ulrich Drepper 997470b3e1 [BZ #281]
* posix/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
	* posix/regcomp.c: Remove unnecessary uses of
	unsigned RE_TRANSLATE_TYPE.
	* posix/regex_internal.h: Likewise.
	* posix/regex_internal.c: Likewise.
	* posix/regexexec.c: Likewise.
	Based on a patch by Stepan Kasal <kasal@ucw.cz>.
2005-09-23 06:11:29 +00:00
Ulrich Drepper 01ed6ceb7c * posix/regex_internal.c (re_string_reconstruct): Avoid calling
mbrtowc for very simple UTF-8 case.

2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regex_internal.c (build_wcs_upper_buffer): Fix portability
	bugs in int versus size_t comparisons.

2005-09-06  Ulrich Drepper  <drepper@redhat.com>

	* posix/regex_internal.c (re_acquire_state): Make DFA pointer arg
	a pointer-to-const.
	(re_acquire_state_context): Likewise.
	* posix/regex_internal.h: Adjust prototypes.

2005-08-31  Jim Meyering  <jim@meyering.net>

	* posix/regcomp.c (search_duplicated_node): Make first pointer arg
	a pointer-to-const.
	* posix/regex_internal.c (create_ci_newstate, create_cd_newstate,
	register_state): Likewise.
	* posix/regexec.c (search_cur_bkref_entry, check_dst_limits):
	(check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
	(group_nodes_into_DFAstates): Likewise.

	* posix/regexec.c (re_search_internal): Simplify update of
	rm_so and rm_eo by replacing "if (A == B) A += C - B;"
	with the equivalent of "if (A == B) A = C;".

2005-09-06  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c (re_compile_internal): Change third parameter type
	to size_t.
	(init_dfa): Likewise.  Make sure that arithmetic on pat_len doesn't
	overflow.
	* posix/regex_internal.h (struct re_dfa_t): Change type of nodes_alloc
	and nodes_len to size_t.
	* posix/regex_internal.c (re_dfa_add_node): Use size_t as type for
	new_nodes_alloc.  Check for overflow.

2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
	(optimize_subexps, lower_subexp):
	Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
	since the signed shift might overflow.  Use 1u<<31 instead.
	* posix/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
	Likewise.
	* posix/regexec.c (check_dst_limits_calc_pos_1): Likewise.
	(check_subexp_matching_top): Likewise.
	* posix/regcomp.c (optimize_subexps, lower_subexp):
	Use CHAR_BIT rather than 8, for clarity.
	* posix/regexec.c (check_dst_limits_calc_pos_1):
	(check_subexp_matching_top): Likewise.
	* posix/regcomp.c (init_dfa): Make table_size unsigned, so that we
	don't have to worry about portability issues when shifting it left.
	Remove no-longer-needed test for table_size > 0.
	* posix/regcomp.c (parse_sub_exp): Do not shift more bits than there
	are in a word, as the resulting behavior is undefined.
	* posix/regexec.c (check_dst_limits_calc_pos_1): Likewise;
	in one case, a <= should have been an <, and in another case the
	whole test was missing.
	* posix/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
	the standard name CHAR_BIT.
2005-09-07 01:15:33 +00:00
Ulrich Drepper 2d87db5b53 * posix/regex_internal.h (re_sub_match_top_t): Remove unused member
next_last_offset.
	(struct re_dfa_t): Remove unused member states_alloc.
	* posix/regcomp.c (init_dfa): Don't initialize unused members.

2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regexec.c (set_regs): Don't alloca with an unbounded size.

	alloca modernization/simplification for regex.
	* posix/regex.c: Remove portability cruft for alloca.  This no longer
	needs to be at the start of the file, and can be moved into
	regex_internal.h and simplified.
	* posix/regex_internal.h: Include <alloca.h>.
	(__libc_use_alloca) [!defined _LIBC]: New macro.
	* posix/regexec.c (build_trtable): Remove "#ifdef _LIBC",
	since the code now works outside glibc.

2005-09-06  Ulrich Drepper  <drepper@redhat.com>

	* include/regex.h: Remove use of _RE_ARGS.

2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regexec.c (find_recover_state): Change "err" to "*err".

2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regcomp.c (regerror): Pointer args are 'restrict',
	as per POSIX.
	* posix/regex.h (regerror): Likewise.
	* manual/pattern.texi (POSIX Regexp Compilation): Likewise.
	Similarly for regcomp and regexec.  Also, first 2 args of regexec
	and 2nd arg of regerror are const.

	* posix/regex.c: Do not include <sys/types.h>, as POSIX no longer
	requires this.  (The code never needed it.)

2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regexec.c (sift_states_bkref): re_node_set_insert returns
	int, not reg_errcode_t.

	* posix/regex_internal.c (calc_state_hash): Put 'inline' before type,
	since some broken compilers warn about it otherwise.

	* posix/regcomp.c (create_initial_state): Remove duplicate decl.

2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
	C89 or better.  All uses removed.

2005-09-06  Ulrich Drepper  <drepper@redhat.com>

	* posix/regex.c: Prevent using C++ compilers.

2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regcomp.c (duplicate_node): Return new index, not an error
	code, and let the caller return REG_ESPACE if out of space.  This
	removes an uninitialied-variable warning with GCC 4.0.1, and also
	avoids taking the address of a local variable.  All callers
	changed.

2005-09-06  Ulrich Drepper  <drepper@redhat.com>

	* include/time.h (__strptime_internal): Rename parameter to avoid
	bogus compiler warning.

2005-08-19  Jim Meyering  <jim@meyering.net>

	* posix/regexec.c (proceed_next_node): Redo local variables to
	avoid GCC shadowing warnings.

2005-09-06  Ulrich Drepper  <drepper@redhat.com>

	* posix/regex_internal.c (re_acquire_state): Minor code rearrangement.
	(re_acquire_state_context): Likewise.

2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regex_internal.c (re_string_realloc_buffers):
	(re_node_set_insert, re_node_set_insert_last, re_dfa_add_node):
	Rename local variables to avoid GCC shadowing warnings.

2005-07-08  Eric Blake  <ebb9@byu.net>
            Paul Eggert  <eggert@cs.ucla.edu>

	* posix/regcomp.c (init_dfa): Store __btowc value in wint_t, not
	wchar_t.  Remove now-unnecessary cast.
	(build_range_exp): Likewise.
2005-09-06 21:15:13 +00:00
Ulrich Drepper 96c91d1cfe 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
* posix/regcomp.c (re_compile_internal): __libc_lock_init
	after init_dfa.
2005-07-10 22:02:15 +00:00
Ulrich Drepper 7b91899345 [BZ #934]
2005-05-06  Jakub Jelinek  <jakub@redhat.com>
	[BZ #934]
	* posix/regex_internal.h: Include bits/libc-lock.h or define dummy
	__libc_lock_* macros if not _LIBC.
	(struct re_dfa_t): Add lock.
	* posix/regcomp.c (re_compile_internal): Add __libc_lock_init.
	* posix/regexec.c (regexec, re_search_stub): Add locking.
2005-05-06 23:34:44 +00:00
Ulrich Drepper 88764ae26a [BZ #779]
2005-03-10  Jakub Jelinek  <jakub@redhat.com>
	* math/test-misc.c (main): Add some more tests.

2005-03-17  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (re_compile_fastmap_iter): Fix check for failed
	__wcrtomb.  Check return values of other __wcrtomb calls.
	* posix/regex_internal.c (build_wcs_buffer, re_string_skip_chars):
	Change mbclen type to size_t.
	(build_wcs_upper_buffer): Change mbclen and mbcdlen type to size_t.
	Handle mb chars whose upper case doesn't have multibyte representation
	in locale's charset.

2005-03-15  Jakub Jelinek  <jakub@redhat.com>

	* malloc/malloc.c (_int_icalloc, _int_icomalloc, iALLOc,
	public_iCALLOc, public_iCALLOc, public_iCOMALLOc): Protect with
	#ifndef _LIBC.

	[BZ #779]
	* malloc/malloc.c (public_mTRIm): Initialize malloc if not yet
	initialized.

2005-03-10  Jakub Jelinek  <jakub@redhat.com>

	* misc/sys/cdefs.h (__always_inline): Define.
	* posix/bits/unistd.h (read, pread, pread64, readlink, getcwd, getwd):
	Use __always_inline instead of __inline.
	* socket/bits/socket2.h (recv, recvfrom): Likewise.
	* libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Likewise.
	* string/bits/string3.h (__memcpy_ichk, __memmove_ichk, __mempcpy_ichk,
	__memset_ichk, __strcpy_ichk, __stpcpy_ichk, __strncpy_ichk,
	__strcat_ichk, __strncat_ichk): Use __always_inline instead of
	__inline__ __attribute__ ((__always_inline__)).

2005-03-09  Jakub Jelinek  <jakub@redhat.com>

	* debug/tst-chk1.c: Include sys/socket.h and sys/un.h.
	(do_test): Add new tests for recv, recvfrom, getcwd, getwd and
	readlink.  Add some more tests for read, pread, pread64, fgets and
	fgets_unlocked.

	* posix/bits/unistd.h (read, pread, pread64, readlink,
	getcwd, getwd): Change macros into extern inline functions.
	(__read_alias, __pread_alias, __pread64_alias, __readlink_alias,
	__getcwd_alias, __getwd_alias): New prototypes.
	* socket/bits/socket2.h (recv, recvfrom): Change macros into
	extern inline functions.
	(__recv_alias, __recvfrom_alias): New prototypes.
	* libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Change macros
	into extern inline functions.
	(__gets_alias, __fgets_alias, __fgets_unlocked_alias): New prototypes.

	* debug/pread_chk.c (__pread_chk): Fix order of arguments passed
	to __pread.
	* debug/pread64_chk.c (__pread64_chk): Fix order of arguments passed
	to __pread64.
2005-03-19 00:28:51 +00:00
Ulrich Drepper 744eb12b7b * posix/regcomp.c (lower_subexp): Do not optimize empty
subexpressions even with REG_NOSUB.
	* posix/rxspencer/tests: Add a previously failing testcase.
2005-02-22 05:07:20 +00:00
Ulrich Drepper 963d8d782f [BZ #558]
Update.
2005-01-27  Paolo Bonzini  <bonzini@gnu.org>

	[BZ #558]
	* posix/regcomp.c (calc_inveclosure): Return reg_errcode_t.
	Initialize the node sets in dfa->inveclosures.
	(analyze): Initialize inveclosures only if it is needed.
	Check errors from calc_inveclosure.
	* posix/regex_internal.c (re_dfa_add_node): Do not initialize
	the inveclosure node set.
	* posix/regexec.c (re_search_internal): If nmatch includes unused
	subexpressions, reset them to { rm_so: -1, rm_eo: -1 } here.

	* posix/regcomp.c (parse_bracket_exp) [!RE_ENABLE_I18N]:
	Do build a SIMPLE_BRACKET token.

	* posix/regexec.c (transit_state_mb): Do not examine nodes
	where ACCEPT_MB is not set.
2005-01-27 19:08:10 +00:00
Ulrich Drepper 02f3550c8b [BZ #605, BZ #611]
Update.
2004-12-13  Paolo Bonzini  <bonzini@gnu.org>

	Separate parsing and creation of the NFA.  Avoided recursion on
	the (very unbalanced) parse tree.
	[BZ #611]
	* posix/regcomp.c (struct subexp_optimize, analyze_tree, calc_epsdest,
	re_dfa_add_tree_node, mark_opt_subexp_iter): Removed.
	(optimize_subexps, duplicate_tree, calc_first, calc_next,
	mark_opt_subexp): Rewritten.
	(preorder, postorder, lower_subexps, lower_subexp, link_nfa_nodes,
	create_token_tree, free_tree, free_token): New.
	(analyze): Accept a regex_t *.  Invoke the passes via the preorder and
	postorder generic visitors.  Do not initialize the fields in the
	re_dfa_t that represent the transitions.
	(free_dfa_content): Use free_token.
	(re_compile_internal): Analyze before UTF-8 optimizations.  Do not
	include optimization of subexpressions.
	(create_initial_state): Fetch the DFA node index from the first node's
	bin_tree_t *.
	(optimize_utf8): Abort on unexpected nodes, including OP_DUP_QUESTION.
	Return on COMPLEX_BRACKET.
	(duplicate_node_closure): Fix comment.
	(duplicate_node): Do not initialize the fields in the
	re_dfa_t that represent the transitions.
	(calc_eclosure, calc_inveclosure): Do not handle OP_DELETED_SUBEXP.
	(create_tree): Remove final argument.  All callers adjusted.  Rewritten
	to use create_token_tree.
	(parse_reg_exp, parse_branch, parse_expression, parse_bracket_exp,
	build_charclass_op): Use create_tree or create_token_tree instead
	of re_dfa_add_tree_node.
	(parse_dup_op): Likewise.  Also free the tree using free_tree for
	"<re>{0}", and lower OP_DUP_QUESTION to OP_ALT: "a?" is equivalent
	to "a|".  Adjust invocation of mark_opt_subexp.
	(parse_sub_exp): Create a single SUBEXP node.
	* posix/regex_internal.c (re_dfa_add_node): Remove last parameter,
	always perform as if it was 1.  Do not initialize OPT_SUBEXP and
	DUPLICATED, and initialize the DFA fields representing the transitions.
	* posix/regex_internal.h (re_dfa_add_node): Adjust prototype.
	(re_token_type_t): Move OP_DUP_PLUS and OP_DUP_QUESTION to the tokens
	section.  Add a tree-only code SUBEXP.  Remove OP_DELETED_SUBEXP.
	(bin_tree_t): Include a full re_token_t for TOKEN.  Turn FIRST and
	NEXT into pointers to trees.  Remove ECLOSURE.

2004-12-28  Paolo Bonzini  <bonzini@gnu.org >

	[BZ #605]
	* posix/regcomp.c (parse_bracket_exp): Do not modify DFA nodes
	that were already created.
	* posix/regex_internal.c (re_dfa_add_node): Set accept_mb field
	in the token if needed.
	(create_ci_newstate, create_cd_newstate): Set accept_mb field
	from the tokens' field.
	* posix/regex_internal.h (re_token_t): Add accept_mb field.
	(ACCEPT_MB_NODE): Removed.
	* posix/regexec.c (proceed_next_node, transit_states_mb,
	build_sifted_states, check_arrival_add_next_nodes): Use
	accept_mb instead of ACCEPT_MB_NODE.
2005-01-26 22:42:49 +00:00
Ulrich Drepper 24992143d8 [BZ #693]
Update.
2005-01-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/sysdep.h
	(SYSCALL_ERROR_HANDLER_TLS_STORE): Remove unnecessary 0 imm.

	[BZ #693]
	* posix/regex_internal.h (DUMMY_CONSTRAINT): Rename to...
	(WORD_DELIM_CONSTRAINT): ...this.
	(NOT_WORD_DELIM_CONSTRAINT): Define.
	(re_context_type): Add INSIDE_NOTWORD and NOT_WORD_DELIM,
	change WORD_DELIM to use WORD_DELIM_CONSTRAINT.
	* posix/regcomp.c (peek_token): For \B create NOT_WORD_DELIM
	anchor instead of INSIDE_WORD.
	(parse_expression): Handle NOT_WORD_DELIM constraint.
	* posix/bug-regex19.c (tests): Adjust tests that relied on \B
	being inside word instead of not word delim.
	* posix/tst-rxspencer.c (mb_frob_pattern): Don't frob escaped
	characters.
	* posix/rxspencer/tests: Add some new tests.
2005-01-26 19:56:03 +00:00
Ulrich Drepper ea16166114 Update.
2005-01-14  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c [!_LIBC] (init_dfa): Fix determining of relevant
	LC_* variable.  Patch by Aharon Robbins <arnold@skeeve.com>.

	* stdlib/fmtmsg.c (internal_addseverity): Remove incorrect free call.
	* stdlib/tst-fmtmsg.c (main): Add another addseverity test.
2005-01-14 09:06:25 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Ulrich Drepper ae73c6c120 (free_dfa_content, init_dfa): Remove references to re_dfa_t's subexps field. (parse_sub_exp, parse_expression): Do not use it. Use completed_bkref_map instead. (create_initial_state, peek_token): Store a backreference \N with opr.idx = N-1. 2004-12-06 02:56:42 +00:00
Ulrich Drepper 20dc2f79f7 Update.
2004-11-23  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regcomp.c (analyze_tree): Always call calc_epsdest.
	(calc_inveclosure): Use re_node_set_insert_last.
	(parse_dup_op): Lower X{1,5} to (X(X(X(XX?)?)?)?)?
	rather than X?X?X?X?X?.
	* posix/regex_internal.h (re_node_set_insert_last): New declaration.
	* posix/regex_internal.c (re_node_set_insert_last): New function.
	* posix/PCRE.tests: Add testcases.
2004-11-25 22:32:18 +00:00
Ulrich Drepper c06a6956a4 [BZ #544]
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-18 23:57:34 +00:00
Ulrich Drepper b4ae56bdc8 Update.
2004-11-09  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (calc_eclosure_iter): Don't access
	dfa->edests[node].elems[0] if dfa->edests[node].nelem == 0.
	* posix/rxspencer/tests: Add 5 new tests.
2004-11-10 00:50:40 +00:00
Ulrich Drepper e40a38b383 Update.
2004-11-08  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c (utf8_sb_map): Define.
	(free_dfa_content): Don't free dfa->sb_char if it's a pointer to
	utf8_sb_map.
	(init_dfa): Use utf8_sb_map instead of initializing memory when the
	encoding is UTF-8.

	* posix/regcomp.c (init_dfa): Get the codeset name outside glibc as
	well.  Check if it is spelled UTF8 as well as UTF-8, and check
	case-insensitively.  Set dfa->map_notascii manually when outside
	glibc.
	* posix/regex_internal.c (build_wcs_upper_buffer) [!_LIBC]: Enable
	optimizations based on map_notascii.
	* posix/regex_internal.h [HAVE_LANGINFO_H || HAVE_LANGINFO_CODESET
	|| _LIBC]: Include langinfo.h.

	* posix/regex_internal.h (struct re_backref_cache_entry): Add "more"
	field.
	* posix/regexec.c (check_dst_limits): Hoist computation of the source
	and destination bkref_idx out of the loop.  Pass it to
	check_dst_limits_calc_pos.
	(check_dst_limits_calc_pos_1): New function, containing the recursive
	loop of check_dst_limits_calc_pos; uses the "more" field of
	struct re_backref_cache to control the loop.
	(check_dst_limits_calc_pos): Store into "boundaries" the position
	relative to lim's start and end positions.  Do not accept eclosures,
	accept bkref_idx instead.  Call check_dst_limits_calc_pos_1 to do the
	work.
	(sift_states_bkref): Use the "more" field of struct re_backref_cache
	to control the loop.  A big "if" was turned into a continue and the
	function was reindented.
	(get_subexp): Use the "more" field of struct re_backref_cache
	to control the loop.
	(match_ctx_add_entry): Initialize the bkref_ents' "more" field.
	(search_cur_bkref_entry): Return -1 if out of bounds.

	* posix/regexec.c (empty_set): Remove.
	(sift_states_backward): Remove cur_src variable.  Move inner loop
	to build_sifted_states.
	(build_sifted_states): Extract from sift_states_backward.  Do not
	use empty_set.
	(update_cur_sifted_state): Do not use empty_set.  Special case
	dest_nodes->nelem == 0.
2004-11-08 22:49:44 +00:00
Andreas Jaeger 7090d3caa1 * sysdeps/x86_64/dl-machine.h (elf_machine_rela_relative): Remove
static, add always_inline attribute. 
(elf_machine_rela): Likewise. 
(elf_machine_lazy_rel): Likewise.
	* elf/dynamic-link.h (elf_get_dynamic_info): Make static
	dependend on !RESOLVE so that it's not defined in local
	scope.

	* locale/weight.h (findidx): Remove static, it's not supported
	anymore with GCC 4.0 in a block scope.
	* locale/weightwc.h (findidx): Likewise.
	* posix/regcomp.c (seek_collating_symbol_entry): Likewise.
	(lookup_collation_sequence_value): Likewise.
	(build_range_exp): Likewise.
	(build_collating_symbol): Likewise.
	* iconv/iconvconfig.c (write_output): Likewise.
	* elf/do-rel.h (elf_dynamic_do_rel): Likewise.
2004-09-24 17:09:04 +00:00
Ulrich Drepper 58845a7030 Update.
* include/wctype.h: Add libc_hidden_proto for __towctrans.
	* wctype/towctrans.c: Add libc_hidden_def.

	* libio/memstream.c (open_memstream): Use _IO_init with INTUSE.

	* posix/regexec.c (transit_state): Remove unused variable
	next_state.

	* posix/regcomp.c (init_dfa): Use __btowc instead of btowc.
2004-03-05 10:54:16 +00:00
Ulrich Drepper 266c1f50df Update.
2004-02-26  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c (parse_expression): Avoid duplication in calls
	to build_charclass_op.

	* posix/regcomp.c (parse_expression): Add cast to (const unsigned
	char *) in calls to `build_charclass_op'.
2004-02-26 20:33:23 +00:00
Ulrich Drepper 1e7947dcc9 Update.
2004-02-06  Andreas Schwab  <schwab@suse.de>

	* posix/regcomp.c (build_range_exp): Fix off-by-one.
	(parse_bracket_exp): Likewise.
2004-02-06 18:30:34 +00:00
Ulrich Drepper 4bb333cdd2 (build_range_exp) [!_LIBC]: Check validity of collation elements. 2004-01-30 05:19:45 +00:00
Ulrich Drepper 10677727e2 Update.
2004-01-12  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regcomp.c [_LIBC && !RE_ENABLE_I18N]:
	Drop code to support this, it is never true.
	(build_range_exp) [!_LIBC]: Do not create a range
	in MBCSET for a single-byte character set.
	(build_range_exp) [_LIBC]: Do not create a range
	in MBCSET for a single-byte character set without
	collation elements.
	(init_dfa): Do not conditionalize on _LIBC, it
	just makes the code less clear.
	(parse_bracket_exp): Use NON_MATCH variable in
	addition to "mbcset->non_match", not as an
	alternative.
	(build_charclass_op): rename NOT parameter to
	NON_MATCH, use it instead of declaring a variable.
	(parse_bracket_exp) [!_LIBC]: Pass NULL for MBCSET
	if the character set is single-byte.
2004-01-14 02:42:20 +00:00
Ulrich Drepper 294b6bcc13 Update.
2004-01-14  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (peek_token_bracket): Check remaining
	string length before re_string_peek_byte (x, 1).
	(parse_bracket_symbol): Likewise.
	* posix/regex_internal.h (re_string_is_single_byte_char): Return
	true at last byte in the string.
	* posix/bug-regex22.c (main): Add new test.
2004-01-14 01:45:37 +00:00
Ulrich Drepper 86576b62f4 (regcomp): Fix comment typo. (regfree): Free preg->translate, clear buffer, allocated, fastmap and translate fields.
(build_charclass, buld_charclass_op): Change first
argument to unsigned RE_TRANSLATE_TYPE.
2004-01-06 21:59:24 +00:00
Ulrich Drepper 56b168be5d Update.
2004-01-02  Jakub Jelinek  <jakub@redhat.com>

	* posix/regex_internal.c (re_node_set_insert): Remove unused variables.

	* posix/regex_internal.h (re_dfa_t): Add syntax field.
	* posix/regcomp.c (parse): Initialize dfa->syntax.
	* posix/regexec.c (acquire_init_state_context,
	prune_impossible_nodes, check_matching, check_halt_state_context,
	proceed_next_node, sift_states_iter_mb, sift_states_backward,
	update_cur_sifted_state, sift_states_bkref, transit_state,
	transit_state_sb, transit_state_mb, transit_state_bkref,
	get_subexp, get_subexp_sub, check_arrival, expand_bkref_cache,
	build_trtable): Remove preg argument, add dfa argument instead
	and remove dfa = preg->buffer initialization in the body.
	Adjust all callers.
	(check_node_accept_bytes, group_nodes_into_DFAstates,
	check_node_accept): Likewise.  Use dfa->syntax instead of
	preg->syntax.
	(check_arrival_add_next_nodes): Remove preg argument.

	* posix/regex_internal.h (re_match_context_t): Make input
	re_string_t instead of a pointer to it.
	* posix/regex_internal.c (re_string_construct_common): Don't clear
	pstr here...
	(re_string_construct): ... but only here.
	* posix/regexec.c (match_ctx_init): Remove input argument.  Don't
	initialize fields to zero.
	(re_search_internal): Move input into mctx.input.
	(acquire_init_state_context, check_matching,
	check_halt_state_context, proceed_next_node,
	clean_state_log_if_needed, sift_states_bkref, sift_states_iter_mb,
	transit_state, transit_state_sb, transit_state_mb,
	transit_state_bkref, get_subexp, check_arrival,
	check_arrival_add_next_nodes, check_node_accept, extend_buffers):
	Change mctx->input into &mctx->input and mctx->input->field into
	mctx->input.field.

2004-01-02  Jakub Jelinek  <jakub@redhat.com>
	    Paolo Bonzini  <bonzini@gnu.org>

	* posix/regex_internal.h (re_const_bitset_ptr_t): New type.
	(re_string_t): Add newline_anchor, word_char and word_ops_used fields.
	(re_dfa_t): Change word_char type to bitset.  Add word_ops_used field.
	(re_string_context_at, re_string_reconstruct): Remove last argument.
	* posix/regex_internal.c (re_string_allocate): Initialize
	pstr->word_char and pstr->word_ops_used.
	(re_string_context_at): Remove newline_anchor argument.
	Use input->newline_anchor instead, swap && conditions.
	Only use IS_WIDE_WORD_CHAR if input->word_ops_used != 0.
	Use input->word_char bitmap instead of IS_WORD_CHAR.
	(re_string_reconstruct): Likewise.
	Adjust re_string_context_at caller.
	* posix/regexec.c (acquire_init_state_context,
	check_halt_state_context, transit_state, transit_state_sb,
	transit_state_mb, transit_state_bkref, check_arrival,
	check_node_accept): Adjust re_string_context_at and
	re_string_reconstruct callers.
	(re_search_internal): Likewise.  Set input.newline_anchor.
	(build_trtable): Use dfa->word_char bitmap instead of IS_WORD_CHAR.
	* posix/regcomp.c (init_word_char): Change return type to void.
	Set dfa->word_ops_used.
	(free_dfa_content): Don't free dfa->word_char.
	(parse_expression): Remove error handling for init_word_char.
2004-01-02 21:20:51 +00:00
Ulrich Drepper a96c63edd2 Update.
* posix/regcomp.c (mark_opt_subexp_iter): Declare IDX as int.

	* posix/regexec.c (re_copy_regs): Fix testing for failed allocation.
	_IO_peekc_unlocked, _IO_putc_unlocked, _IO_getwc_unlocked, and
2003-12-29 00:42:16 +00:00