about summary refs log tree commit diff
path: root/posix/regex.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* regex: copy back from GnulibPaul Eggert2021-09-211-11/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy regex-related files back from Gnulib, to fix a problem with static checking of regex calls noted by Martin Sebor. This merges the following changes: * New macro __attribute_nonnull__ in misc/sys/cdefs.h, for use later when copying other files back from Gnulib. * Use __GNULIB_CDEFS instead of __GLIBC__ when deciding whether to include bits/wordsize.h etc. * Avoid duplicate entries in epsilon closure table. * New regex.h macro _REGEX_NELTS to let regexec say that its pmatch arg should contain nmatch elts. Use that for regexec, instead of __attr_access (which is incorrect). * New regex.h macro _Attr_access_ which is like __attr_access except portable to non-glibc platforms. * Add some DEBUG_ASSERTs to pacify gcc -fanalyzer and to catch recently-fixed performance bugs if they recur. * Add Gnulib-specific stuff to port the dynarray- and lock-using parts of regex code to non-glibc platforms. * Fix glibc bug 11053. * Avoid some undefined behavior when popping an empty fail stack.
* Annotate additional APIs with GCC attribute access.Martin Sebor2021-05-061-7/+16
| | | | | | | | | | | | | | | | This change continues the improvements to compile-time out of bounds checking by decorating more APIs with either attribute access, or by explicitly providing the array bound in APIs such as tmpnam() that expect arrays of some minimum size as arguments. (The latter feature is new in GCC 11.) The only effects of the attribute and/or the array bound is to check and diagnose calls to the functions that fail to provide a sufficient number of elements, and the definitions of the functions that access elements outside the specified bounds. (There is no interplay with _FORTIFY_SOURCE here yet.) Tested with GCC 7 through 11 on x86_64-linux.
* posix: Sync regex code with gnulibAdhemerval Zanella2021-01-041-5/+12
| | | | | | | It sync with gnulib commit 43ee1a6bf. The main change is 9682f18e9. (which does not have a meaniful description). Checked on x86_64-linux-gnu.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* Sync regex.h from GnulibPaul Eggert2020-08-041-2/+0
| | | | | * posix/regex.h: Remove an ‘#ifndef _CRAY’ that hasn’t been needed for years in Gnulib (and was needed only because of Gnulib).
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* posix: Sync gnulib regex implementationAdhemerval Zanella2018-07-041-129/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch syncs the regex implementation with gnulib (commit 0ee5212). Only two changes in GLIBC regex testing are required: 1. posix/bug-regex28.c: as previously discussed [1] the change of expected results on the pattern should be safe. 2. posix/PCRE.tests: the ERE (a)|\1 is malformed (in the sense that the \1 doesn't mean anything) and although current GLIBC accepts it has undefined behavior. This patch removes the specific test. This sync contains some patches from thread 'Regex: Make libc regex more usable outside GLIBC.' [2] which have been pushed upstream in gnulib. This patches also fixes some regex issues (BZ #23233, BZ #21163, BZ #18986, BZ #13762) and I did not add testcases for both #23233 and #13762 because I couldn't think a simple way to trigger the expected failure path to trigger them. Checked on x86_64-linux-gnu and i686-linux-gnu. [BZ #23233] [BZ #21163] [BZ #18986] [BZ #13762] * posix/Makefile (tests): Add bug-regex37 and bug-regex38. * posix/PCRE.tests: Remove invalid test. * posix/bug-regex28.c: Fix expected values for used syntax. * posix/bug-regex37.c: New file. * posix/bug-regex38.c: Likewise. * posix/regcomp.c: Sync with gnulib. * posix/regex.c: Likewise. * posix/regex.h: Likewise. * posix/regex_internal.c: Likewise. * posix/regex_internal.h: Likewise. * posix/regexec.c: Likewise. [1] https://sourceware.org/ml/libc-alpha/2017-12/msg00807.html [2] https://sourceware.org/ml/libc-alpha/2017-12/msg00237.html
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* regex: Fix spelling in comments.Arnold Robbins2017-12-191-1/+1
| | | | | | | Fix the spelling in various comments throughout the regex implementation. These changes are also present in gnulib and will be integrated there also, see: https://sourceware.org/ml/libc-alpha/2017-12/msg00688.html
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Combine __USE_BSD and __USE_SVID into __USE_MISC.Joseph Myers2014-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up following the obsoletion of _BSD_SOURCE and _SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC. The only non-mechanical part of this patch is the changes to features.h; everything else is simple substitution of __USE_MISC for the old macros. Thus, this patch leaves obviously redundant conditionals such as "defined __USE_MISC || defined __USE_MISC", and does not update #endif comments where they referred to BSD or SVID in words instead of the literal macro name. This is intended to facilitate patch review by separating the less mechanical changes from these purely mechanical changes into a separate patch. (I do intend to integrate all the changes from <https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I believe includes all the trailing comment updates, in subsequent patches.) Tested x86_64. * include/features.h (__USE_BSD): Remove macro definitions. (__USE_SVID): Likewise. (_BSD_SOURCE): Likewise. (_SVID_SOURCE): Likewise. [!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition from definition of _DEFAULT_SOURCE. [_BSD_SOURCE || _SVID_SOURCE]: Change condition to [_DEFAULT_SOURCE]. * bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC]. * bits/mman.h [__USE_BSD]: Likewise. * bits/termios.h [__USE_BSD]: Likewise. * bits/waitstatus.h [__USE_BSD]: Likewise. * ctype/ctype.h [__USE_SVID]: Likewise. * dirent/dirent.h [__USE_BSD]: Likewise. * grp/grp.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * inet/netinet/igmp.h [__USE_BSD]: Likewise. * io/fcntl.h [__USE_BSD]: Likewise. * io/ftw.h [__USE_BSD]: Likewise. * io/sys/stat.h [__USE_BSD]: Likewise. * libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise. * libio/bits/stdio2.h [__USE_BSD]: Likewise. * libio/stdio.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * math/math.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise. * misc/bits/syslog.h [__USE_BSD]: Likewise. * misc/search.h [__USE_SVID]: Likewise. * misc/sys/mman.h [__USE_BSD]: Likewise. * misc/sys/syslog.h [__USE_BSD]: Likewise. * misc/sys/uio.h [__USE_BSD]: Likewise. * posix/bits/unistd.h [__USE_BSD]: Likewise. * posix/glob.h [__USE_BSD]: Likewise. * posix/regex.h [__USE_BSD]: Likewise. * posix/sys/types.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/sys/utsname.h [__USE_SVID]: Likewise. * posix/sys/wait.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/unistd.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * pwd/pwd.h [__USE_SVID]: Likewise. * resolv/netdb.h [__USE_BSD]: Likewise. * setjmp/setjmp.h [__USE_BSD]: Likewise. * signal/signal.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * socket/sys/socket.h [__USE_BSD]: Likewise. * stdlib/fmtmsg.h [__USE_SVID]: Likewise. * stdlib/stdlib.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string2.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string3.h [__USE_BSD]: Likewise. * string/endian.h [__USE_BSD]: Likewise. * string/string.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * string/strings.h [__USE_BSD]: Likewise. * sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise. * sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/x86/bits/string.h [__USE_BSD]: Likewise. * sysvipc/sys/ipc.h [__USE_SVID]: Likewise. * termios/termios.h [__USE_BSD]: Likewise. * time/sys/time.h [__USE_BSD]: Likewise. * time/time.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change condition to [__USE_MISC].
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Add script to update copyright notices and reformat some to facilitate its use.Joseph Myers2013-01-011-2/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Update documentation in regex.hReuben Thomas2011-05-201-4/+9
|
* Update RE_SYNTAX*_AWK constants in regex.hAharon Robbins2011-05-161-9/+12
|
* [BZ #5607]Ulrich Drepper2008-01-161-51/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-16 Ulrich Drepper <drepper@redhat.com> [BZ #5607] * conform/data/fcntl.h-data: Fix posix_fadvise and posix_fallocate prototypes. * conform/data/limits.h-data: Adjust limits changed in v6 and add additional suffixes. * conform/data/mqueue.h-data: Fix typo in mq_curmsgs entry. Add optional functions mq_timedreceive and mq_timedsend. * conform/data/netdb.h-data: Add more AI_* and EAI_* constants. * conform/data/pthread.h-data: Fix prototype of pthread_condattr_setclock. pthread_sigmask is not required in v6. * conform/data/semaphore.h-data: Allow time.h definitions. * conform/data/signal.h-data: Likewise. * conform/data/stdio.h-data: getw and putw are not required in v6. * conform/data/stdlib.h-data: Change setstate prototype. * conform/data/string.h-data: Fix strerror_r prototype. * conform/data/time.h-data: Fix typo in TIMER_ABSTIME definition. * conform/data/unistd.h-data: pthread_atfork not required in v6. Fix readlink prototype. * conform/data/netinet/in.h-data: Add const to in6addr_any and in6addr_loopback. * inet/netinet/in.h: Cleanup namespace. * posix/regex.h: Likewise. * resolv/netdb.h: Likewise. * sysdeps/unix/sysv/linux/bits/in.h: Likewise. * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
* * posix/unistd.h: Declare fsync also for __USE_XOPEN2K.Ulrich Drepper2007-11-261-1/+1
|
* Define REG_ENOSYS also for Unix98.Ulrich Drepper2007-11-261-1/+1
| | | | * posix/regex.h (REG_ENOSYS): Likewise.
* [BZ #1201]Ulrich Drepper2006-05-021-1/+2
| | | | * posix/regex.h: g++ still cannot handled [restrict].
* [BZ #2534, BZ #2535]Ulrich Drepper2006-04-211-10/+1
| | | | | * posix/regex.h: Remove obsolete <sys/types.h> and special handling for VMS.
* * posix/regex.h: Pretty printing.Ulrich Drepper2005-09-301-61/+51
| | | | Clean up namespace a bit.
* [BZ #281]Ulrich Drepper2005-09-231-1/+1
| | | | | | | | | | * 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>.
* * posix/regex_internal.h (re_sub_match_top_t): Remove unused memberUlrich Drepper2005-09-061-51/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [BZ #1207]Roland McGrath2005-08-181-1/+1
| | | | | | 2005-08-17 Paul Eggert <eggert@cs.ucla.edu> [BZ #1207] * posix/regex.h: Remove spurious space-before-tab. From gnulib.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-68/+105
|
* 2.5-18.1Jakub Jelinek2007-07-121-105/+68
|
* [BZ #544]Ulrich Drepper2004-11-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2004-03-041-0/+4
| | | | | | | 2004-01-15 Paolo Bonzini <bonzini@gnu.org> * posix/regex.h (REG_STARTEND): Define. * posix/regexec.c (regexec): Check for REG_STARTEND.
* Update.Ulrich Drepper2004-01-301-1/+1
| | | | | | | | | | | 2004-01-28 Paolo Bonzini <bonzini@gnu.org> Merge regex changes in gawk. * posix/regcomp.c (build_range_exp) [!_LIBC]: Check validity of collation elements. * posix/regex.c: Include limits.h. * posix/regex.h: Document REG_ECOLLATE correctly. * posix/regex_internal.h [!_LIBC && !ENABLE_NLS]: Disable NLS.
* Update.Ulrich Drepper2003-11-131-1/+5
| | | | | | | | | | * 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.
* Update.Ulrich Drepper2003-10-021-0/+5
| | | | | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2003-09-251-5/+0
| | | | | | | | | | * 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
* Upate.Ulrich Drepper2003-09-231-0/+5
| | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2003-04-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-04-16 Jakub Jelinek <jakub@redhat.com> * elf/Makefile (distribute): Add tst-tlsmod{[7-9],1[0-2]}.c and tst-tls10.h. (tests): Add tst-tls1[0-2]. (modules-names): Add tst-tlsmod{[7-8],1[0-2]}. ($(objpfx)tst-tlsmod8.so): Depend on tst-tlsmod7.so. ($(objpfx)tst-tlsmod10.so): Depend on tst-tlsmod9.so. ($(objpfx)tst-tlsmod12.so): Depend on tst-tlsmod11.so. ($(objpfx)tst-tls10): Depend on tst-tlsmod8.so. ($(objpfx)tst-tls11): Depend on tst-tlsmod10.so. ($(objpfx)tst-tls12): Depend on tst-tlsmod12.so. * elf/tst-tls10.c: New test. * elf/tst-tls11.c: New test. * elf/tst-tls12.c: New test. * elf/tst-tls10.h: New file. * elf/tst-tlsmod7.c: New file. * elf/tst-tlsmod8.c: New file. * elf/tst-tlsmod9.c: New file. * elf/tst-tlsmod10.c: New file. * elf/tst-tlsmod11.c: New file. * elf/tst-tlsmod12.c: New file. 2003-04-15 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/bits/atomic.h: Moved ppc32/64 specific code to ... * sysdeps/powerpc/powerpc32/bits/atomic.h: New file. * sysdeps/powerpc/powerpc64/bits/atomic.h: New file. * posix/regex.h: Include <sys/types.h>.
* Update.Ulrich Drepper2002-05-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2002-02-261-4/+8
| | | | | | | | | | | | | * posix/Makefile (distribute): Add regcomp.c, regexec.c, regex_internal.c, and regex_internal.h. (CFLAGS-regex.c): Replace -DMBS_SUPPORT with -DRE_ENABLE_I18N. * posix/regex.c: Complete rewrite. * posix/regexec.c: New file. * posix/regcomp.c: New file. * posix/regex_internal.c: New file. * posix/regex_internal.h: New file. * posix/regex.h (RE_ICASE): New macro. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
* Update.Ulrich Drepper2001-11-291-5/+9
| | | | | | 2001-11-29 Ulrich Drepper <drepper@redhat.com> * posix/regex.h: Define __restrict_arr correctly.
* Update to LGPL v2.1.Andreas Jaeger2001-07-061-9/+8
| | | | | | | | | | | | | | 2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
* Update.Ulrich Drepper2001-03-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-23 Jes Sorensen <jes@linuxcare.com> * sysdeps/unix/sysv/linux/ia64/sysdep.h (ENTRY): Moved to ... * sysdeps/ia64/sysdep.h: ...here. * sysdeps/ia64/sysdep.h (LOCAL_ENTRY): Define. * sysdeps/ia64/sysdep.h (LOCAL_LEAF): Define. * sysdeps/ia64/_mcount.S (_mcount_ret_helper): Use LOCAL_LEAF() to declare instead of LEAF(). Suggestion from David Mosberger. 2001-03-21 David Mosberger <davidm@hpl.hp.com> * sysdeps/unix/sysv/linux/ia64/sysdep.h (CALL_MCOUNT): Add unwind directives. (PSEUDO): Drop .psr and .lsb directives. * sysdeps/unix/sysv/linux/ia64/setjmp.S: Ditto. Add unwind directives. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Ditto. * sysdeps/ia64/elf/start.S: Misc cleanup: remove .psr and .lsb directives etc. * sysdeps/unix/sysv/linux/ia64/brk.S: Ditto. * sysdeps/unix/sysv/linux/ia64/__longjmp.S: Ditto. * sysdeps/ia64/_mcount.S: Remove .psr and .lsb directives (no longer needed). Add unwind directives. * sysdeps/ia64/sysdep.h: Define ASM_UNW_PRLG_RP, ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_PSP, ASM_UNW_PRLG_PR, and ASM_UNW_PRLG_GRSAVE. 2001-03-21 Paul Eggert <eggert@twinsun.com> * posix/regex.h (RE_INVALID_INTERVAL_ORD): New macro. (RE_SYNTAX_POSIX_EGREP): Use it. * posix/regex.c (regex_compile): Implement it. 2001-03-21 Paul Eggert <eggert@twinsun.com> * posix/regex.c (GET_UNSIGNED_NUMBER): Check for overflow. Rewrite to avoid duplicate code. 2001-03-21 H.J. Lu <hjl@gnu.org> * elf/Makefile (tests): Don't depend on $(objpfx)tst-pathopt.out for cross-compiling. ($(objpfx)tst-pathopt.out): Undo the last change.
* Update.Ulrich Drepper2000-10-301-2/+2
| | | | | | | | | | | 2000-10-29 Greg Louis <glouis@dynamicro.on.ca> * posix/regex.h (__restrict_arr): Move definition out of #ifndef block. Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but doesn't define __restrict_arr. * manual/search.texi: Correct description if VISIT values. Patch by Ben Collins <bcollins@debian.org>.
* Update.Ulrich Drepper2000-08-211-0/+16
| | | | | | | | * stdlib/random_r.c (__setstate_r): Correct offset when computing new rptr and fptr. Reported by Michael Fischer <fischer@cs.yale.edu>. * posix/regex.h: Add macro definitions to allow compiling outside glibc.
* Update.Ulrich Drepper2000-08-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * misc/sys/cdefs.h: Define __restrict_arr. * include/sys/time.h: Add restrict where required by AGd4. * inet/arpa/inet.h: Likewise. * io/sys/stat.h: Likewise. * io/sys/statvfs.h: Likewise. * misc/search.h: Likewise. * misc/sys/select.h: Likewise. * posix/glob.h: Likewise. * posix/regex.h: Likewise. * posix/spawn.h: Likewise. * posix/unistd.h: Likewise. * rt/aio.h: Likewise. * signal/signal.h: Likewise. * socket/sys/socket.h: Likewise. * stdlib/ucontext.h: Likewise. * streams/stropts.h: Likewise. * string/string.h: Likewise. * time/time.h: Likewise. * time/sys/time.h: Likewise. * posix/spawn.h: Add declarations for posix_spawnattr_getscheparam and posix_spawnattr_setscheparam. * libio/stdio.h: Make cuserid prototype again available for all XPG versions.