Commit Graph

151 Commits

Author SHA1 Message Date
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
Ulrich Drepper 6b6557e8b3 Update.
2003-12-23  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regex_internal.c (re_dfa_add_node): Initialize opt_subexp.
	* posix/regex_internal.h (re_token_type_t): Put OP_DUP_PLUS
	among the tokens, rather than among the epsilon-transiting nodes.
	(re_token_t): Add the opt_subexp flag.
	* posix/regcomp.c (optimize_utf8, calc_first,
	calc_next, calc_epsdest): Don't consider OP_DUP_PLUS.
	(mark_opt_subexp, mark_opt_subexp_iter): New functions.
	(parse_dup_op): Mostly rewritten, lowering OP_DUP_PLUS to
	OP_DUP_ASTERISK and marking optional subexpressions
	as such using mark_opt_subexp.
	* posix/regexec.c (set_regs): Initialize PREV_INDEX_MATCH
	and pass it to update_regs.
	(update_regs): Use the PREV_INDEX_MATCH parameter, together
	with the opt_subexp flag, in order to discard a final empty
	match of a repeated subexpression.
	* posix/BOOST.tests: Adjust test vectors.
	* posix/PCRE.tests: Likewise.
	* posix/rxspencer/tests: Likewise.

2003-12-17  Paolo Bonzini  <bonzini@gnu.org>
2003-12-16  Paolo Bonzini  <bonzini@gnu.org>
2003-12-17  Paolo Bonzini  <bonzini@gnu.org>
2003-12-16  Jakub Jelinek  <jakub@redhat.com>
2003-04-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2003-02-20  Paolo Bonzini  <bonzini@gnu.org>
2003-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2003-01-09  Richard Henderson  <rth@redhat.com>
2003-01-09  Richard Henderson  <rth@redhat.com>
2003-01-03  Paul Eggert  <eggert@twinsun.com>
2003-12-27 23:40:06 +00:00
Ulrich Drepper 8cae99dba5 Update.
2003-12-22  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c: Remove C99-ism.
	* posix/tst-rxspencer.c: Likewise.
	Based on a patch by Alex Davis <alex14641@yahoo.com>.

2002-12-17  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regex_internal.h [!_LIBC] (internal_function): Define.
	(re_string_allocate, re_string_construct, re_string_reconstruct,
	re_string_realloc_buffers, build_wcs_buffer,
	build_wcs_upper_buffer, build_upper_buffer,
	re_string_translate_buffer, re_string_destruct,
	re_string_elem_size_at, re_string_char_size_at,
	re_string_wchar_at, re_string_context_at,
	re_node_set_alloc, re_node_set_init_1
	re_node_set_init_2, re_node_set_init_copy,
	re_node_set_add_intersect, re_node_set_init_union,
	re_node_set_merge, re_node_set_insert
	re_node_set_compare, re_node_set_contains
	re_node_set_remove_at, re_dfa_add_node,
	re_acquire_state, re_acquire_state_context,
	free_state): Add internal_function to declaration.

	* posix/regexec.c (match_ctx_init, match_ctx_clean,
	match_ctx_free, match_ctx_free_subtops,
	match_ctx_add_entry, search_cur_bkref_entry,
	match_ctx_clear_flag, match_ctx_add_subtop,
	match_ctx_add_sublast, sift_ctx_init,
	re_search_internal, re_search_2_stub, re_search_stub,
	re_copy_regs, acquire_init_state_context,
	prune_impossible_nodes, check_matching,
	check_halt_node_context, check_halt_state_context
	update_regs, proceed_next_node, push_fail_stack,
	pop_fail_stack, set_regs, free_fail_stack_return,
	sift_states_iter_mb, sift_states_backward
	update_cur_sifted_state, add_epsilon_src_nodes,
	sub_epsilon_src_nodes, check_dst_limits,
	check_dst_limits_calc_pos, check_subexp_limits,
	sift_states_bkref, clean_state_log_if_need,
	merge_state_array, transit_state,
	check_subexp_matching_top, transit_state_sb,
	transit_state_mb, transit_state_bkref,
	get_subexp, get_subexp_sub, find_subexp_node,
	check_arrival, check_arrival_add_next_nodes,
	find_collation_sequence_value, check_arrival_expand_ecl,
	check_arrival_expand_ecl_sub, expand_bkref_cache,
	build_trtable, check_node_accept_bytes, extend_buffers,
	group_nodes_into_DFAstates, check_node_accept): Likewise.

	* posix/regex_internal.c (re_string_construct_common,
	re_string_skip_chars, create_newstate_common,
	register_state, create_ci_newstate, create_cd_newstate,
	calc_state_hash): Likewise.
	(re_string_peek_byte_case, re_fetch_byte_case): Change
	declaration from ANSI to K&R.

2002-12-16  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regexec.c (build_trtable): Don't allocate the trtable
	until state->word_trtable is known.  Don't hardcode UINT_BITS
	iterations on each bitset item.
2003-12-23 02:29:44 +00:00
Ulrich Drepper 7de661083b (parse_dup_op): Return NULL if dup_elem is NULL, after checking syntax. Optimize. (calc_first): Fix comment.
(duplicate_node, duplicate_node_closure): Revert 2003-11-24 changes.
2003-12-22 06:45:04 +00:00
Ulrich Drepper c0d5034ed1 Update.
* posix/regexec.c (check_arrival): Remove duplicate test.

2003-12-15  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c: Make !RE_ENABLE_I18N work again.
	* posix/regex_internal.c: Likewise.
	* posix/regexec.c: Likewise.
	Patch by Paolo Bonzini.

2003-12-14  Paolo Bonzini  <bonzini@gnu.org>
2003-12-16 06:16:27 +00:00
Ulrich Drepper bb3f4825c4 Update.
2003-11-28  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/x86_64/fpu/libm-test-ulps: Add some more minor changes
	to compensate other setup.

2003-11-27  Andreas Jaeger  <aj@suse.de>

	* sysdeps/x86_64/fpu/libm-test-ulps: Add ulps for new atan2 test.

	* math/libm-test.inc (atan2_test): Add test that run infinitly.
	Reported by "Willus" <etc231etc231@willus.com>.

2003-11-27  Michael Matz  <matz@suse.de>

	* sysdeps/ieee754/dbl-64/mpsqrt.c (fastiroot): Fix 64-bit problem
	with wrong types.

2003-11-28  Jakub Jelinek  <jakub@redhat.com>

	* posix/regexec.c (acquire_init_state_context): Make inline.
	Add always_inline attribute.
	(check_matching): Add BE macro.  Move if (cur_state->has_backref)
	into if (dfa->nbackref).
	(sift_states_backward): Fix comment.
	(transit_state): Add BE macro.  Move if (next_state->has_backref)
	into if (dfa->nbackref && next_state).  Don't check for next_state
	!= NULL twice.
	* posix/regcomp.c (peek_token): Use opr.ctx_type instead of opr.idx
	for ANCHOR.
	(parse_expression): Only call init_word_char if word context will be
	needed.

	* posix/bug-regex11.c (tests): Add new tests.

	* posix/tst-regex.c: Include getopt.h.
	(timing): New variable.
	(main): Set timing to 1 if --timing argument is present.
	Add 2 new tests.
	(run_test, run_test_backwards): Handle timing.

2003-11-27  Jakub Jelinek  <jakub@redhat.com>

	* posix/regex_internal.h (re_string_t): Remove mbs_case field.
	Add offsets, valid_raw_len, raw_len, raw_stop, mbs_allocated and
	offsets_needed fields.  Change icase, is_utf8 and map_notascii
	type from int bitfield to unsigned char.
	(MBS_ALLOCATED, MBS_CASE_ALLOCATED): Remove.
	(build_wcs_upper_buffer): Change prototype to return int.
	(re_string_peek_byte_case, re_string_fetch_byte_case): Remove
	defines, add prototypes.
	* posix/regex_internal.c (re_string_allocate): Don't initialize
	stop here.  Don't initialize mbs_case.  Set valid_raw_len.
	Use mbs_allocated instead of MBS_* macros.
	(re_string_construct): Don't initialize stop and valid_len here.
	Don't initialize mbs_case.  Use mbs_allocated instead of MBS_*
	macros.  Reallocate buffers if build_wcs_upper_buffer converted
	too few bytes.  Set valid_len to bufs_len only for single byte
	no translation and set in that case valid_raw_len as well.
	(re_string_realloc_buffers): Reallocate offsets if not NULL.
	Use mbs_allocated instead of MBS_ALLOCATED.  Don't reallocate
	mbs_case.
	(re_string_construct_common): Initialize raw_len, mbs_allocated,
	stop and raw_stop.
	(build_wcs_buffer): Apply pstr->trans before mbrtowc instead of
	after it.  Set valid_raw_len.  Don't set mbs_case.
	(build_wcs_upper_buffer): Return REG_NOERROR or REG_ESPACE.
	Only use the fast path if !pstr->offsets_needed.  Apply pstr->trans
	before mbrtowc instead of after it.  If upper case character
	uses different number of bytes than lower case, goto to the
	slow path.  Don't call towupper unnecessarily twice.  Set
	valid_raw_len as well.  Handle in the slow path the case if
	lower and upper case use different number of characters.
	Don't set mbs_case.
	(re_string_skip_chars): Use valid_raw_len instead of valid_len.
	(build_upper_buffer): Don't set mbs_case.  Add BE macro.  Set
	valid_raw_len.
	(re_string_translate_buffer): Set mbs instead of mbs_case.  Set
	valid_raw_len.
	(re_string_reconstruct): Use raw_len/raw_stop to initialize
	len/stop.  Clear valid_raw_len and offsets_needed when clearing
	valid_len.  Use mbs_allocated instead of MBS_* macros.
	Check original offset against valid_raw_len instead of valid_len.
	Remove mbs_case handling.  Adjust valid_raw_len together with
	valid_len.  If is_utf8 and looking for tip context, apply
	pstr->trans first.  If buffers start with partial multi-byte
	character, initialize mbs array as well if mbs_allocated.
	Check return value of build_wcs_upper_buffer.
	(re_string_peek_byte_case): New function.
	(re_string_fetch_byte_case): New function.
	(re_string_destruct): Use mbs_allocated instead of MBS_ALLOCATED.
	Don't free mbs_case.  Free offsets.
	* posix/regcomp.c (init_dfa): Only check if charset name is UTF-8
	if mb_cur_max == 6.
	* posix/regexec.c (re_search_internal): Initialize input.raw_stop
	as well.  Use valid_raw_len instead of valid_len when looking
	through fastmap.  Adjust registers through input.offsets.
	(extend_buffers): Allow build_wcs_upper_buffer to fail.
	* posix/bug-regex18.c (tests): Enable #ifdefed out tests.  Add new
	tests.
2003-11-29 06:13:09 +00:00
Ulrich Drepper 97fd3a3003 Update.
2003-11-25  Ulrich Drepper  <drepper@redhat.com>

	* posix/runptests.c (main): Make errors fatal.
	* posix/PTESTS: One test in GA135 and GA136 check functionality
	which seems not guaranteed.

2003-11-25  Jakub Jelinek  <jakub@redhat.com>

	* posix/regexec.c (re_search_internal): If prune_impossible_nodes
	returned REG_NOMATCH, set match_last to -1.  Don't initialize
	pmatch[0] needlessly.  Fix comment.
	(prune_impossible_nodes): Don't segfault on NULL state_log entry.
	(set_regs): Fix comment.
	* posix/regcomp.c (parse_bracket_exp): Only set has_plural_match
	if adding both SIMPLE_BRACKET and COMPLEX_BRACKET.
	(build_charclass_op): Set has_plural_match if adding both
	SIMPLE_BRACKET and COMPLEX_BRACKET.
	* posix/bug-regex11.c (tests): Fix register values for one commented
	out test.  Add new tests.

	* posix/regex_internal.c (re_string_allocate): Make sure init_len
	is at least dfa->mb_cur_max.
	(re_string_reconstruct): If is_utf8, don't fall back into
	re_string_skip_chars just because idx points into a middle of
	valid UTF-8 character.  Instead, set the wcs bytes which correspond
	to the partial character bytes to WEOF.
	* posix/regexec.c (re_search_internal): Allocate input.bufs_len + 1
	instead of dfa->nodes_len + 1 state_log entries initially.
	* posix/bug-regex20.c (main): Uncomment backwards case insensitive
	tests.
2003-11-26 03:24:15 +00:00
Ulrich Drepper 65e6becf5b Update.
2003-11-24  Jakub Jelinek  <jakub@redhat.com>

	* posix/regex_internal.h (re_token_t): Add word_char bit.  Add
	comment.
	(re_dfa_t): Add sb_char field.
	(bitset_mask): New function.
	* posix/regcomp.c (free_dfa_content): Free sb_char.
	(init_dfa): Don't initialize word_char unnecessarily.
	Initialize sb_char.
	(duplicate_node): Don't duplicate !word_char CHARACTERs with
	NEXT_WORD_CONSTRAINT constraint or word_char CHARACTERs with
	NEXT_NOTWORD_CONSTRAINT.  Return -1 in *new_idx instead.
	(duplicate_node_closure): Handle clone_dest == -1 from
	duplicate_node.
	(peek_token): Initialize word_char bit.
	(parse_expression, parse_dup_op): Add comments.
	(parse_bracket_exp): Don't set bitmask bits for multi-byte char
	starting bytes here at the beginning.  Mask off the bits right
	before creating SIMPLE_BRACKET.
	(build_charclass_op): Likewise.
	* posix/regexec.c (group_nodes_into_DFAstates) <case OP_PERIOD>: Only
	set accept bits for single-byte characters.
	(group_nodes_into_DFAstates): Don't rely on characters 0 .. 127
	being single byte encoded and the rest multi-byte.
	* posix/bug-regex19.c (tests): Add new tests.
	(do_mb_tests): Initialize t to *test.
	(main): Fail even on do_mb_tests errors.
2003-11-24 19:30:51 +00:00
Ulrich Drepper 951d640823 Update.
* posix/regexec.c: Correct several memory allocation problems.
	Add more BE.
	* posix/regex_internal.c: Likewise.
	* posix/regcomp.c: Likewise.
2003-11-23 19:21:23 +00:00
Ulrich Drepper c5c9c929bf Update.
* posix/regcomp.c (duplicate_node): Remove unnecessary local variable.

	* posix/regcomp.c (re_dfa_add_tree_node): Make fourth parameter a
	pointer.  Adjust callers.
2003-11-22 00:00:56 +00:00
Ulrich Drepper f0d77aa8af Update.
2003-11-21  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c (fetch_token): Change interface to match
	peek_token.  This avoid some copying and reduces code size.
2003-11-21 23:42:18 +00:00
Ulrich Drepper ee70274a21 Update.
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
2003-11-19 19:37:31 +00:00
Ulrich Drepper ad7f28c29d Update.
* posix/regex_internal.h (re_token_type_t): Remove unused ALT,
	END_OF_RE_TOKEN_T and SUBEXP.  Reorder values.  Add OP_UTF8_PERIOD
	and EPSILON_BIT.
	(IS_EPSILON_NODE): Just test if EPSILON_BIT is set.
	(ACCEPT_MB_NODE): Return 1 for OP_UTF8_PERIOD as well.
	* posix/regex_internal.c (create_ci_newstate, create_cd_newstate):
	Handle OP_UTF8_PERIOD.
	(re_string_reconstruct): Set valid_len for single byte char searching
	with no translation and case sensitivity.
	* posix/regcomp.c (re_compile_fastmap_iter, calc_first): Handle
	OP_UTF8_PERIOD.
	(re_compile_internal): Don't call optimize_utf8 if preg->translate
	!= NULL.
	(optimize_utf8): Remove BACK_SLASH case.
	Transform OP_PERIOD into OP_UTF8_PERIOD if the searching can be
	optimized.
	(parse_bracket_exp): Don't create SIMPLE_BRACKET if it doesn't have
	any bits set and COMPLEX_BRACKET is used.
	* posix/regexec.c (transit_state_mb): Fix comment typo.
	(group_nodes_into_DFAstates, check_node_accept): Handle
	OP_UTF8_PERIOD.
	(check_node_accept_bytes): Likewise.  Reorder slightly so that
	re_string_char_size_at and re_string_elem_size_at are called
	only when needed.
	* posix/bug-regex20.c (BRE, ERE): Define.
	(tests): Use them to make lines shorter.  Expect . to be
	optimized.  Add lots of new tests.
	(main): Run (ATM just case sensitive) test with backwards searching
	as well.

2003-11-18  Jakub Jelinek  <jakub@redhat.com>
2003-11-18 23:40:59 +00:00
Ulrich Drepper 5f93cd52f6 Update.
2003-11-17  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (optimize_utf8): Optimize multi-byte chars as
	well.
	* posix/bug-regex20.c (tests): Add new tests.  Multi-byte char
	followed by dup operator is expected to be optimized.

	* posix/regexec.c (check_node_accept_bytes): Move nrules and j
	variables to the block where they are only used, initialize
	nrules only immediately before using it.

2003-11-15  Andreas Jaeger  <aj@suse.de>

	* sysdeps/x86_64/fpu/s_scalbnl.S: New file.
	* sysdeps/x86_64/fpu/s_truncl.S: New file.
	* sysdeps/x86_64/fpu/s_nearbyintl.S: New file.
	* sysdeps/x86_64/fpu/s_floorl.S: New file.
	* sysdeps/x86_64/fpu/s_ilogbl.S: New file.
	* sysdeps/x86_64/fpu/e_remainderl.S: New file.

	* math/libm-test.inc (floor_test): Test also 0.25.
	(ceil_test): Test -0.25.
2003-11-18 07:25:02 +00:00
Ulrich Drepper f0c7c524bb Update.
* posix/regex_internal.h: Add forward declaration of re_dfa_t.
	Replace last two parameters of re_string_allocate and
	re_string_construct with pointer to DFA.
	(re_dfa_t): Add map_notascii field.
	* posix/regcomp.c (re_compile_internal): Add call of
	re_string_construct.
	(init_dfa): Initialize mpa_notascii.
	* posix/regex_internal.c: Adjust definitions of re_string_allocate
	and re_string_construct.
	Pass DFA to re_string_construct.  Adjust definition.  Initialize
	map_notascii field.
	(build_wcs_upper_buffer): If map_notascii is zero use simplfied
	method to map ASCII values to upper case.
	* posix/regex.c: Include localeinfo.h.
	* posix/regexec.c: Adjust call of re_string_allocate.

	* locale/langinfo.h: Add _NL_CTYPE_MAP_TO_NONASCII.
	* locale/localeinfo.h (LIMAGIC): Change value.
	* locale/categories.def. Add entry for _NL_CTYPE_MAP_TO_NONASCII.
	* locale/C-ctype.h: Likewise.
	* locale/programs/ld-ctype.c: Compute whether any mapping maps from
	ASCII to non-ASCII value.  Write out that value.
2003-11-16 07:14:28 +00:00
Ulrich Drepper a8067e8f89 Update.
2003-11-13  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (optimize_utf8): Optimize even if SIMPLE_BRACKET
	with no bits set for >= 0x80 chars is seen.
	* posix/bug-regex20.c (tests): Add new tests.  Expect [ABC] to be
	optimized.
	(main): Run all tests with RE_ICASE as well.
2003-11-13 21:23:11 +00:00
Ulrich Drepper 78d8b07a44 Update.
* posix/regcomp.c (parse_bracket_exp): Don't check for range if
	this is no option given the first token.

	* posix/regcomp.c (parse_bracket_exp): Fix test for EOS after
	hyphen in range expression.  Return EBRACK in this case.

	* posix/regcomp.c (parse_bracket_element): Reject hyphens unless
	we expect them or it's the last element in the bracket expression.
	Indicated by new parameter.  Adjust all callers.

	Prettier error messages.
2003-11-13 20:04:16 +00:00
Ulrich Drepper deeb4aae69 (parse_dup_op): Fail with REG_BADBR is first number in {,} expression is larger. 2003-11-13 17:25:46 +00:00
Ulrich Drepper c34bfc8d37 Update.
2003-11-13  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c (parse_expression): In BRE consecutive
	duplications are not allowed.
2003-11-13 09:54:39 +00:00
Ulrich Drepper f6953f16bb Update.
* posix/regcomp.c (parse_bracket_exp): If end of expression is
	seen, return EBRACK error, not BADPAT.
2003-11-13 06:38:30 +00:00
Ulrich Drepper 06e8303a28 Update.
* posix/regcomp.c (parse_expression): If token is OP_OPEN_DUP_NUM
	and RE_CONTEXT_INVALID_DUP syntax flag is set, fail.
	* posix/regex.h (RE_CONTEXT_INVALUD_OPS): New macro.
	(RE_SYNTAX_POSIX_BASIC): Use RE_CONTEXT_INVALUD_OPS.

	* posix/regcomp.c (parse_sub_exp): In case of not-matching ( )
	return REG_EPAREN.
2003-11-13 06:01:46 +00:00
Ulrich Drepper 14744156b9 Update.
* 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>
2003-11-12 19:09:20 +00:00
Ulrich Drepper 3c0fb5745f Update.
2003-11-12  Jakub Jelinek  <jakub@redhat.com>

	* io/ftw.c (NFTW_NEW_NAME, NFTW_OLD_NAME): Add prototypes.

2003-11-12  Jakub Jelinek  <jakub@redhat.com>

	* posix/tst-regex.c (umemlen): New variable.
	(test_expr): Add expectedicase argument.  Test case insensitive
	searches as well as backwards searches (case sensitive and
	insensitive) too.
	(run_test): Add icase argument.  Use it to compute regcomp flags.
	(run_test_backwards): New function.
	(main): Cast read to size_t to avoid warning.  Set umemlen.
	Add expectedicase arguments to test_expr.
	* posix/regex_internal.c (re_string_reconstruct): If is_utf8,
	find previous character by walking back instead of converting
	all chars from beginning.

2003-11-12  Jakub Jelinek  <jakub@redhat.com>

	* posix/regex_internal.h (struct re_string_t): Add is_utf8
	and mb_cur_max fields.
	(struct re_dfa_t): Likewise.  Reorder fields to make structure
	smaller on 64-bit arches.
	(re_string_allocate, re_string_construct): Add mb_cur_max and
	is_utf8 arguments.
	(re_string_char_size_at, re_string_wchar_at): Use pstr->mb_cur_max
	instead of MB_CUR_MAX.
	* posix/regcomp.c (re_compile_fastmap_iter): Use dfa->mb_cur_max
	instead of MB_CUR_MAX.
	(re_compile_internal): Pass new arguments to re_string_construct.
	(init_dfa): Initialize mb_cur_max and is_utf8 fields.
	(peek_token, peek_token_bracket): Use input->mb_cur_max instead
	of MB_CUR_MAX.
	(parse_expression, parse_bracket_exp, parse_charclass_op): Use
	dfa->mb_cur_max instead of MB_CUR_MAX.
	* posix/regex_internal.c (re_string_construct_common): Add
	mb_cur_max and is_utf8 arguments.  Initialize fields with them.
	(re_string_allocate, re_string_construct): Add mb_cur_max and
	is_utf8 arguments, pass them to re_string_construct_common.
	Use mb_cur_max instead of MB_CUR_MAX.
	(re_string_realloc_buffers): Use pstr->mb_cur_max instead of
	MB_CUR_MAX.
	(re_string_reconstruct): Likewise.
	(re_string_context_at): Use input->mb_cur_max instead of
	MB_CUR_MAX.
	(create_ci_newstate, create_cd_newstate): Use dfa->mb_cur_max
	instead of MB_CUR_MAX.
	* posix/regexec.c (re_search_internal): Likewise.
	Pass new arguments to re_string_allocate.
	(check_matching, transit_state_sb): Use dfa->mb_cur_max instead of
	MB_CUR_MAX.
	(extend_buffers): Use pstr->mb_cur_max instead of MB_CUR_MAX.

2003-11-12  Jakub Jelinek  <jakub@redhat.com>

	* posix/Makefile (tests): Add bug-regex19.
	(bug-regex19-ENV): Add LOCPATH.
	* posix/bug-regex19.c: New test.
2003-11-12 17:47:46 +00:00
Ulrich Drepper 74e12fbc03 Update.
2003-11-11  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (re_compile_fastmap_iter): Handle RE_ICASE
	with MB_CUR_MAX > 1 locales in the fastmap.

2003-11-11  Jakub Jelinek  <jakub@redhat.com>

	* posix/regex_internal.c (build_wcs_buffer): Fix comment typo.
	(build_wcs_upper_buffer): Likewise.  Use towupper for wchar_t instead
	of toupper.
	* posix/Makefile (tests): Add bug-regex17 and bug-regex18.
	(bug-regex17-ENV, bug-regex18-ENV): Add LOCPATH.
	* posix/bug-regex18.c: New test.
2003-11-12 06:13:10 +00:00
Ulrich Drepper 1769a73f0b Update.
2003-10-12  Carlos O'Donell  <carlos@baldric.uwo.ca>

	* sysdeps/hppa/sysdep.h: Undef JUMPTARGET before use.
	* sysdeps/unix/sysv/linux/hppa/sysdep.h: Define PSEUDO_ERRVAL,
	SYSCALL_ERROR_LABEL under all conditions, INTERNAL_SYSCALL_DECL,
	INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO, INTERNAL_SYSCALL,
	and undef JUMPTARGET before use.
	[PIC]: Save pic register around syscall.
	* sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall):
	Cleanup asm statment.

2003-10-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/unix/sysv/linux/sh/sysdep.h (DO_CALL): Add SYSCALL_INST_PAD
	after trapa instruction.
2003-10-15 05:47:36 +00:00
Ulrich Drepper 134abcb5b9 Update.
2003-09-26  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regcomp.c (parse_sub_exp): Pass RE_CARET_ANCHORS_HERE
	for the first token in a subexpression as well.

2003-10-02  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (peek_token): Add 2003-09-20 changes for anchor
	handling again.
	(parse_reg_exp): Likewise.
	* posix/regex.h (RE_CARET_ANCHORS_HERE): Define.

	* posix/bug-regex11.c (tests): Add new tests.
	* posix/bug-regex12.c (tests): Add new test.
2003-10-02 22:41:11 +00:00
Ulrich Drepper a0788ec48c Update.
* posix/regcomp.c (peek_token): Remove recent changes for anchor
	handling again.
	(parse_reg_exp): Likewise.
	* posix/regex.h: Remove RE_CARET_ANCHORS_HERE.

	(peek_token): Accept \s and \S as OP_SPACE and OP_NOTSPACE.
	(parse_expression): Replace build_word_op with
2003-09-25 20:48:59 +00:00
Ulrich Drepper e2b6bfa339 Update.
* posix/regcomp.c (build_word_op): Rename like...
	(build_charclass_op): ...this.  Accept two extra parameters,
	CLASS_NAME and EXTRA.  Add EXTRA to the result, not only _.
	(peek_token): accept \s and \S as OP_SPACE and OP_NOTSPACE.
	(parse_expression): replace build_word_op with
	build_charclass_op, add new arguments, accept OP_SPACE
	and OP_NOTSPACE.
	* posix/regex_internal.h (re_token_type_t): Add OP_SPACE
	and OP_NOTSPACE.
2003-09-23 05:43:03 +00:00
Ulrich Drepper ce85933261 Upate.
2003-09-20  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regcomp.c (peek_token): Don't look back for ( or |
	to check whether to treat a caret as special.  It fails
	for the (extended) regex \(^.
	(parse, parse_reg_exp): Pass RE_CARET_ANCHORS_HERE to fetch_token.
	* posix/regex.h: Define RE_CARET_ANCHORS_HERE.

	* posix/regexec.c: Check out of bounds value before shifting.

	* posix/regex_internal.h: Define __attribute for non-gcc.
2003-09-23 05:33:43 +00:00
Ulrich Drepper f23b30e23b Update.
2003-06-17  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (build_word_op): Use alnum instead of alpha class.
2003-06-17 22:40:05 +00:00
Ulrich Drepper 2533775393 Update.
2003-06-13  Ulrich Drepper  <drepper@redhat.com>

	Fixing gcc 3.3 warnings, part II.
	* argp/argp-help.c (hol_entry_long_iterate): Always inline.
	* elf/dl-load.c (cache_rpath): Don't inline.
	* iconvdata/cns11642l2.h: Always inline all functions.
	* iconvdata/iso-ir-165.h: Likewise.
	* locale/Makefile (aux): Add coll-lookup.
	* locale/coll-lookup.c: New file.
	* locale/coll-lookup.h (collidx_table_lookup): Do not define here.
	(collseq_table_lookup): Likewise.
	* locale/weightwc.h: Adjust collidx_table_lookup calls for name change.
	* posix/fnmatch_loop.c: Adjust collseq_table_lookup calls for name
	change.
	* posix/regcomp.c: Likewise.
	* posix/regexec.c: Likewise.
	* locale/programs/3level.h (*_get): Always inline.
	* locale/programs/locfile.h: Move definition of handle_copy to...
	* locale/programs/locfile.c: ...here.
	* locale/programs/ld-collate.c (obstack_int32_grow): Always inline.
	(obstack_int32_grow_fast): Likewise.
	(utf8_encode): Likewise.
	(find_element): Avoid aliasing problems.
	(insert_value): Likewise.
	(collate_read): Likewise.
	* nss/getent.c (print_hosts): Don't inline
	(print_networks): Likewise.
	(print_shadow): Likewise.
	(build_doc): Likewise.
	* nss/nss_files/files-parse.c [ENTDATA] (parser_stclass): Don't
	inline.
	* posix/regcomp.c (re_set_fastmap): Always inline.
	(seek_collating_symbol_entry): Likewise.
	(lookup_collation_sequence_value): Likewise.
	(build_range_exp): Likewise.
	(build_collating_symbol): Likewise.
	* posix/regexec.c (acquire_init_state_context): Don't inline.
	(clean_state_log_if_need): Likewise.
	* resolv/res_send.c (eConsIovec): Rewrite to not return struct and
	adjust all callers.
	(evConsTime): Likewise.
	(evAddTime): Likewise.
	(evSubTime): Likewise.
	(evNowTime): Likewise.
	(evTimeSpec): Removed.
	(__libc_res_nsend): Avoid aliasing problem.
	* sysdeps/unix/sysv/linux/ifreq.h: Move old_siocgifconf definition to..
	* sysdeps/unix/sysv/linux/ifreq.c: ...here.
	* sysdeps/unix/sysv/linux/i386/dl-procinfo.h (_dl_string_hwcap):
	Always inline.
	(_dl_string_platform): Likewise.
	* wctype/wchar-lookup.h (wctype_table_lookup): Always inline.
	(wcwidth_table_lookup): Likewise.
	(wctrans_table_lookup): Likewise.

	* sysdeps/unix/sysv/linux/sys/epoll.h: Include <stdint.h>.
2003-06-13 21:05:42 +00:00
Ulrich Drepper 66b110e855 Update.
2003-06-12  H.J. Lu  <hongjiu.lu@intel.com>

	* posix/transbug.c (run_test): Return 1 for failure.
	(do_test): Compare only if run_test is successful.

2003-06-12  Simon Josefsson  <jas@extundo.com>

	* argp/argp.h [!__THROW]: Define if undefined.

	* posix/transbug.c: New file.
	* inet/Makefile (aux): Add check_pf.
	* include/ifaddrs.h: Add prototype for __check_pf.
	* sysdeps/generic/check_pf.c: New file.
	* sysdeps/unix/sysv/linux/check_pf.c: New file.
2003-06-12 18:29:52 +00:00
Ulrich Drepper 54e1cabce6 Update.
* inet/rcmd.c (rresvport_af): Avoid using invliad values.  Wrap
	around in search if port IPPORT_RESERVED/2 has been test.

2002-02-20  Paolo Bonzini <bonzini@gnu.org>

	* posix/regcomp.c: Remove inclusions.
	* posix/regexec.c: Likewise.
	* posix/regex_internal.c: Likewise.
	* posix/regex_internal.h: Add inclusions here.
	* posix/regex.c: Only include sys/types.h before regex.h.  Include
	regex_internal.h here.  Include regex_internal.c before regcomp.c
	and regexec.c (might expose more opportunities to the C compiler).

	* posix/regcomp.c (parse_expression): Fix construct rejected by SGI CC.

	* posix/regex_internal.h [!_LIBC] (__mempcpy): Fix typo.
	[!_LIBC] (__wcrtomb): New definition.
	[!_LIBC]: Conditionalize enabling of I18N on HAVE_WCSCOLL and
	HAVE_LOCALE_H as well.

2003-02-20  Ulrich Drepper  <drepper@redhat.com>
2003-02-21 01:52:32 +00:00
Ulrich Drepper 7b7b9e70ea Update.
* posix/regcomp.c (parse_bracket_exp): If build_charclass fails,
	set *err to the returned error, not to REG_ESPACE unconditionally.
	(build_word_op): Likewise.
	* posix/Makefile (tests): Add bug-regex16.
	* posix/bug-regex16.c: New test.

2003-01-16  Jakub Jelinek  <jakub@redhat.com>
2003-01-16 19:20:36 +00:00
Ulrich Drepper ca3c505e44 (re_compile_internal): If clearing buffer, clear allocated too. 2003-01-16 17:27:50 +00:00
Ulrich Drepper a7d5c29129 Update.
2002-12-17  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp.c (free_workarea_compile): Free the new member
	ORG_INDICES.
	(analyze): Initialize ORG_INDICES.
	(duplicate_node_closure): Search for a existing node, which is
	duplicated from the node ORG_DEST and satisfies the constraint
	CONSTRAINT.  And use it to avoid inifimite loop.
	(search_duplicated_node): New function.
	(duplicate_node): Store the index of the original node.
	* posix/regex_internal.c (re_dfa_add_node): Realloc ORG_INDICES
	if needed.
	* posix/regex_internal.h (re_dfa_t): Add new members.
2002-12-17 10:58:04 +00:00
Roland McGrath 83b038f253 * posix/regex_internal.c (re_string_context_at): Guard wide char
code with #ifdef RE_ENABLE_I18N.

2002-11-22  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regcomp.c (regcomp): __re_compile_fastmap -> re_compile_fastmap
2002-12-13 23:45:32 +00:00
Ulrich Drepper 6291ee3c5f Update.
2002-11-27  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp.c (parse_expression): Set the bit since the back
	reference is used in the regular expression.
	* posix/regex_internal.c (re_node_set_init_1): Make it clean in case
	of malloc failure.
	(re_node_set_init_copy): Likewise.
	* posix/regex_internal.h (state_array_t): New structure.
	(re_sub_match_last_t): Likewise.
	(re_sub_match_top_t): Likewise.
	(re_match_context_t): Add new members.
	(re_dfa_t): Likewise.
	* posix/regexec.c (re_search_internal): Invoke prune_impossible_nodes
	to check the matching is really correct, and retry if failed.
	Move the routin pruning the impossible nodes from here, ...
	(prune_impossible_nodes): To this function.
	(check_matching): Invoke check_subexp_matching_top, and replace
	redundant checking with transit_state_bkref invocation.
	(proceed_next_node): Replace strncmp with memcmp.  Reported by
	Paolo Bonzini  <bonzini@gnu.org>.
	(update_cur_sifted_state): Remove search_subexp invocation.
	(search_subexp): Remove this function.
	(check_dst_limits_calc_pos): Use search_cur_bkref_entry for
	optimization.
	(sift_states_bkref): Use search_cur_bkref_entry for optimization.
	Remove unused invocation of match_ctx_add_entry.
	(transit_state): Invoke check_subexp_matching_top.
	(check_subexp_matching_top): New function.
	(transit_state_bkref): Remove unused array.
	Merge transit_state_bkref_loop.
	(transit_state_bkref_loop): Use get_subexp instead of
	sift_states_backward.  Use search_cur_bkref_entry for optimization.
	Merge this function to transit_state_bkref.
	(get_subexp): New function.
	(get_subexp_sub): Likewise.
	(find_subexp_node): Likewise.
	(check_arrival): Likewise.
	(check_arrival_expand_ecl): Likewise.
	(check_arrival_expand_ecl_sub): Likewise.
	(expand_bkref_cache): Likewise.
	(match_ctx_init): Initialize new members.
	(match_ctx_clean): New function.
	(match_ctx_free): Release new members.
	(match_ctx_free_subtops): New function.
	(match_ctx_add_entry): Fix indent.
	(search_cur_bkref_entry): New function.
	(match_ctx_add_subtop): Likewise.
	(match_ctx_add_sublast): Likewise.
2002-11-27 23:00:16 +00:00
Ulrich Drepper 15a7d175bc Update.
2002-11-06  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c: Use tabs instead of spaces.
	* posix/regexec.c: Likewise.
	* posix/regex_internal.h: Likewise.

	* posix/regcomp.c (re_compile_fastmap_iter): Use __wcrtomb not wctomb.
2002-11-06 20:36:47 +00:00
Ulrich Drepper 1b2c262835 Update.
2002-11-06  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (re_compile_pattern): Don't set regs_allocated
	here.
	(regcomp): Don't set can_be_null here.
	(re_comp): Clear whole re_comp_buf with the exception of fastmap.
	(re_compile_internal): Clear can_be_null, set regs_allocated.

	* posix/regcomp.c (re_set_fastmap): New function.
	(re_compile_fastmap_iter): Use it.  Remove redundant type ==
	COMPLEX_BRACKET check.
	* posix/regexec.c (re_search_internal): Optimize searching with
	fastmap.  Call re_string_reconstruct even if match_first is
	smaller than raw_mbs_idx.

2002-11-06  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp (free_dfa_content): Use free_state.
	* posix/regex_internal.c (re_string_realloc_buffers): Don't edit
	pointers in case that realloc failed.
	(re_node_set_merge): Likewise.
	(register_state): Likewise.
	(create_newstate_common): Invoke memory release functions in case of
	error conditions.
	(create_ci_newstate): Likewise.
	(create_cd_newstate): Likewise.
	(free_state): New function.
	* posix/regexec.c (re_search_internal): Invoke memory release
	functions in case of error conditions.
	(sift_states_backward): Likewise.
	(merge_state_array): Likewise.
	(add_epsilon_src_nodes): Likewise.
	(sub_epsilon_src_nodes): Likewise.
	(search_subexp): Likewise.
	(sift_states_bkref): Likewise.
	(transit_state_sb): Likewise.
	(transit_state_mb): Likewise.
	(transit_state_bkref_loop): Likewise.
	(group_nodes_into_DFAstates): Likewise.
	(push_fail_stack): Don't edit pointers in case that realloc failed.
	(extend_buffers): Likewise.
	(match_ctx_add_entry): Likewise.
2002-11-06 19:57:50 +00:00
Ulrich Drepper b14993a235 (free_dfa_content): Use free_state. 2002-11-06 19:23:35 +00:00
Ulrich Drepper 71ccd3308c Update.
2002-11-06  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c (regcomp): __re_compile_fastmap can never fail.
	If re_compile_internal failed free fastmap buffer.
	(free_dfa_content): Broken out of regfree function.  Frees all dfa
	related data.
	(regfree): Add free_dfa_content.
	(re_compile_internal): If any of the called functions fails free
	all dfa related memory.
2002-11-06 08:34:35 +00:00
Ulrich Drepper 0c2ee21ca6 Update.
2002-11-05  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c (regcomp): Initialize preg->can_be_null to zero.

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_pread64,
	s_pwrite64, s_ftruncate, s_truncate): Re-add.
2002-11-05 21:06:51 +00:00
Roland McGrath c877418f2e * include/libc-symbols.h (__libc_freeres_fn_section, libc_freeres_fn):
New macros.
	* elf/dl-close.c (free_mem): Use libc_freeres_fn macro, remove
	text_set_element.
	* elf/dl-libc.c (free_mem): Likewise.
	* iconv/gconv_conf.c (free_mem): Likewise.
	* iconv/gconv_db.c (free_mem): Likewise.
	* iconv/gconv_dl.c (free_mem): Likewise.
	* iconv/gconv_cache.c (free_mem): Likewise.
	* intl/finddomain.c (free_mem): Likewise.
	* intl/dcigettext.c (free_mem): Likewise.
	* locale/setlocale.c (free_mem): Likewise.
	* misc/fstab.c (fstab_free): Likewise.
	* nss/nsswitch.c (free_mem): Likewise.
	* posix/regcomp.c (free_mem): Likewise.
	* resolv/gai_misc.c (free_res): Likewise.
	* stdlib/fmtmsg.c (free_mem): Likewise.
	* sunrpc/clnt_perr.c (free_mem): Likewise.
	* sysdeps/generic/setenv.c (free_mem): Likewise.
	* sysdeps/unix/sysv/linux/shm_open.c (freeit): Likewise.
	* sysdeps/pthread/aio_misc.c (free_res): Likewise.
	* time/tzset.c (free_mem): Likewise.
	* malloc/mtrace.c (release_libc_mem): Add __libc_freeres_fn_section.
	* locale/loadarchive.c (_nl_archive_subfreeres): Likewise.
	* malloc/set-freeres.c (__libc_freeres): Likewise.

	* login/getutent.c: Include stdlib.h instead of stddef.h.
	(buffer): Change into pointer to utmp, add libc_freeres_ptr.
	(__getutent): Allocate buffer the first time it is run.
	* login/getutid.c: Include stdlib.h instead of stddef.h.
	(buffer): Change into pointer to utmp, add libc_freeres_ptr.
	(__getutid): Allocate buffer the first time it is run.
	* login/getutline.c: Include stdlib.h instead of stddef.h.
	(buffer): Change into pointer to utmp, add libc_freeres_ptr.
	(__getutline): Allocate buffer the first time it is run.
	* malloc/mtrace.c (malloc_trace_buffer): Change into char *.
	(mtrace): Allocate malloc_trace_buffer.
	* resolv/nsap_addr.c (inet_nsap_ntoa): Decrease size of tmpbuf.
	* resolv/ns_print.c (ns_sprintrrf): Decrease size of t.
	* string/strerror.c: Include libintl.h and errno.h.
	(buf): New variable.
	(strerror): Only allocate buffer if actually needed (unknown error).
	* time/tzfile.c (transitions): Add libc_freeres_ptr.
	(freeres): Remove.

2002-10-25  Jakub Jelinek  <jakub@redhat.com>

	* include/libc-symbols.h (libc_freeres_ptr): New macro.
	* malloc/set-freeres.c (__libc_freeres_ptrs): Define using
	symbol_set_define.
	(__libc_freeres): Free all pointers in that section.
	* Makerules (build-shlib): Add $(LDSEDCMD-$(@F:lib%.so=%).so) to sed
	commands when creating .lds script.
	(LDSEDCMD-c.so): New variable.
	* inet/rcmd.c (ahostbuf): Change into char *.  Add libc_freeres_ptr.
	(rcmd_af): Use strdup to allocate ahostbuf.
	* inet/rexec.c (ahostbuf): Change into char *.  Add libc_freeres_ptr.
	(rexec_af): Use strdup to allocate ahostbuf.
	* stdio-common/reg-printf.c (printf_funcs): Remove.
	(__printf_arginfo_table): Change into printf_arginfo_function **.
	Add libc_freeres_ptr.
	(__register_printf_function): Allocate __printf_arginfo_table
	and __printf_function_table the first time it is called.
	* stdio-common/printf-parse.h (__printf_arginfo_table): Change into
	printf_arginfo_function **.
	(parse_one_spec): Add __builtin_expect.
	* grp/fgetgrent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* inet/getnetgrent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* intl/localealias.c (libc_freeres_ptr): Define if !_LIBC.
	(string_space, map): Add libc_freeres_ptr.
	(free_mem): Remove.
	* misc/efgcvt.c (FCVT_BUFPTR): Add libc_freeres_ptr.
	(free_mem): Remove.
	* misc/mntent.c (getmntent_buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* crypt/md5-crypt.c (libc_freeres_ptr): Define if !_LIBC.
	(buffer): Add libc_freeres_ptr.
	(free_mem): Remove for _LIBC.
	* nss/getXXbyYY.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* nss/getXXent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* pwd/fgetpwent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* resolv/res_hconf.c (ifaddrs): Add libc_freeres_ptr.
	(free_mem): Remove.
	* shadow/fgetspent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* sysdeps/posix/ttyname.c (getttyname_name): Add libc_freeres_ptr.
	(free_mem): Remove.
	* sysdeps/unix/sysv/linux/getsysstats.c (mount_proc): Add
	libc_freeres_ptr.
	(free_mem): Remove.
	* sysdeps/unix/sysv/linux/ttyname.c (getttyname_name, ttyname_buf): Add
	libc_freeres_ptr.
	(free_mem): Remove.

2002-10-30  Jakub Jelinek  <jakub@redhat.com>

	* malloc/obstack.c [_LIBC] (obstack_free): Change into strong_alias
	instead of duplicating the whole function in libc.
2002-11-01 20:44:15 +00:00
Roland McGrath 240e87c230 * posix/regcomp.c (re_comp): Call __regfree on re_comp_buf.
(free_mem): New function.
	* posix/Makefile (tests): Add bug-regex14.  Add bug-regex14-mem
	if not cross compiling.
	(generated): Add bug-regex14-mem and bug-regex14.mtrace.
	(bug-regex14-ENV): Set.
	(bug-regex14-mem): New target.
	* posix/bug-regex14.c: New file.

	* elf/Makefile ($(objpfx)librtld.map): Use temporary file for output
	target, so we don't touch it when the link fails.
2002-10-24 00:22:27 +00:00
Ulrich Drepper 82bbb29edd Update.
2002-10-21  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/Makefile: Add a test case for the bug reported by Aharon
	Robbins <arnold@skeeve.com>.
	* posix/bug-regex13.c: New file.
	* posix/regcomp.c (peek_token_bracket): Skip the byte already read.

2002-10-21  Ulrich Drepper  <drepper@redhat.com>

	* csu/gmon-start.c: Pretty printing.

	* configure.in: Replace obsolete AC_OUTPUT syntax with
	AC_CONFIG_FILES, AC_CONFIG_COMMANDS, and new-type AC_OUTPUT trio.
	* aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDEs for
	* configure.in: Replace AC_FD_CC with AS_MESSAGE_LOG_FD.
	* sysdeps/alpha/elf/configure.in: Likewise.
	* sysdeps/i386/elf/configure.in: Likewise.
	* sysdeps/mach/hurd/configure.in: Likewise.
	* sysdeps/x86_64/elf/configure.in: Likewise.
	* sysdeps/alpha/elf/configure.in: Remove unneeded sinclude statement.
	* sysdeps/generic/configure.in: Likewise.
	* sysdeps/i386/elf/configure.in: Likewise.
	* sysdeps/ia64/elf/configure.in: Likewise.
	* sysdeps/mach/configure.in: Likewise.
	* sysdeps/mach/hurd/configure.in: Likewise.
	* sysdeps/unix/configure.in: Likewise.
	* sysdeps/unix/common/configure.in: Likewise.
	* sysdeps/unix/sysv/aix/configure.in: Likewise.
	* sysdeps/unix/sysv/linux/configure.in: Likewise.
	* sysdeps/unix/sysv/linux/mips/configure.in: Likewise.
	* sysdeps/x86_64/elf/configure.in: Likewise.
2002-10-21 18:19:01 +00:00
Ulrich Drepper 485d775dd5 Update.
2002-10-11  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp.c (re_compile_fastmap_iter): Remove the handling
	OP_CONTEXT_NODE.
	(regfree): Likewise.
	(create_initial_state): Likewise.
	(analyze): Remove the substitutions which became useless.
	(calc_first): Likewise.
	(calc_epsdest): Use edests of OP_BACK_REF in case that it has
	epsilon destination.
	(duplicate_node_closure): New function.
	(duplicate_node): Remove the handling OP_CONTEXT_NODE.
	(calc_inveclosure): Likewise.
	(calc_eclosure): Likewise.
	(calc_eclosure_iter): Invoke duplicate_node_closure instead of
	direct invocation of duplicate_node.
	(parse): Don't use comma operator in the return to avoid compiler
	warning.
	(parse_reg_exp): Likewise.
	(parse_branch): Likewise.
	(parse_expression): Likewise.
	(parse_sub_exp): Likewise.
	(parse_dup_op): Likewise.
	* posix/regex_internal.c (re_dfa_add_node): Remove the substitutions
	which became useless.
	(create_ci_newstate): Remove the handling OP_CONTEXT_NODE.
	(create_cd_newstate): Likewise.
	* posix/regex_internal.h (re_token_type_t): Remove the obsolete type.
	(re_token_t): Likewise.
	(re_dfa_t): Likewise.
	(re_node_set_remove): New macro.
	* posix/regexec.c (check_matching): Remove the handling
	OP_CONTEXT_NODE.
	(check_halt_node_context): Likewise.
	(proceed_next_node): Likewise.
	(pop_fail_stack): Fix the memory leak.
	(set_regs): Likewise.
	(free_fail_stack_return): New function.
	(sift_states_backward): Fix the memory leak.  Remove the handling
	OP_CONTEXT_NODE.
	(update_cur_sifted_state): Append some if clause to avoid redundant
	call.
	(sub_epsilon_src_nodes): Use IS_EPSILON_NODE since it might be a
	back reference.
	(check_dst_limits): Remove the handling OP_CONTEXT_NODE.
	(check_subexp_limits): Likewise.
	(search_subexp): Likewise.
	(sift_states_bkref): Likewise.
	(transit_state_mb): Likewise.
	(transit_state_bkref_loop): Likewise.
	(transit_state_bkref_loop): Likewise.
	(group_nodes_into_DFAstates): Likewise.
	(check_node_accept): Likewise.
	(sift_ctx_init): Add initializing.

2002-10-12  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/sysdep.h (INLINE_SYSCALL): Use
	__builtin_expect.
2002-10-12 08:34:26 +00:00
Ulrich Drepper 0742e48e18 Update.
2002-09-27  Ulrich Drepper  <drepper@redhat.com>

	* locales/zh_TW: Use shorter forms for abday and day.
	Patch by Rex Tsai <chihchun@kalug.linux.org.tw>.
2002-09-28 05:28:44 +00:00
Ulrich Drepper 62439eac8b Wrap #include wchar.h and wctype.h in #if. (build_range_exp): Add castings to strlen invocations. (build_collating_symbol): Restore the type of characters from "char" to "unsigned char", and supplement castings. (build_collating_symbol): Likewise. (build_equiv_class): Likewise. (build_charclass): Likewise. (seek_collating_symbol_entry): Likewise. (parse_bracket_exp): Likewise. (build_word_op): Supplement a casting. 2002-09-10 17:39:58 +00:00
Ulrich Drepper 75e4a28221 (regcomp): Append "__restrict" modifier to avoid warnings of some compilers. (build_collating_symbol): Change the type of characters from "unsigned char"
to "char", and append a cast to "char*" pointer in array subscript. (build_collating_symbol): Likewise. (build_equiv_class): Likewise. (build_charclass): Likewise. (re_compile_pattern): Remove incorrect cast. (re_compile_fastmap_iter): Change the type of characters from "unsigned char"
to "char", and append a cast to "char*" pointer in array subscript. (parse_bracket_exp): Likewise.
2002-09-05 03:33:58 +00:00
Ulrich Drepper 9b88fc1667 (parse_reg_exp): If '|' is immediately followed by another '|', end of regex or enclosing ')', clear branch. 2002-08-12 19:18:45 +00:00
Ulrich Drepper ac3d553b8b Update.
2002-07-27  Ulrich Drepper  <drepper@redhat.com>

	* iconvdata/Makefile (CPPFLAGS): Add NOT_IN_libc.

	* iconv/iconv_prog.c (main): Improve error message for the cases
	where -t and/or -f parameter are missing.

2002-07-10  Stepan Kasal  <kasal@math.cas.cz>

	* posix/regexec.c (re_match): Reorganize to remove duplicate code.
	(re_search): Likewise.
	(re_match_2): Likewise.
	(re_search_2): Likewise.
	(re_search_stub): New function.
	(re_search_2_stub): New function.
	* regcomp.c (re_compile_pattern): Typo in a comment fixed.

2002-07-10  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regex_internal.h: Add new member STOP to struct re_string_t.
	(re_string_eoi): Use STOP instead of LEN.
	* posix/regex_internal.c (re_string_allocate): Initialize pstr->len.
	(re_string_construct): Likewise.
	(re_string_reconstruct): Adjust pstr->stop like pstr->len.
	* posix/regexec.c (re_search_internal): Add a new argument STOP
	so that it can handle the argument STOP of re_search_2 and re_match_2
	correctly.
	(regexec): Adapt to new I/F of re_search_internal.
	(re_search_stub): Likewise.
2002-07-27 08:20:17 +00:00
Ulrich Drepper 81c64d407c Update.
2002-07-10  Ulrich Drepper  <drepper@redhat.com>
	* Versions.def [libpthread]: Add GLIBC_2.2.6.
	* posix/Versions [libc] (GLIBC_2.2.6): Add __nanosleep.

2002-07-06  Bruno Haible  <bruno@clisp.org>

	* sysdeps/unix/sysv/sysv4/bits/sigset.h (__NSSBITS): Correct value.
	* sysdeps/unix/sysv/linux/bits/statvfs.h (ST_NODIRATIME): Set to 2048.
2002-07-10 23:09:16 +00:00
Ulrich Drepper c0a0f9a32c Update.
2002-05-21  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regex.c: Define `inline' as a macro into nothing for the
	compilers which lack the keyword.
	* posix/regex.h: (RE_SYNTAX_GNU_AWK): Remove RE_CONTEXT_INVALID_OPS
	for the compatibility of gawk.
	* posix/regcomp.c: Add fake implementation of isblank() for the
	environments which lack the function.
	Don't use free_charset() in case of non-i18n envs.
	(build_range_exp): Don't use i18n related code in case of non-i18n
	envs.
	(build_collating_symbol): Likewise.
	(build_equiv_class): Likewise.
	(build_charclass): Likewise.
	(re_compile_fastmap_iter): Likewise.
	(parse_bracket_exp): Likewise.
	(build_word_op): Likewise.
	(regfree): Don't use free_charset() in case of non-i18n envs.
	* posix/regex_internal.h: Remove COMPLEX_BRACKET from
	re_token_type_t in case of non-i18n envs.
	Don't define re_charset_t in case of non-i18n envs.
	Change the type of wcs of re_string_t from wchar_t to wint_t,
	since we store also WEOF.
	* posix/regex_internal.c: (re_string_realloc_buffers): Change
	the type of wcs of re_string_t from wchar_t to wint_t.
	(re_string_reconstruct): Likewise.
	(create_ci_newstate): Don't use i18n related code in case of
	non-i18n envs.
	(create_cd_newstate): Likewise.

2002-05-24  Ulrich Drepper  <drepper@redhat.com>

	* iconv/loop.c: Fix typo.

2002-05-23  Jakub Jelinek  <jakub@redhat.com>

	* inet/ether_line.c (ether_line): Fix a typo causing only
	lower 4 bits of each ethernet address byte being assigned.
	Don't modify what line points to.
	* inet/tst-ether_aton.c (main): Add ether_line tests.

2002-05-23  Marcus Brinkmann  <marcus@gnu.org>

	* manual/filesys.texi: Don't make readlink example leak memory
	when readlink fails.
2002-05-24 08:49:00 +00:00
Ulrich Drepper 434d3784f1 Update.
2002-04-26  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp.c (re_compile_fastmap_iter): Fix fastmap in case of
	not _LIBC and RE_ENABLE_I18N.
	(build_range_exp): Implement for not _LIBC.
	(build_collating_symbol): Likewise.
	(parse_bracket_exp): Unify redundant error handlings.
	Don't erase mbcset for non matching list in multibyte envs.
	(build_word_op): Add '_' to matching list for \w operator.
	* posix/regex_internal.c (re_string_construct): Invoke
	build_upper_buffer in case of not RE_ENABLE_I18N.
	(re_string_reconstruct): Don't touch cur_state in case of not
	RE_ENABLE_I18N.
	* posix/regex_internal.h (attribute_hidden): New macro in case of
	not _LIBC.
	(re_charset_t): Define range_starts/ends in case of not _LIBC.
	* posix/regexec.c (sift_states_iter_mb): Hide in case of not
	RE_ENABLE_I18N.
	(transit_state_mb): Likewise.
	(check_node_accept_bytes): Implement the code evaluating range
	expression in case of not _LIBC.
	(find_collation_sequence_value): Hide in case of not _LIBC.

2002-04-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c: Copied from
	i386/semctl.c.
	(__old_semctl, __new_semctl): Only use va_arg if the argument will
	be used.
2002-04-26 20:52:02 +00:00
Ulrich Drepper 612546c60d Update.
2002-04-22  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp.c (re_compile_internal): Adapt it to new interface
	of buffer building functions.
	* posix/regex_internal.c (re_string_allocate): New function.
	(re_string_realloc_buffers): New function.
	(re_string_skip_chars): New function.
	(re_string_reconstruct): New function.
	(re_string_construct): Adapt it to new interface of buffer building
	functions.
	(re_string_construct_common): Likewise.
	(build_wcs_buffer): Likewise.
	(build_wcs_upper_buffer): Likewise.
	(build_upper_buffer): Likewise.
	(re_string_translate_buffer): Likewise.
	(re_string_context_at): Adapt it to variable length buffers.
	* posix/regex_internal.h (re_string_t): Add new fields to handle
	variable length buffers.
	(re_match_context_t): Likewise.
	* posix/regexec.c (re_search_internal): Adapt it to new interface
	of re_string_t and re_match_context_t.
	(acquire_init_state_context): Likewise.
	(check_matching): Likewise.
	(check_halt_state_context): Likewise.
	(proceed_next_node): Likewise.
	(set_regs): Likewise.
	(sift_states_backward): Likewise.
	(clean_state_log_if_need): Likewise.
	(sift_states_iter_mb): Likewise.
	(sift_states_iter_bkref): Likewise.
	(add_epsilon_backreference): Likewise.
	(transit_state): Likewise.
	(transit_state_sb): Likewise.
	(transit_state_mb): Likewise.
	(transit_state_bkref): Likewise.
	(transit_state_bkref_loop): Likewise.
	(check_node_accept): Likewise.
	(match_ctx_init): Likewise.
	(extend_buffers): New function.

2002-04-21  Bruno Haible  <bruno@clisp.org>

	* iconvdata/tst-table.sh: For the second check, use the truncated
	GB18030 charmap table, like for the first check.
2002-04-24 21:54:53 +00:00
Ulrich Drepper 602c2f9d9d (parse_expression): Fix incorrect error code. (parse_dup_op): Fix error handling like "a{}". (parse_bracket_exp): Add error handling. (fetch_number): Add error handling for "a{<very_large_number>}".
parse_bracket_symbol): Add error handling in case that the symbol name is too
long.
(build_charclass): Handle [:lower:]/[:uppper:] correctly in case of REG_ICASE.
2002-04-20 00:57:03 +00:00
Ulrich Drepper c77694049a Update.
2002-04-16  Ulrich Drepper  <drepper@redhat.com>

	* posix/regcomp.c (gettext): Use INTUSE for _libc_intl_domainname.

	* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
2002-04-17 05:56:15 +00:00
Ulrich Drepper 71319b9cb3 Update.
2002-04-08  Ulrich Drepper  <drepper@redhat.com>

	* Makeconfig (CPPFLAGS): Also add CPPFLAGS-<basename> where <basename>
	is the name of the source file without extension.
	* Makefile (distribute): Add cppflags-iterator.mk.
	* cppflags-iterator.mk: New file.
	* extra-lib.mk: For the sources of the library run
	cppflags-iterator.mk.

	* include/libintl.h: Declare __dcgettext_internal and
	_libc_intl_domainname_internal.  Define __dcgettext using these
	two symbols if used in libc itself.
	* argp/argp-help.c: Define dgettext using __dcgettext_internal and
	_libc_intl_domainname_internal.
	* argp/argp-parse.c: Likewise.
	* intl/dcgettext.c (__dcgettext): Use INTDEF to define alias.
	* intl/dgettext.c: Call __dcgettext_internal instead of __dcgettext.
	* intl/gettext.c: Likewise.
	* locale/SYS_libc.c (_libc_intl_domainname): Use INTDEF to define
	alias.
	* posix/regcomp.c (gettext): Use __dcgettext_internal instead of
	__dcgettext.
	* posix/regex_internal.c (gettext): Likewise.
2002-04-08 08:59:00 +00:00
Ulrich Drepper 6455d2556c Update.
2002-03-13  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/ttyname.c: Comment out definition and
	use of __ttyname.

	* posix/regcomp.c (__re_error_msgid): Renamed from re_error_msgid.
	Define as hidden.
	(__re_error_msgid_idx): Renamed from re_error_msgid_idx.  Define as
	hidden.  Change all users of these variables.

	* posix/regex_internal.h (__re_error_msgid): Renamed from
	re_error_msgid.  Declare as hidden.
	(__re_error_msgid_idx): Renamed from re_error_msgid_idx.  Declare as
	hidden.

	* stdio-common/reg-printf.c (__printf_arginfo_table): Define as hidden.
	(__printf_function_table): Likewise.
	* stdio-common/printf-parse.h (__printf_arginfo_table): Declare as
	hidden.
	(__printf_function_table): Likewise.

	* nscd/nscd_proto.h: Declare __nss_not_use_nscd_passwd,
	__nss_not_use_nscd_group, and __nss_not_use_nscd_hosts as hidden.

	* nss/XXX-lookup.c (DATABASE_NAME_SYMBOL): Define as hidden.
	* nss/nsswitch.c: Declare _nss_*_database as hidden.

	* stdlib/wctomb.c (__no_r_state): Declare as hidden.
	* stdlib/mbtowc.c (__no_r_state): Define as hidden.
2002-03-13 08:59:47 +00:00
Ulrich Drepper bc15410ece Update.
2002-03-11  Ulrich Drepper  <drepper@redhat.com>

	* manual/examples/mkfsock.c: Include <string.h> as well.
	Patch by Alain De Carolis <alaind@wseurope.com>.

2002-03-06  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regexec.c (re_match): Fix incorrect register sizes.
	(re_search): Likewise.

2002-03-05  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp.c (regfree): Remove a disused condition.
	* posix/regex_internal.c (re_acquire_state): Likewise.
	(re_acquire_state_context): Likewise.
	(register_state): Remove a redundant malloc invocation.
	* posix/regex_internal.h: (re_state_table_entry): Simplify
	the structure.

2002-03-05  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp.c (regcomp): Add __builtin_expect to error
	handling conditions.
	(regerror): Likewise.
	(regfree): Likewise.
	(re_compile_internal): Likewise.
	(init_dfa): Likewise.
	(init_word_char): Likewise.
	(create_initial_state): Likewise.
	(analyze): Likewise.
	(analyze_tree): Likewise.
	(duplicate_node): Likewise.
	(calc_eclosure): Likewise.
	(calc_eclosure_iter): Likewise.
	(parse): Likewise.
	(parse_reg_exp): Likewise.
	(parse_branch): Likewise.
	(parse_expression): Likewise.
	(parse_subexp): Likewise.
	(parse_dup_op): Likewise.
	(parse_bracket_exp): Likewise.
	(build_equiv_class): Likewise.
	(build_charclass): Likewise.
	(build_word_op): Likewise.
	(fetch_number): Likewise.
	(create_tree): Likewise.
	(duplicate_tree): Likewise.
	* posix/regex.c (BE): New macro.
	* posix/regexec.c (re_match): Add __builtin_expect to error
	handling conditions.
	(re_match_2): Likewise.
	(re_search): Likewise.
	(re_search_internal): Likewise.
	(check_matching): Likewise.
	(proceed_next_node): Likewise.
	(set_regs): Likewise.
	(sift_states_backward): Likewise.
	(add_epsilon_backreference): Likewise.
	(transit_state): Likewise.
	(transit_state_sb): Likewise.
	(transit_state_mb): Likewise.
	(transit_state_bkref): Likewise.
	(transit_state_bkref_loop): Likewise.
	(build_trtable): Likewise.
	(group_nodes_into_DFAstates): Likewise.
	(match_ctx_init): Likewise.
	(match_ctx_add_entry): Likewise.
	* posix/regex_internal.c (re_string_construct): Add __builtin_expect
	to error handling conditions.
	(re_string_construct_toupper): Likewise.
	(build_wcs_buffer): Likewise.
	(build_wcs_upper_buffer): Likewise.
	(build_upper_buffer): Likewise.
	(re_string_translate_buffer): Likewise.
	(re_node_set_alloc): Likewise.
	(re_node_set_init_1): Likewise.
	(re_node_set_init_2): Likewise.
	(re_node_set_init_copy): Likewise.
	(re_node_set_intersect): Likewise.
	(re_node_set_init_union): Likewise.
	(re_node_set_merge): Likewise.
	(re_node_set_insert): Likewise.
	(re_dfa_add_node): Likewise.
	(re_acquire_state): Likewise.
	(re_acquire_state_context): Likewise.
	(create_new_state_common): Likewise.
	(register_state): Likewise.
	(create_ci_new_state): Likewise.
	(create_cd_new_state): Likewise.
	(re_string_context_at): Remove redundant condition.

2002-01-16  Roger Sayle  <roger@eyesopen.com>

	* sysdeps/i386/i686/strcmp.S: Avoid unconditional jump to a ret.

	* sysdeps/i386/i586/strlen.S: Fix typo in comment.
2002-03-12 02:04:08 +00:00
Andreas Jaeger 37de950b40 Update.
2002-03-03  Andreas Jaeger  <aj@suse.de>

	* elf/nodlopenmod2.c: Provide prototype to avoid warning.
	* elf/tst-tlsmod1.c: Likewise.

	* posix/regcomp.c: Get regex.h from include dir for internal
	prototypes.

	* sysdeps/unix/sysv/linux/init-first.c: Move __init_misc prototype
	to libc-internal.h and include it.
	* include/libc-internal.h: Add __init_misc.

	* misc/init-misc.c: Include libc-internal.h for prototypes.

	* sysdeps/wordsize-32/divdi3.c: Add prototypes to avoid warnings.

	* misc/error.c [_LIBC]: Include libioP.h for prototype of
	_IO_putc_internal.
2002-03-03 19:43:30 +00:00
Ulrich Drepper 718c4bf954 Compatibility changes to allow using the code outside glibc. 2002-03-03 18:17:58 +00:00
Ulrich Drepper a9388965cc Update.
2002-02-28  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp.c (regcomp): Remove a redundant condition.
	(init_word_char): Add a check on malloc failure.
	(create_initial_state): Likewise.
	(duplicate_node): Likewise.
	(calc_eclosure): Likewise.
	(calc_eclosure_iter): Likewise.
	(parse_expression): Likewise.
	(parse_bracket_exp): Remove unnecessary malloc invocations.
	(build_equiv_class): Likewise.
	(build_charclass): Likewise.
	* posix/regex_internal.c (re_node_set_intersect): Add a check
	on malloc failure.
	(re_node_set_add_intersect): Likewise.
	(re_node_set_merge): Likewise.
	(re_acquire_state): Likewise.
	(re_acquire_state_context): Likewise.
	(create_newstate_common): Likewise.
	(register_state): Likewise.
	(create_ci_newstate): Likewise.
	(create_cd_newstate): Likewise.
	* posix/regex_internal.h: Fix prototypes of re_acquire_state
	and re_acquire_state_context.
	* posix/regexec.c (regexec): Suit it to the error handling of
	re_search_internal.
	(re_match): Likewise.
	(re_search): Likewise.
	(re_search_internal): Add a check on malloc failure.
	(acquire_init_state_context): Likewise.
	(check_matching): Likewise.
	(proceed_next_node): Likewise.
	(set_regs): Likewise.
	(sift_states_backward): Likewise.
	(sift_states_iter_bkref): Likewise.
	(add_epsilon_backreference): Likewise.
	(transit_state): Likewise.
	(transit_state_sb): Likewise.
	(transit_state_mb): Likewise.
	(transit_state_bkref_loop): Likewise.
	(build_trtable): Likewise.
	(group_nodes_into_DFAstates): Likewise.
	(match_ctx_init): Likewise.
	(match_ctx_add_entry): Likewise.
2002-02-28 07:43:13 +00:00